/* antton-brunel.com — V1 de production (4 juillet 2026).
   Socle HTML/CSS sans framework, lisible sans JavaScript.
   Charte : docs/DIRECTION-CREATIVE.md (décisions datées, opposables). */

/* ---- Fontes auto-hébergées (Fontshare, décision du 3 juillet 2026) ---- */
@font-face {
  font-family: 'Sentient';
  src: url('fonts/sentient-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Sentient';
  src: url('fonts/sentient-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('fonts/switzer-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('fonts/switzer-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('fonts/switzer-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens Japandi (3 juillet 2026) + couleurs pop des dossiers (4 juillet 2026) ---- */
:root {
  --fond: #F6F3EC;        /* blanc cassé — fond, jamais de sombre en socle */
  --encre: #2C2620;       /* encre chaude — texte principal, tuile matière */
  --encre-douce: #5D5348; /* encre secondaire — légendes, notes */
  --sable: #EAE3D4;       /* surfaces — tuiles, panneaux */
  --bois: #D8C7AE;        /* bois clair — bordures, filets */
  --mousse: #55684C;      /* vert mousse — action, CTA */
  --mousse-fonce: #47573F; /* mousse foncé — survol du CTA */
  --terracotta: #B4593B;  /* terracotta — accent rare et critique */
  --papier: #FCFAF3;      /* fiche des dossiers */

  /* Dossiers : une couleur assumée par produit (contrastes AA vérifiés) */
  --pop-prune: #8A5A6E;
  --pop-terracotta: #B04F2E;
  --pop-mousse: #4F6B3F;
  --pop-miel: #D9A13B;
  --pop-nuit: #46608C;

  --serif: 'Sentient', Georgia, serif;
  --sans: 'Switzer', 'Helvetica Neue', Arial, sans-serif;

  --rayon: 14px;
  --transition: 0.2s ease-out;
  --sortie: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-expo — décélération naturelle */

  /* Modèle de lumière douce (6 juillet 2026) — les surfaces prennent le jour par le haut,
     posent une ombre chaude au sol. Jamais clinique : ombres teintées d'encre, faible opacité. */
  --sable-clair: #F1EBDF;  /* haut de surface — capte la lumière */
  --papier-clair: #FFFEFA; /* haut des fiches */
  --ombre-posee: 0 1px 2px rgba(44, 38, 32, 0.035), 0 10px 26px -16px rgba(44, 38, 32, 0.16);
  --ombre-levee: 0 2px 6px rgba(44, 38, 32, 0.05), 0 24px 52px -20px rgba(44, 38, 32, 0.30);
  --luire-haut: inset 0 1px 0 rgba(255, 253, 247, 0.55); /* liseré de lumière en tête de surface */

  /* Grain — bruit SVG généré en ligne, aucune image externe */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Socle ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--fond);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

/* Grain de page, très léger — la lumière douce, jamais clinique */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.05;
  z-index: 3;
}

main { max-width: 68rem; margin: 0 auto; }

::selection { background: var(--mousse); color: var(--fond); }

a { color: var(--mousse); text-underline-offset: 0.15em; transition: text-decoration-color var(--transition); }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--mousse);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2 { font-family: var(--serif); font-weight: 500; text-wrap: balance; letter-spacing: -0.015em; }
p { text-wrap: pretty; }
h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--encre-douce);
}

/* Chiffres tabulaires pour toutes les preuves */
.chiffre, .stat { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -999px; }
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 4;
  background: var(--encre);
  color: var(--fond);
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

/* ---- En-tête ---- */
.site-header {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.75rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.marque { font-family: var(--serif); font-size: 1.375rem; font-weight: 500; }
.site-header-contact { font-weight: 500; }

/* ---- Hero — bento de preuves vivantes, composé pour tenir dans l'écran ---- */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(3.5rem, 7vw, 5rem);
}
/* Le contenu vit au-dessus de l'ambiance */
.hero > h1,
.hero > .bento { position: relative; z-index: 1; }

/* « Le jour qui passe » — boucle d'ambiance en fond de section (poster = fallback fixe).
   v2 du 7 juillet 2026 : la composition porte son propre fondu — chaque pixel de bord
   de l'asset est EXACTEMENT le fond de page. Plus de masque CSS, plus de rayon : le
   carré est impossible par construction. object-fit: fill (pas cover) pour ne jamais
   recadrer le fondu intégré ; le champ est abstrait, l'étirement est invisible. */
.hero-ambiance {
  position: absolute;
  z-index: 0;
  top: -1.5rem;
  left: 0;
  /* Dimensions EXPLICITES : une <video> est un élément remplacé — avec width/height
     auto elle prend sa taille intrinsèque (1920×1080) et déborde tout le hero. */
  width: 100%;
  height: calc(100% + 3rem);
  object-fit: fill;
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.125rem, 4.2vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.accroche-ligne { display: block; }

.bento {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "sc sc suf suf"
    "sc sc qse qse"
    "autres autres contact contact";
  gap: clamp(0.75rem, 1.5vw, 1.125rem);
}

.tuile {
  position: relative;
  background: linear-gradient(177deg, var(--sable-clair), var(--sable) 62%);
  border-radius: var(--rayon);
  padding: clamp(1.125rem, 2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
  box-shadow: var(--ombre-posee), var(--luire-haut);
  transition: transform 0.35s var(--sortie), box-shadow 0.35s var(--sortie);
}
/* Les tuiles portent un lien : elles répondent au survol comme les plaques — même langage. */
.tuile:hover { transform: translateY(-3px); box-shadow: var(--ombre-levee), var(--luire-haut); }
/* Tuile vedette : la capacité reste en tête (alignée sur les autres tuiles du bento),
   et le 214 + sa légende se centrent dans l'espace en dessous — la preuve respire,
   sans creux ni rupture de la grille de lecture. */
.tuile-sc { grid-area: sc; }
.tuile-sc .chiffre-vedette { margin-top: auto; }
.tuile-sc .tuile-lien { margin-top: 0.875rem; margin-bottom: auto; }
.tuile-suf { grid-area: suf; }
.tuile-qse { grid-area: qse; }
.tuile-autres { grid-area: autres; }
.tuile-contact { grid-area: contact; }

/* La capacité ouvre la tuile — le bento reste nu ; plus tard, le produit
   se montrera au survol par sa propre matière (boucle en fond de tuile) */
.tuile-capacite { font-weight: 600; font-size: 0.9375rem; }

.chiffre {
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
}
/* Le 214 est la preuve la plus forte : il commande sa tuile 2×2. */
.chiffre-vedette { font-size: clamp(3.75rem, 7.5vw, 5.75rem); letter-spacing: -0.035em; margin-top: 0.25rem; }
.chiffre-mot { font-size: clamp(1.875rem, 3.5vw, 2.5rem); color: var(--terracotta); }
.chiffre-legende { color: var(--encre-douce); max-width: 26rem; }

.tuile-lien { margin-top: auto; padding-top: 0.75rem; font-weight: 500; width: fit-content; }

/* Tuile matière : encre chaude + grain vivant — la texture comme preuve de soin */
.tuile-autres {
  background: var(--encre);
  color: var(--fond);
  overflow: hidden;
}
.tuile-autres::after {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.22;
  animation: grain-vivant 0.9s steps(1) infinite;
}
.tuile-autres-texte { color: var(--fond); opacity: 0.85; max-width: 30rem; }
.tuile-lien-autres { color: var(--bois); position: relative; z-index: 1; }

@keyframes grain-vivant {
  0%, 100% { transform: translate(0, 0); }
  12.5% { transform: translate(-3%, 2%); }
  25%   { transform: translate(2%, -4%); }
  37.5% { transform: translate(-4%, -1%); }
  50%   { transform: translate(3%, 3%); }
  62.5% { transform: translate(-1%, 4%); }
  75%   { transform: translate(4%, -2%); }
  87.5% { transform: translate(-2%, -3%); }
}

/* Tuile contact : l'action porte le vert mousse */
.tuile-contact { background: var(--mousse); color: var(--fond); }
.tuile-contact-titre { font-family: var(--serif); font-size: 1.375rem; font-weight: 500; text-wrap: balance; }
.tuile-contact-texte { color: var(--fond); opacity: 0.92; }
.tuile-lien-contact { color: var(--fond); font-weight: 600; }

/* ---- Études de cas : résultat en tête, texte à gauche, plaque de preuve à droite ---- */
.cas {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--bois) 16%, var(--bois) 84%, transparent) 1;
}

.cas-grille {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.cas-capacite { color: var(--encre-douce); font-weight: 500; margin-bottom: 0.375rem; }
.cas-texte h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.15; margin-bottom: 1.25rem; }

/* Le résultat se lit avant tout le reste */
.cas-resultat {
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.5;
  max-width: 34rem;
  margin-bottom: 2.25rem;
}
.stat { font-weight: 600; }
.stat-mot { font-weight: 600; color: var(--terracotta); }

.cas-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  color: var(--encre-douce);
  font-size: 0.9375rem;
  max-width: 44rem;
}
.cas-details h3 { margin-bottom: 0.5rem; color: var(--encre); }

/* Plaque de preuve : le domaine réel, cliquable, comme matière de la colonne droite */
.cas-media { display: flex; flex-direction: column; gap: 1rem; }

/* La plaque porte la couleur d'identité du produit ; sa matière s'éveille au survol */
.plaque {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.625rem;
  min-height: clamp(11rem, 22vw, 15rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--pop, var(--sable));
  border-radius: var(--rayon);
  text-decoration: none;
  color: var(--pop-texte, var(--encre));
  box-shadow: var(--ombre-posee);
  transition: transform 0.35s var(--sortie), box-shadow 0.35s var(--sortie);
}
.plaque::after {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.16;
}
/* La boucle de matière (générée en interne, atelier motion/) prend le relais du grain
   au survol — le grain reste posé dessus, même matière. Sans JS ou sur tactile,
   rien ne se charge : la plaque vit très bien sans elle. */
.plaque-boucle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}
.plaque:hover .plaque-boucle.joue { opacity: 1; }
.plaque:hover {
  transform: translateY(-4px);
  box-shadow: var(--ombre-levee);
}
.plaque:hover::after {
  opacity: 0.28;
  animation: grain-vivant 0.9s steps(1) infinite;
}
.plaque:focus-visible { outline-color: var(--encre); }

.plaque-domaine {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1.9vw, 1.375rem);
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.plaque-action {
  position: relative;
  z-index: 1;
  font-weight: 500;
  text-underline-offset: 0.15em;
}
.plaque-action::after {
  content: "→";
  display: inline-block;
  margin-left: 0.375rem;
  transition: transform 0.3s ease-out;
}
.plaque:hover .plaque-action::after { transform: translateX(4px); }

.cas-avenir {
  color: var(--encre-douce);
  font-size: 0.875rem;
  padding: 0 0.25rem;
}
.cas-avenir-fort { color: var(--encre); font-size: 0.9375rem; }

/* ---- L'étude de cas immersive (décision du 7 juillet 2026, sur cadrage d'Anton).
   Au clic sur une plaque : voile fortement flouté, récit scrollable à gauche
   (chapitres, captures réelles), produit RÉEL testable à droite dans son cadre
   (téléphone pour Save & Care et Step Up Factory, navigateur pour QSE), navigation
   de projet en projet. <dialog> natif : focus piégé, Échap ferme. Sans JS, le
   dialog n'existe pas et les plaques restent des liens directs (interdit 8). */
.etude {
  width: min(90rem, calc(100vw - 3rem));
  height: calc(100dvh - 3rem);
  border: 0;
  padding: 0;
  margin: auto;
  border-radius: 20px;
  background: var(--fond);
  color: var(--encre);
  box-shadow: 0 48px 110px -32px rgba(44, 38, 32, 0.55);
  overflow: hidden;
}
.etude[open] { display: flex; flex-direction: column; }
.etude::backdrop {
  background: rgba(246, 243, 236, 0.45);
  -webkit-backdrop-filter: blur(26px) saturate(120%);
  backdrop-filter: blur(26px) saturate(120%);
}
html.etude-ouverte { overflow: hidden; }

.etude-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--bois);
  flex: none;
}
.etude-nav { display: flex; align-items: center; gap: 0.875rem; }
.etude-nom {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.125rem;
  min-width: 14rem;
  text-align: center;
}
.etude-fleche {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--bois);
  background: var(--papier);
  color: var(--encre);
  font: inherit;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.etude-fleche:hover { border-color: var(--mousse); color: var(--mousse); }
.etude-fermer {
  background: none;
  border: 0;
  padding: 0.25rem 0.25rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--encre-douce);
  cursor: pointer;
}
.etude-fermer:hover { color: var(--encre); }

.etude-projet {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 0;
}
.etude-projet[hidden] { display: none; }

/* Le bandeau-récit : la partie gauche se scrolle, comme une fiche éditoriale */
.etude-recit {
  overflow-y: auto;
  padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 3.5vw, 3rem) 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.375rem;
}
.etude-capacite { color: var(--encre-douce); font-weight: 500; margin-bottom: -1rem; }
.etude-recit h2 { font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.15; }
.etude-chapo { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; max-width: 32rem; }
.etude-recit h3 { margin-bottom: 0.375rem; color: var(--encre); }
.etude-recit section p { color: var(--encre-douce); font-size: 0.9688rem; max-width: 34rem; }
.etude-figure { margin: 0.25rem 0; }
.etude-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--bois);
  box-shadow: var(--ombre-posee);
}
.etude-figure figcaption {
  font-size: 0.8125rem;
  color: var(--encre-douce);
  margin-top: 0.5rem;
  padding: 0 0.25rem;
}
.etude-morale {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.45;
  border-left: 2px solid var(--mousse);
  padding-left: 1rem;
  max-width: 32rem;
}
.etude-jalon { font-size: 0.875rem; color: var(--encre-douce); }

/* La scène : le produit réel dans son cadre, posé sur le sable */
.etude-scene {
  background: linear-gradient(177deg, var(--sable-clair), var(--sable) 70%);
  border-left: 1px solid var(--bois);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.25rem, 2.5vw, 2.25rem);
  min-height: 0;
}
.etude-scene-note { font-size: 0.8125rem; color: var(--encre-douce); flex: none; }

/* Le cadre téléphone — le produit mobile dans la main */
.tel {
  background: var(--encre);
  border-radius: 2.75rem;
  padding: 0.625rem;
  box-shadow: var(--ombre-levee);
  width: min(24rem, 100%);
  height: min(48rem, 100%);
  min-height: 0;
  aspect-ratio: 39 / 78;
}
.tel-ecran {
  background: var(--papier);
  border-radius: 2.125rem;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.tel-ecran iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Le cadre navigateur — le produit de bureau dans sa fenêtre */
.nav-cadre {
  width: 100%;
  max-width: 46rem;
  height: 100%;
  max-height: 40rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nav-barre {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--papier);
  border: 1px solid var(--bois);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  padding: 0.5rem 0.875rem;
  flex: none;
}
.nav-pastilles { display: flex; gap: 0.3125rem; }
.nav-pastilles i { width: 9px; height: 9px; border-radius: 50%; background: var(--bois); }
.nav-url {
  font-size: 0.75rem;
  color: var(--encre-douce);
  background: var(--sable);
  border-radius: 6px;
  padding: 0.125rem 0.625rem;
}
.nav-ecran {
  flex: 1;
  min-height: 0;
  background: var(--papier);
  border: 1px solid var(--bois);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  box-shadow: var(--ombre-posee);
}
.nav-ecran iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Le voile de chargement — pendant que le produit réel (cross-origin, souvent une
   SPA) peint ses premières frames, le cadre montre « Chargement… » au lieu d'un vide
   blanc. Il s'efface au load de l'iframe (JS). Sans JS, le dialog n'existe pas. */
.tel-ecran, .nav-ecran { position: relative; }
.ecran-charge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--encre-douce);
  background: var(--papier);
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.ecran-charge.parti { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .ecran-charge { transition: none; } }

/* Écrans étroits : tout se scrolle en colonne, la scène suit le récit */
@media (max-width: 900px) {
  .etude { width: calc(100vw - 1.5rem); height: calc(100dvh - 1.5rem); }
  .etude-nom { min-width: 0; }
  .etude-projet { display: flex; flex-direction: column; overflow-y: auto; }
  .etude-recit { overflow: visible; flex: none; }
  .etude-scene { border-left: 0; border-top: 1px solid var(--bois); flex: none; min-height: 34rem; }
  .tel { height: 32rem; width: auto; }
  .nav-cadre { height: 30rem; }
}

/* ---- Dossiers — le reste de la suite, rangé comme dans l'atelier ----
   Une chemise par produit, sa couleur assumée, sa fiche qui sort verticalement
   au survol (décision du 4 juillet 2026 — références nrthview, vibrant/noomo). */
.index-produits {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--bois) 16%, var(--bois) 84%, transparent) 1;
}
.index-produits h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 0.5rem; }
.index-note { color: var(--encre-douce); }

.dossiers {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.75rem 1.25rem;
  padding-top: 11rem; /* le ciel où montent les fiches */
}

.dossier {
  position: relative;
  transition: transform 0.3s ease-out;
  /* rien ne dépasse sous la chemise ; fiche et panneau vivent librement au-dessus */
  clip-path: inset(-14rem -40rem 0 -40rem);
}
.dossier:hover,
.dossier:focus-visible,
.dossier:focus-within { transform: translateY(-6px); z-index: 4; }

/* La lèvre de papier qui dépasse de la chemise — décorative, le fait vit dans le panneau */
.dossier-fiche {
  display: block;
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: calc(100% - 2.75rem);
  height: 5rem;
  background: var(--papier);
  border: 1px solid var(--bois);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -6px 18px rgba(44, 38, 32, 0.07);
  transform: translateY(calc(100% - 3.5rem));
}

/* Le panneau : au survol, le dossier projette sa fenêtre — texte à gauche,
   média à droite, verre dépoli et contours flous (prototype du 4 juillet 2026) */
.dossier-panneau {
  position: absolute;
  bottom: calc(100% + 0.875rem);
  left: 0;
  width: min(44rem, calc(100vw - 3rem));
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  padding: 1.25rem;
  background: rgba(252, 250, 243, 0.68);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(252, 250, 243, 0.9);
  border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgba(44, 38, 32, 0.35), 0 6px 18px rgba(44, 38, 32, 0.08);
  opacity: 0;
  --tx: 0px;
  transform: translate(var(--tx), 14px) scale(0.985);
  transform-origin: bottom center;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0.06s;
  pointer-events: none;
  z-index: 3;
}
.dossier:hover .dossier-panneau,
.dossier:focus-visible .dossier-panneau,
.dossier:focus-within .dossier-panneau {
  opacity: 1;
  transform: translate(var(--tx), 0) scale(1);
}
/* Ancrage : le panneau reste au-dessus de son dossier, sans sortir du conteneur */
.dossier:nth-child(3) .dossier-panneau { left: 50%; --tx: -50%; }
.dossier:nth-child(n+4) .dossier-panneau { left: auto; right: 0; }

.panneau-texte {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  min-width: 0;
}
.panneau-nom {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}
.panneau-fait { font-size: 0.9375rem; line-height: 1.5; }
.panneau-statut { font-size: 0.875rem; font-weight: 600; color: var(--pop); }

.panneau-media {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--pop);
  min-height: 9.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.panneau-media::after {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.25;
  animation: grain-vivant 0.9s steps(1) infinite;
}
.panneau-play {
  position: relative;
  z-index: 1;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(252, 250, 243, 0.92);
  box-shadow: 0 4px 14px rgba(44, 38, 32, 0.25);
}
.panneau-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--pop);
}
.panneau-media-note {
  position: absolute;
  bottom: 0.625rem;
  left: 0;
  right: 0;
  z-index: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--pop-texte);
}

/* La chemise : couleur pop du produit, onglet en tête */
.dossier-devant {
  position: relative;
  z-index: 1;
  background: var(--pop);
  color: var(--pop-texte);
  border-radius: 0 16px var(--rayon) var(--rayon);
  padding: 2.5rem 1.25rem 1.125rem;
  min-height: 8.5rem;
  height: 100%; /* la chemise remplit sa case — pas d'écart où le papier se verrait */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
  box-shadow: var(--ombre-posee);
}
.dossier-devant::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 0;
  width: 44%;
  height: 14px;
  background: var(--pop);
  border-radius: 8px 12px 0 0;
}

.dossier-nom {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}
.dossier-statut { font-size: 0.875rem; font-weight: 500; }

/* Sans survol (tactile) : le panneau est posé au-dessus du dossier, tout est lisible */
@media (hover: none) {
  .dossiers { padding-top: 1rem; }
  .dossier { clip-path: none; }
  .dossier-fiche { display: none; }
  .dossier-panneau {
    position: static;
    opacity: 1;
    transform: none;
    width: auto;
    margin-bottom: 0.75rem;
    pointer-events: auto;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--papier);
    border: 1px solid var(--bois);
    box-shadow: none;
    grid-template-columns: 1fr;
  }
}

/* ---- L'interlude — l'identité par structure ---- */
.interlude {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--bois) 16%, var(--bois) 84%, transparent) 1;
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}
.interlude p {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 500;
  line-height: 1.35;
  max-width: 46rem;
  text-wrap: balance;
}
.interlude a { color: var(--mousse); }

/* ---- Le raccord cinématique — la signature (décision du 7 juillet 2026).
   À l'entrée d'une section, la lumière du « Jour qui passe » la traverse une fois :
   position et dérive posées en variables par le script du hero, échantillonnées sur
   la frame courante de la boucle — un raccord de montage, pas un effet de scroll.
   Sans la boucle (sans JS, tactile, mouvement réduit), la classe n'est jamais posée. */
.raccord { position: relative; }
/* L'overlay déborde de 30 % de chaque côté : sa dérive ne laisse jamais un bord
   dans le champ. Les variables restent relatives à la section ; le calc() remappe
   vers la boîte élargie (160 % de large, décalée de 30 %). */
.raccord::before {
  content: "";
  position: absolute;
  inset: 0 -30%;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  background: radial-gradient(
    36% 52% at calc((var(--raccord-x, 50%) + 30%) / 1.6) var(--raccord-y, 40%),
    var(--papier-clair) 0%,
    transparent 68%
  );
  opacity: 0;
  animation: raccord-lumiere 1.3s var(--sortie) forwards;
}
@keyframes raccord-lumiere {
  0%   { opacity: 0; transform: translateX(0); }
  30%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateX(calc(var(--raccord-dx, 8%) / 1.6)); }
}

/* ---- Jalons — les indicateurs de ce qui s'intégrera (registre : docs/INTEGRATIONS.md) ---- */
.jalon {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  border: 1px dashed var(--bois);
  border-radius: 999px;
  padding: 0.1875rem 0.75rem;
  margin-right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--encre-douce);
  white-space: nowrap;
}
.jalon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bois);
}
.hero-jalon {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--encre-douce);
}

/* ---- Contact ---- */
.contact {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(4rem, 9vw, 6rem);
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--bois) 16%, var(--bois) 84%, transparent) 1;
}
.contact h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: 1rem; text-wrap: balance; }

.contact-grille {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-texte { max-width: 30rem; margin-bottom: 1.25rem; }
.contact-note { max-width: 30rem; color: var(--encre-douce); font-size: 0.9375rem; margin-bottom: 1.25rem; }

/* Le formulaire : deux champs, sur panneau sable, aucun JavaScript requis */
.contact-form {
  background: linear-gradient(177deg, var(--sable-clair), var(--sable) 62%);
  border-radius: var(--rayon);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--ombre-posee), var(--luire-haut);
}
.champ { display: flex; flex-direction: column; gap: 0.4375rem; }
.champ label { font-weight: 600; font-size: 0.9375rem; }
.champ input,
.champ textarea {
  font: inherit;
  color: var(--encre);
  background: var(--papier);
  border: 1px solid var(--bois);
  border-radius: 10px;
  padding: 0.75rem 0.9375rem;
  transition: border-color var(--transition);
}
.champ input::placeholder,
.champ textarea::placeholder { color: var(--encre-douce); }
.champ input:focus-visible,
.champ textarea:focus-visible {
  outline: 2px solid var(--mousse);
  outline-offset: 1px;
  border-color: var(--mousse);
}
.champ textarea { resize: vertical; min-height: 8rem; }

/* Piège à robots : invisible pour les personnes, rempli par les scripts */
.champ-piege { position: absolute; left: -999px; height: 0; opacity: 0; }

.contact-form .bouton { border: none; cursor: pointer; width: fit-content; font-family: inherit; font-size: inherit; }
.contact-promesse { font-size: 0.875rem; font-weight: 600; color: var(--mousse); }

.bouton {
  display: inline-block;
  background: var(--mousse);
  color: var(--fond);
  text-decoration: none;
  font-weight: 600;
  padding: 0.9375rem 1.625rem;
  border-radius: 10px;
  transition: background-color var(--transition);
}
.bouton:hover { background: var(--mousse-fonce); }

.contact-email { margin-top: 1.25rem; color: var(--encre-douce); }

/* ---- Pied de page ---- */
.site-footer {
  max-width: 68rem;
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--bois) 16%, var(--bois) 84%, transparent) 1;
  color: var(--encre-douce);
  font-size: 0.9375rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Page 404 ---- */
.page-simple {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 5rem) 0;
}
.page-simple h1 { font-size: clamp(1.875rem, 4.5vw, 2.75rem); max-width: 36rem; }
.page-simple p { margin-top: 1.25rem; max-width: 36rem; color: var(--encre-douce); }

/* ---- Mouvement réduit : tout devient instantané, le grain se fige ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .dossier:hover, .dossier:focus-visible,
  .tuile:hover, .plaque:hover { transform: none; }
}

/* ---- Écrans intermédiaires ---- */
@media (max-width: 960px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "sc sc"
      "suf qse"
      "autres contact";
  }
  .cas-grille { grid-template-columns: 1fr; gap: 2rem; }
  .plaque { min-height: 9rem; }
}

/* ---- Petits écrans : une colonne, l'ordre de lecture prime ---- */
@media (max-width: 620px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sc"
      "suf"
      "qse"
      "contact"
      "autres";
  }
  .cas-details { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 860px) {
  .contact-grille { grid-template-columns: 1fr; }
}

/* ————— Estimer votre projet — outil auto-démonstratif (progressive enhancement) ————— */
.estimation { max-width: 620px; margin: clamp(3.5rem, 9vw, 6.5rem) auto 0; padding: 0 1.25rem; }
.estimation h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.15; }
.estim-ligne { color: var(--encre-douce); margin: 0.35rem 0 1.4rem; }

/* Champ quasi invisible : une ligne d'écriture, pas une boîte. */
.estim-input {
  width: 100%; min-height: 2.8em; resize: vertical;
  background: transparent; color: var(--encre);
  border: 0; border-bottom: 1px solid var(--bois); border-radius: 0;
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55; padding: 0.35rem 0.15rem;
  transition: border-color var(--transition);
}
.estim-input::placeholder { color: color-mix(in srgb, var(--encre-douce) 55%, transparent); }
.estim-input:focus-visible { outline: none; border-bottom-color: var(--mousse); }

/* Par défaut : les logos IA (encre pleine). La copie est reléguée à une icône discrète. */
.estim-ouvrir { display: flex; align-items: center; gap: 0.35rem 0.55rem; margin-top: 1.15rem; flex-wrap: wrap; }
.estim-ou { font-size: 0.85rem; color: var(--encre-douce); }
.estim-ias { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; }
.ia {
  appearance: none; cursor: pointer; background: none; border: 0;
  padding: 0.4rem; line-height: 0; color: var(--encre); border-radius: 8px;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}
.ia:hover { color: var(--mousse); background: color-mix(in srgb, var(--mousse) 10%, transparent); transform: translateY(-1px); }
.ia:focus-visible { outline: none; color: var(--mousse); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mousse) 26%, transparent); }
.ia svg { width: 24px; height: 24px; display: block; fill: currentColor; }
/* Les 5 qui demandent de copier d'abord : un ton en dessous, groupées avec le bouton copier. */
#estim-ias-copie .ia { color: var(--encre-douce); }
#estim-ias-copie .ia:hover { color: var(--mousse); }

.estim-sep { width: 1px; align-self: stretch; min-height: 1.4em; background: var(--bois); margin: 0 0.15rem; }
.estim-copier {
  appearance: none; cursor: pointer; background: none; border: 0;
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--encre-douce); font-family: var(--sans); font-size: 0.8rem;
  padding: 0.35rem 0.4rem; border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.estim-copier:hover { color: var(--encre); background: color-mix(in srgb, var(--mousse) 8%, transparent); }
.estim-copier:focus-visible { outline: none; color: var(--encre); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mousse) 24%, transparent); }
.estim-copier svg { width: 16px; height: 16px; }

.estim-status { font-size: 0.8rem; color: var(--mousse); min-height: 1.1em; margin-top: 0.6rem; }
.estim-noscript { font-size: 0.8rem; color: var(--encre-douce); margin-top: 0.6rem; }
