/* Opulancia — page d'attente. Identité provisoire, inspirée d'affiches éditoriales. */

@font-face {
  font-family: "Inter Tight";
  src: url("/fonts/inter-tight.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-italic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

:root {
  --fond: #E6E0D6;        /* grège */
  --carreau: #EEE9E2;     /* carreaux clairs */
  --encre: #151515;       /* texte, 13,9:1 */
  --gris: #5A554E;        /* texte secondaire, 5,6:1 */
  --nuit: #14202E;        /* bleu nuit */
  --sur-nuit: #EAE4DA;    /* texte sur bleu nuit, 13:1 */
  --gris-nuit: #A9B0BA;   /* texte secondaire sur bleu nuit, 7,5:1 */
  --or: #8C6F3A;          /* filets et cercle seulement (3,6:1) */
  --or-nuit: #C9B28A;     /* filets sur bleu nuit */
  --erreur: #9A3B2A;      /* messages d'erreur, 5,3:1 */

  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Cormorant Garamond", Georgia, serif;

  --marge: clamp(16px, 5vw, 72px);
  --large: 1280px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
}

/* Grain de papier, comme les affiches */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .35 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--nuit); outline-offset: 3px; }
.nuit :focus-visible { outline-color: var(--sur-nuit); }

.aller-au-contenu {
  position: absolute; left: var(--marge); top: -60px; z-index: 200;
  background: var(--nuit); color: var(--sur-nuit); padding: 10px 14px;
}
.aller-au-contenu:focus { top: 12px; }

.cadre { width: 100%; max-width: var(--large); margin: 0 auto; padding: 0 var(--marge); }

/* Petites capitales des affiches */
.legende {
  font-size: 12.5px;
  line-height: 1.35;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
}
.note { font-family: var(--serif); font-style: italic; font-size: 1.2em; font-weight: 500; }
.gris { color: var(--gris); }
.filet { width: 52px; height: 1px; background: currentColor; border: 0; margin: 28px 0; }

/* En-tête */
.entete {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.marque {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.03em;
  text-decoration: none;
  justify-self: start;
}
.marque span { color: var(--or); }
.entete .legende { text-align: center; }
.langues { justify-self: end; display: flex; gap: 14px; }
.langues a { text-decoration: none; }
.langues [aria-current="page"] { border-bottom: 1px solid currentColor; }

/* Ouverture */
.ouverture {
  position: relative;
  min-height: min(88vh, 860px);
  display: grid;
  align-content: center;
  padding-top: 40px;
  padding-bottom: 80px;
  overflow: hidden;
}
.grille {
  position: absolute;
  right: var(--marge);
  top: 50%;
  translate: 0 -50%;
  width: min(42vw, 520px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  z-index: 0;
}
.grille i {
  display: block;
  aspect-ratio: 1;
  background: var(--carreau);
  opacity: 0;
  animation: carreau 1s var(--ease) forwards;
  animation-delay: 150ms;
}
/* Pas de style en ligne (CSP) : les délais suivent la position */
.grille i:nth-child(2) { animation-delay: 220ms; } .grille i:nth-child(3) { animation-delay: 290ms; }
.grille i:nth-child(4) { animation-delay: 360ms; } .grille i:nth-child(5) { animation-delay: 430ms; }
.grille i:nth-child(6) { animation-delay: 500ms; } .grille i:nth-child(7) { animation-delay: 570ms; }
.grille i:nth-child(8) { animation-delay: 640ms; } .grille i:nth-child(9) { animation-delay: 710ms; }
.grille i:nth-child(10) { animation-delay: 780ms; } .grille i:nth-child(11) { animation-delay: 850ms; }
.grille i:nth-child(12) { animation-delay: 920ms; } .grille i:nth-child(13) { animation-delay: 990ms; }
.grille i:nth-child(14) { animation-delay: 1060ms; } .grille i:nth-child(15) { animation-delay: 1130ms; }
.carre {
  position: absolute;
  right: calc(var(--marge) - 2vw);
  top: 52%;
  width: min(13vw, 150px);
  aspect-ratio: 1;
  background: var(--nuit);
  z-index: 1;
  animation: glisse 1.4s var(--ease) 900ms both;
}
.ouverture .contenu { position: relative; z-index: 2; }
.titre {
  font-weight: 700;
  font-size: clamp(44px, 8.4vw, 116px);
  line-height: .98;
  letter-spacing: -.045em;
  margin: 0;
  max-width: 11ch;
}
.titre .ligne { display: block; overflow: hidden; padding-bottom: .06em; }
.titre .ligne > span {
  display: inline-block;
  animation: monte 1.1s var(--ease) both;
  animation-delay: 200ms;
}
.titre .ligne:nth-child(2) > span { animation-delay: 320ms; }
.titre .ligne:nth-child(3) > span { animation-delay: 440ms; }
.titre .ligne:nth-child(4) > span { animation-delay: 560ms; }
.ouverture .sous {
  max-width: 34ch;
  margin: 0;
  animation: apparait 1s var(--ease) 1.1s both;
}
.ouverture .filet { animation: trait 1s var(--ease) 1s both; transform-origin: left; }
.ouverture .appel { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; animation: apparait 1s var(--ease) 1.3s both; }
.pied-ouverture {
  position: absolute; left: var(--marge); right: var(--marge); bottom: 28px;
  display: flex; justify-content: space-between; gap: 16px; z-index: 2;
}

.bouton {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--nuit); color: var(--sur-nuit);
  padding: 15px 22px; text-decoration: none; border: 0;
  font: 500 15px/1 var(--sans); letter-spacing: .02em; cursor: pointer;
  transition: background .3s var(--ease), translate .3s var(--ease);
}
.bouton:hover { background: #0B131C; translate: 0 -2px; text-decoration: none; }
.bouton .fleche { transition: translate .3s var(--ease); }
.bouton:hover .fleche { translate: 4px 0; }
.lien-discret { font-size: 15px; }

/* Sections numérotées, comme des « notes » */
.section { padding-block: clamp(72px, 12vw, 150px); position: relative; }
.entete-section {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin-bottom: clamp(36px, 6vw, 72px);
}
.numero { font-size: clamp(36px, 4vw, 52px); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.entete-section .legende { text-align: end; }

.these {
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 62px);
  line-height: 1.05;
  letter-spacing: -.035em;
  max-width: 18ch;
  margin: 0;
}
.these em { font-style: normal; color: var(--gris); }

/* Le panneau qui glisse (porte entrouverte) */
.panneau {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 420px;
  margin-top: clamp(48px, 7vw, 90px);
  background: var(--nuit);
  color: var(--sur-nuit);
  overflow: hidden;
}
.panneau .volet {
  position: absolute; inset: 0 0 0 50%;
  background: var(--carreau);
  transition: transform 1.6s var(--ease);
  transform: translateX(0);
}
.panneau.visible .volet { transform: translateX(-100%); }
.panneau .texte { grid-column: 2; padding: clamp(28px, 5vw, 64px); align-self: end; position: relative; z-index: 1; }
.panneau .texte p { margin: 0 0 12px; max-width: 30ch; }
.panneau .cote { padding: clamp(28px, 5vw, 64px); }

/* Problèmes → bénéfices */
.notes { display: grid; gap: clamp(72px, 10vw, 130px); }
.fiche {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px clamp(24px, 4vw, 64px);
  align-items: start;
  position: relative;
}
.fiche .numero { grid-row: span 3; }
.fiche .probleme { grid-column: 2; margin: 0; }
.fiche h3 {
  grid-column: 2;
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -.04em;
  margin: 0;
}
.fiche .detail { grid-column: 3; grid-row: 1 / span 3; align-self: end; margin: 0; max-width: 40ch; }
.fiche .detail p { margin: 0 0 14px; }
.fiche .source { font-size: 13.5px; color: var(--gris); border-top: 1px solid rgba(21,21,21,.25); padding-top: 14px; margin-top: 18px; }
.fiche .forme {
  position: absolute; right: 0; top: -40px;
  width: 56px; height: 56px; opacity: .9;
}
.forme.carre-petit { background: var(--nuit); width: 18px; height: 18px; top: -30px; }
.forme.cercle { border: 1px solid var(--or); border-radius: 50%; width: 120px; height: 120px; top: -70px; }
.forme.rond { background: var(--or); border-radius: 50%; width: 22px; height: 22px; }

/* Section bleu nuit : en coulisse */
.nuit { background: var(--nuit); color: var(--sur-nuit); }
.nuit .gris { color: var(--gris-nuit); }
.nuit .titre-section { color: var(--sur-nuit); }
.titre-section {
  font-weight: 700;
  font-size: clamp(36px, 5.6vw, 76px);
  line-height: 1;
  letter-spacing: -.045em;
  margin: 0;
  max-width: 14ch;
}
.garanties {
  list-style: none; padding: 0; margin: clamp(48px, 7vw, 90px) 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(234,228,218,.25);
}
.garanties li {
  padding: 26px 28px 30px 0;
  border-bottom: 1px solid rgba(234,228,218,.25);
}
.garanties li:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid rgba(234,228,218,.25); }
.garanties strong { display: block; font-weight: 600; font-size: 19px; letter-spacing: -.01em; margin-bottom: 8px; }
.garanties span { color: var(--gris-nuit); font-size: 15.5px; }

.ne-fait-pas { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid rgba(21,21,21,.25); }
.ne-fait-pas li {
  display: grid; grid-template-columns: 90px 1fr; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid rgba(21,21,21,.25);
  font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -.02em; line-height: 1.2;
}
.ne-fait-pas li .legende { padding-top: .6em; }

.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }

/* Formulaire */
.formulaire { display: grid; gap: 22px; }
.champ { display: grid; gap: 8px; }
.champ label { font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500; }
.champ input, .champ textarea {
  font: 400 17px/1.4 var(--sans); color: var(--encre);
  background: transparent; border: 0; border-bottom: 1px solid var(--encre);
  padding: 10px 0; border-radius: 0; width: 100%;
}
.champ textarea { min-height: 120px; resize: vertical; border: 1px solid var(--encre); padding: 12px; }
.champ input:focus, .champ textarea:focus { outline: none; border-color: var(--nuit); box-shadow: 0 1px 0 0 var(--nuit); }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mention { font-size: 13.5px; color: var(--gris); margin: 0; }
.etat { min-height: 1.5em; margin: 0; font-size: 15px; }
.etat.erreur { color: var(--erreur); }
.merci { display: none; border-left: 2px solid var(--nuit); padding: 10px 0 10px 18px; margin-bottom: 28px; }
.merci:target, .merci.visible { display: block; }

/* Pied de page */
.pied { padding: 40px 0 48px; border-top: 1px solid rgba(21,21,21,.25); }
.pied .cadre { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.pied nav { display: flex; gap: 22px; flex-wrap: wrap; }

/* Pages de texte (mentions, confidentialité) */
.texte-long { max-width: 70ch; padding-bottom: 120px; }
.texte-long h1 { font-weight: 700; font-size: clamp(40px, 6vw, 80px); letter-spacing: -.045em; line-height: 1; margin: 40px 0 48px; }
.texte-long h2 { font-weight: 600; font-size: 22px; letter-spacing: -.01em; margin: 48px 0 12px; }
.texte-long p, .texte-long li { color: #2A2825; }
.texte-long .maj { color: var(--gris); font-size: 14px; }

/* Apparitions au défilement */
.revele { opacity: 0; translate: 0 28px; transition: opacity 1s var(--ease), translate 1s var(--ease); }
.revele.d1 { transition-delay: 120ms; } .revele.d2 { transition-delay: 240ms; } .revele.d3 { transition-delay: 360ms; }
.revele.visible { opacity: 1; translate: 0 0; }
.sans-js .revele { opacity: 1; translate: 0 0; }
.sans-js .panneau .volet { transform: translateX(-100%); }

@keyframes carreau { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
@keyframes glisse { from { opacity: 0; translate: 80px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes monte { from { translate: 0 105%; } to { translate: 0 0; } }
@keyframes apparait { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@keyframes trait { from { scale: 0 1; } to { scale: 1 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .grille i { opacity: 1; }
  .revele { opacity: 1; translate: 0 0; }
  .panneau .volet { transform: translateX(-100%); }
  html { scroll-behavior: auto; }
}

/* Tablette et téléphone */
@media (max-width: 900px) {
  .entete { grid-template-columns: 1fr auto; }
  .entete .legende.centre { display: none; }
  .grille { width: 64vw; right: -6vw; top: 44%; opacity: .75; }
  .carre { width: 22vw; right: 4vw; top: 60%; }
  .fiche { grid-template-columns: 1fr; }
  .fiche .numero, .fiche .probleme, .fiche h3, .fiche .detail { grid-column: 1; grid-row: auto; }
  .fiche .forme { display: none; }
  .garanties { grid-template-columns: 1fr; }
  .garanties li, .garanties li:not(:nth-child(3n+1)) { padding: 22px 0; border-left: 0; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .panneau { grid-template-columns: 1fr; min-height: 360px; }
  .panneau .texte { grid-column: 1; }
  .panneau .volet { inset: 0; }
  .ne-fait-pas li { grid-template-columns: 1fr; gap: 6px; }
  .pied-ouverture { position: static; margin-top: 56px; }
  .ouverture { min-height: auto; padding-top: 24px; }
}

/* Utilitaires (aucun style en ligne, à cause de la CSP) */
.espace-haut { margin-top: 20px; }
.fin { text-align: end; }
.legende-or { color: var(--or-nuit); margin-bottom: 18px; }
