/* Section 04 — Projets : Owl Whisper, Studio vidéo, trois cartes claires (prototype index.html:20, 58-63, 79-91, 402-489) */

.projets {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.projets :where(h3, h4, p, ul) {
  margin: 0;
}

/* Puces (index.html:414, 452) */
.puces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.puce {
  padding: 6px 10px;
  font-family: var(--police-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.puce--encre {
  color: var(--ambre);
  background: var(--encre);
}

.puce--contour-clair {
  border: 1px solid var(--bordure-puce-claire);
  color: var(--texte-corps-clair);
}

.puce--ambre {
  color: var(--encre);
  background: var(--ambre);
}

.puce--contour-sombre {
  border: 1px solid var(--bordure-sombre);
  color: var(--texte-corps-sombre);
}

/* Cartes claires — soulèvement par la propriété translate, comme .carte (savoir-faire.css:10-56) */
.carte-claire {
  position: relative;
  border: 1px solid var(--bordure-claire);
  background: var(--fond-carte);
  transition:
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.4s;
}

/* Liste complète : celle de .rv (motion.css) serait sinon écrasée. Spécificité 0,2,0 > .rv 0,1,0 */
.carte-claire.in {
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rd, 0s),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rd, 0s),
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 0.4s;
}

.carte-claire::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--ambre);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1);
}

/* Seule ombre admise du site : ADR 0002 */
.carte-claire:hover {
  z-index: 1;
  translate: 0 -6px;
  box-shadow: 0 24px 48px -24px rgb(12 16 22 / 35%);
}

.carte-claire:hover::after {
  transform: scaleX(1);
}

/* Owl Whisper (index.html:412-431) */
.carte-claire--owl {
  display: flex;
  flex-wrap: wrap;
}

.owl-texte {
  display: flex;
  flex: 999 1 460px;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: clamp(28px, 4vw, 52px);
}

.owl-texte h3 {
  font-family: var(--police-titre);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.owl-intro {
  font-size: 18px;
  line-height: 1.55;
  color: var(--texte-corps-clair);
}

.owl-conclusion {
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  color: var(--texte-italique-clair);
}

/* Bouton plein sombre sur fond clair (index.html:20, 87-88, 424) ; a.btn-plein 0,1,1 suit a:hover de base.css */
a.btn-plein {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: var(--encre);
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s,
    transform 0.25s;
}

a.btn-plein:hover {
  color: #fff;
  background: var(--fond-bouton-plein-survol);
  transform: translateY(-2px);
}

.btn-plein svg {
  flex: none;
}

.owl-onde {
  display: flex;
  flex: 1 1 300px;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 40px;
  background: var(--encre);
}

.onde {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 120px;
}

/* Barres et texte animés (index.html:80) ; @keyframes en fin de feuille, --i posé par projets.js */
.onde > span {
  transform-origin: center;
  animation: onde 1.3s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.11s);
}

/* Hauteurs et couleurs des barres (index.html:428) : aucun attribut style servi */
.barre {
  width: 6px;
  background: var(--bordure-sombre);
}

.barre:nth-child(1) {
  height: 24px;
}

.barre:nth-child(2) {
  height: 48px;
}

.barre:nth-child(3) {
  height: 80px;
}

.barre:nth-child(4) {
  height: 112px;
}

.barre:nth-child(5) {
  height: 64px;
}

.barre:nth-child(6) {
  height: 96px;
}

.barre:nth-child(7) {
  height: 40px;
}

.barre:nth-child(8) {
  height: 72px;
}

.barre:nth-child(9) {
  height: 104px;
}

.barre:nth-child(10) {
  height: 56px;
}

.barre:nth-child(11) {
  height: 32px;
}

.barre:nth-child(12) {
  height: 16px;
}

/* Rangs 3, 4, 5, 6, 8 et 9 */
.barre:nth-child(3),
.barre:nth-child(4),
.barre:nth-child(5),
.barre:nth-child(6),
.barre:nth-child(8),
.barre:nth-child(9) {
  background: var(--ambre);
}

.onde-texte {
  margin-left: 16px;
  font-family: var(--police-mono);
  font-size: 22px;
  color: var(--texte-sur-sombre);
}

/* Trois cartes (index.html:469-487) */
.projets-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 24px;
}

.carte-claire--projet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
}

.carte-claire--projet svg {
  flex: none;
  color: var(--encre);
}

.carte-claire--projet h3 {
  font-family: var(--police-titre);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.carte-claire--projet p,
.carte-claire--projet ul {
  font-size: clamp(15px, 0.95vw, 18px);
  line-height: 1.6;
  color: var(--texte-corps-clair);
}

.carte-claire--projet ul {
  padding-left: 20px;
  line-height: 1.7;
}

.carte-claire--projet strong {
  color: var(--encre);
}

/* Volets (index.html:417-421, 455-459) */
.volets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 32px;
}

.volet {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 2px solid var(--encre);
}

.volet h4 {
  font-size: 15px;
  font-weight: 600;
}

.volet p {
  font-size: clamp(15px, 0.95vw, 18px);
  line-height: 1.55;
  color: var(--texte-corps-clair);
}

.studio .volet {
  border-top-color: var(--ambre);
}

.studio .volet h4 {
  color: #fff;
}

.studio .volet p {
  color: var(--texte-corps-sombre);
}

/* Studio (index.html:435-466) ; .studio:hover 0,2,0 bat le fond de .on-dark (layout.css) 0,1,0 */
.studio {
  display: flex;
  flex-wrap: wrap-reverse;
  border: 1px solid var(--bordure-carte-sombre);
  color: var(--texte-sur-sombre);
  background-color: var(--encre);
  transition:
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 0.4s,
    background-color 0.4s;
}

/* Liste complète : celle de .rv (motion.css) serait sinon écrasée */
.studio.in {
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rd, 0s),
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) var(--rd, 0s),
    translate 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 0.4s,
    background-color 0.4s;
}

/* Carte sombre : survol sans ombre (ADR 0002) */
.studio:hover {
  border-color: var(--ambre);
  background-color: var(--fond-carte-sombre-survol);
  translate: 0 -6px;
}

.studio-panneau {
  position: relative;
  display: flex;
  flex: 1 1 320px;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  min-height: 300px;
  padding: 40px 32px;
  overflow: hidden;
  border-right: 1px solid var(--bordure-carte-sombre);
  background: var(--fond-carte-sombre);
}

.studio-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(0.85);
  transition: opacity 0.8s;
}

.studio:hover .studio-video {
  opacity: 0.6;
}

/* Dégradé prescrit par le brief (HANDOFF.md:128), admis par l'ADR 0002 */
.studio-voile {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(17 23 33 / 35%) 0%, rgb(17 23 33 / 75%) 100%);
  pointer-events: none;
}

.plans-libelles {
  position: relative;
  display: flex;
  justify-content: space-between;
  font-family: var(--police-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--texte-corps-sombre);
}

.plans {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.plans > span {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--bordure-carte-sombre);
  background: rgb(28 36 49 / 55%);
  animation: plan 4s linear infinite;
  animation-delay: calc(var(--i, 0) * 1s);
}

.rythme {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 56px;
  padding-top: 8px;
  border-top: 1px dashed var(--bordure-sombre);
}

/* Hauteurs et couleurs du rythme (index.html:447) */
.rythme > span {
  flex: 1;
  background: var(--bordure-sombre);
  transform-origin: bottom;
  animation: onde 1.1s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.09s);
}

.rythme > span:nth-child(1) {
  height: 30%;
}

.rythme > span:nth-child(2) {
  height: 85%;
}

.rythme > span:nth-child(3) {
  height: 45%;
}

.rythme > span:nth-child(4) {
  height: 60%;
}

.rythme > span:nth-child(5) {
  height: 95%;
}

.rythme > span:nth-child(6) {
  height: 35%;
}

.rythme > span:nth-child(7) {
  height: 50%;
}

.rythme > span:nth-child(8) {
  height: 80%;
}

.rythme > span:nth-child(9) {
  height: 40%;
}

.rythme > span:nth-child(10) {
  height: 65%;
}

.rythme > span:nth-child(11) {
  height: 100%;
}

.rythme > span:nth-child(12) {
  height: 30%;
}

.rythme > span:nth-child(13) {
  height: 55%;
}

.rythme > span:nth-child(14) {
  height: 75%;
}

.rythme > span:nth-child(15) {
  height: 40%;
}

.rythme > span:nth-child(16) {
  height: 25%;
}

/* Rangs 2, 5, 8, 11 et 14 */
.rythme > span:nth-child(3n + 2) {
  background: var(--ambre);
}

.studio-legende {
  position: relative;
  font-family: var(--police-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--texte-corps-sombre);
}

.studio-texte {
  display: flex;
  flex: 999 1 460px;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: clamp(28px, 4vw, 52px);
}

.studio-texte h3 {
  font-family: var(--police-titre);
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
}

.studio-intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--texte-corps-sombre);
}

.studio-realisations {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--bordure-carte-sombre);
  background: var(--fond-carte-sombre);
}

/* :not(.etiquette) : la taille de .etiquette (realisations.css) reste à 12px (index.html:462-463) */
.studio-realisations p:not(.etiquette) {
  font-size: clamp(15px, 0.95vw, 18px);
  line-height: 1.6;
  color: var(--texte-corps-sombre);
}

.studio-realisations strong {
  font-weight: 600;
  color: #fff;
}

/* .repli, summary et .plus : realisations.css */
.studio .repli {
  margin-top: 0;
  padding-top: 6px;
}

.studio .repli-techno {
  margin: 8px 0 0;
  font-family: var(--police-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--texte-secondaire-sombre);
}

/* Images clés (index.html:79-84), utilisées par .onde, .rythme et .plans ci-dessus */
@keyframes onde {
  0%,
  100% {
    transform: scaleY(0.45);
  }

  50% {
    transform: scaleY(1.1);
  }
}

@keyframes plan {
  0%,
  22% {
    border-color: var(--ambre);
    background: rgb(36 48 68 / 35%);
  }

  25%,
  100% {
    border-color: var(--bordure-carte-sombre);
    background: rgb(28 36 49 / 55%);
  }
}

/* index.html:91 ; a.btn-plein (0,1,1) et a.btn-plein:hover (0,2,1) repris tels quels pour gagner */
@media (prefers-reduced-motion: reduce) {
  .onde > span,
  .rythme > span,
  .plans > span {
    animation: none;
  }

  .studio-video {
    display: none;
  }

  .carte-claire,
  .carte-claire.in,
  .carte-claire::after,
  .studio,
  .studio.in,
  a.btn-plein {
    transition: none;
  }

  .carte-claire:hover,
  .studio:hover {
    translate: none;
    box-shadow: none;
  }

  a.btn-plein:hover {
    transform: none;
  }
}
