/* ==========================================================================
   Variante DBM - la charte Terracotta Signature dans la mise en page Ritovex.

   Même mise en page et mêmes animations que l'aperçu fidèle. Seule la
   palette change : crème, espresso et terracotta remplacent blanc, encre
   et orange.

   Le crème clair sert de fond de page, le crème de bande : c'est la logique
   déjà en place sur le site. Contrastes mesurés : espresso sur crème clair
   17,25 ; sur crème 16,00 ; terracotta foncé en texte 6,48.

   La police reste Satoshi : seules les couleurs changent, comme demandé.
   Passer les titres en Archivo Black est une ligne à modifier.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --encre: #17120F;
  --blanc: #FAF6EF;
  --gris:  #F4EDE4;
  --accent:       #A84F2A;
  --accent-texte: #8A3E20;
  --filet:        rgba(23, 18, 15, .14);
  --filet-fort:   rgba(23, 18, 15, .3);

  --font: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --t-geant: clamp(2.6rem, 1.4rem + 4.6vw, 3.75rem);
  --t-grand: clamp(1.9rem, 1.3rem + 2.4vw, 2.85rem);
  --t-moyen: clamp(1.2rem, 1.05rem + .7vw, 1.55rem);

  --gouttiere: clamp(20px, 3.2vw, 42px);
  --large: 1400px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--font);
  font-size: 18px; font-weight: 500; line-height: 1.5;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: var(--t-geant); }
h2 { font-size: var(--t-grand); }
h3 { font-size: var(--t-moyen); line-height: 1.2; }
p  { max-width: 66ch; text-wrap: pretty; }
a  { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:where(a, button, summary):focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--large); margin-inline: auto; padding-inline: var(--gouttiere); }
.sect { padding-block: clamp(64px, 7vw, 128px); }
.sect--court { padding-block: clamp(40px, 4.5vw, 72px); }
.fond-gris  { background: var(--gris); }
.fond-encre { background: var(--encre); color: var(--blanc); }
.fond-encre a { color: var(--blanc); }

/* ------------------------------------------------------------- en-tête */

.entete { position: sticky; top: 0; z-index: 50; background: var(--blanc); border-bottom: 1px solid var(--filet); }
.entete-inner { display: flex; align-items: center; min-height: 84px; gap: 0; }
.marque {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.45rem; font-weight: 700; letter-spacing: -.04em;
  padding-right: 34px; border-right: 1px solid var(--filet); align-self: stretch;
}
.menu { display: flex; gap: 30px; margin-inline: auto; padding-left: 34px; font-weight: 500; }
.menu a { position: relative; padding-block: 4px; }
.menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: var(--encre); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.menu a:hover::after, .menu a.actif::after { transform: scaleX(1); }
.entete-droite { display: flex; align-items: center; gap: 12px; padding-left: 34px; border-left: 1px solid var(--filet); align-self: stretch; }
.tel-icone { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gris); flex: none; }
.tel { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.tel small { display: block; font-size: .74rem; font-weight: 500; }
.burger { display: none; border: 1px solid var(--filet-fort); border-radius: 4px; background: none; font: inherit; font-weight: 600; padding: 9px 14px; cursor: pointer; }
.menu-mobile { display: grid; gap: 14px; padding: 18px var(--gouttiere) 26px; border-top: 1px solid var(--filet); font-weight: 600; }
.menu-mobile[hidden] { display: none; }
@media (max-width: 1020px) {
  .menu, .entete-droite { display: none; }
  .marque { border-right: none; }
  .burger { display: block; margin-inline-start: auto; }
}

/* --------------------------------------------------------------- pastille */

.pastille {
  display: inline-block; background: var(--gris);
  padding: 8px 16px; border-radius: 4px;
  font-size: .9rem; font-weight: 500; letter-spacing: -.01em;
}
.pastille--sombre { background: rgba(255, 255, 255, .12); color: var(--blanc); }

/* --------------------------------------------------------------- boutons */

/* Le bouton du modèle : le libellé glisse vers le haut et sa copie le
   remplace. Deux <span> identiques, le second décalé sous le premier. */
.btn {
  position: relative; display: inline-grid; overflow: hidden;
  background: var(--encre); color: var(--blanc);
  padding: 17px 32px; border: 1px solid var(--encre); border-radius: 4px;
  font-weight: 600; cursor: pointer; isolation: isolate;
}
.btn span { grid-area: 1 / 1; transition: transform .42s var(--ease); }
.btn span:last-child { transform: translateY(150%); }
.btn:hover span:first-child { transform: translateY(-150%); }
.btn:hover span:last-child { transform: translateY(0); }
.btn--clair { background: var(--blanc); color: var(--encre); border-color: var(--blanc); }
/* Sur bande sombre tous les liens passent en blanc : un bouton clair y
   deviendrait blanc sur blanc. On lui rend son encre. */
.fond-encre .btn--clair, .final .btn--clair { color: var(--encre); }
.btn--fantome { background: transparent; color: var(--encre); border-color: var(--filet-fort); }

.lien-lecture { display: inline-flex; align-items: center; gap: 14px; font-weight: 600; }
.lien-lecture i {
  display: grid; place-items: center; width: 48px; height: 48px; flex: none;
  border: 1px solid var(--filet-fort); border-radius: 50%; font-style: normal;
  transition: background-color .25s, color .25s, border-color .25s;
}
.lien-lecture:hover i { background: var(--accent); border-color: var(--accent); color: var(--encre); }

.lien-fleche { display: inline-block; margin-top: 18px; font-weight: 700; color: var(--accent-texte); }
.lien-fleche::after { content: " →"; display: inline-block; transition: transform .25s var(--ease); }
.lien-fleche:hover::after { transform: translateX(5px); }

.boutons { display: flex; align-items: center; gap: 22px; margin-top: 38px; flex-wrap: wrap; }
.boutons--centre { justify-content: center; }

/* ------------------------------------------------------------------ héros */

.heros { padding-block: clamp(44px, 5vw, 84px) clamp(56px, 6vw, 96px); }
.heros-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(36px, 5vw, 90px); align-items: center; }
.heros h1 { margin-top: 26px; max-width: 12ch; }
.chapo { margin-top: 26px; max-width: 44ch; font-size: 1.125rem; }
.sous-chapo { margin-top: 14px; max-width: 46ch; font-size: .95rem; font-weight: 600; }

/* L'image du modèle est une forme encochée, pas un simple rectangle. Deux
   coins opposés arrondis, deux coins vifs : c'est ce décalage qui la signe. */
.heros-image {
  border-radius: 0 34px 0 34px; overflow: hidden; background: var(--gris);
}
.heros-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
@media (max-width: 940px) {
  .heros-inner { grid-template-columns: 1fr; }
  .heros-image img { aspect-ratio: 4 / 3; }
}

/* --------------------------------------------------------------- rubans */

.ruban { padding-block: clamp(28px, 3vw, 48px); border-block: 1px solid var(--filet); }
.ruban--nu { border-top: none; }
.ruban-titre { max-width: none; text-align: center; font-weight: 600; margin-bottom: 26px; }
.defile { overflow: hidden; }
.defile-piste {
  display: flex; gap: clamp(28px, 3.4vw, 56px); width: max-content;
  padding-inline: var(--gouttiere); align-items: center;
  animation: defiler 44s linear infinite;
}
.defile-piste li { font-weight: 600; white-space: nowrap; }
.defile-piste--gros li { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 3rem); font-weight: 700; letter-spacing: -.04em; }
.defile-piste--gros li:nth-child(even) { color: var(--accent-texte); }
.defile:hover .defile-piste { animation-play-state: paused; }
.defile--inverse .defile-piste { animation-direction: reverse; }
.defile--lent .defile-piste { animation-duration: 62s; }
@keyframes defiler { to { transform: translateX(calc(-50% - clamp(14px, 1.7vw, 28px))); } }

/* -------------------------------------------------------------- en-têtes */

.tete { max-width: 720px; margin: 0 auto clamp(40px, 4.5vw, 68px); text-align: center; }
.tete .pastille { margin-bottom: 20px; }
.tete h2 + p { margin: 18px auto 0; }
.tete-fendue {
  display: flex; justify-content: space-between; align-items: end; gap: 30px;
  flex-wrap: wrap; margin-bottom: clamp(38px, 4vw, 62px);
}
.tete-fendue .pastille { margin-bottom: 18px; }
.tete-fendue h2 { max-width: 16ch; }
.tete-fendue > p { max-width: 42ch; }

/* ------------------------------------------------------- qui je suis */

.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 80px); align-items: start; }
.duo h2 { max-width: 14ch; }
.duo .fort { font-weight: 700; margin-bottom: 18px; }
@media (max-width: 940px) { .duo { grid-template-columns: 1fr; } }

/* Les compteurs du modèle : un grand nombre qui s'incrémente à l'arrivée. */
.chiffres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px; margin-top: clamp(48px, 5vw, 84px);
  border-top: 1px solid var(--filet); padding-top: clamp(30px, 3vw, 46px);
}
.chiffres b {
  display: block; font-size: clamp(2.4rem, 1.6rem + 2.6vw, 3.6rem);
  font-weight: 700; letter-spacing: -.05em; line-height: 1; color: var(--accent-texte);
}
.chiffres span { display: block; margin-top: 10px; font-size: .95rem; font-weight: 600; max-width: 22ch; }

/* ------------------------------------------------------------ rangées */

.rangs { border-top: 1px solid var(--filet-fort); }
.rang {
  display: grid; grid-template-columns: 90px minmax(0, 26ch) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 48px); align-items: baseline;
  padding-block: clamp(28px, 3vw, 42px); border-bottom: 1px solid var(--filet);
  transition: padding-inline .35s var(--ease);
}
.rang:hover { padding-inline: 16px; }
.rang-num { font-weight: 700; font-size: .95rem; color: var(--accent-texte); }
@media (max-width: 900px) {
  .rang { grid-template-columns: 60px minmax(0, 1fr); }
  .rang p { grid-column: 2; }
}

/* -------------------------------------------------------------- fiches */

.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(20px, 2.2vw, 30px); }
.fiche {
  background: var(--blanc); border: 1px solid var(--filet); border-radius: 16px;
  padding: clamp(24px, 2.4vw, 32px); display: grid; gap: 14px; align-content: start;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.fiche:hover { border-color: var(--encre); transform: translateY(-4px); }
.fiche-haut { display: flex; justify-content: space-between; align-items: center; }
.fiche-num { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fiche-voir { font-size: .85rem; font-weight: 700; color: var(--accent-texte); }
.fiche p { font-size: 1rem; }
.apres-grille { max-width: none; text-align: center; margin-top: clamp(32px, 3.4vw, 50px); font-weight: 600; }
.apres-grille .lien-fleche { margin-top: 0; }

/* -------------------------------------------------------------- étapes */

.etapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(24px, 2.6vw, 40px); }
.etape { padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .3); }
.etape-num { display: block; font-weight: 700; font-size: .95rem; color: var(--accent); margin-bottom: 14px; }
.etape h3 { margin-bottom: 12px; }

/* ---------------------------------------------------------------- avis */

.defile-piste--avis { align-items: stretch; }
.avis {
  width: clamp(300px, 34vw, 460px); flex: none;
  display: grid; align-content: space-between; gap: 24px;
  background: var(--gris); border-radius: 16px; padding: clamp(26px, 2.6vw, 36px);
  white-space: normal;
}
.avis blockquote { font-size: var(--t-moyen); font-weight: 500; line-height: 1.35; }
.avis-qui b { display: block; font-weight: 700; }
.avis-qui span { display: block; font-size: .9rem; font-weight: 600; }

/* --------------------------------------------------------- bandes d'appel */

.appel-bande {
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  flex-wrap: wrap; background: var(--gris); border-radius: 16px;
  padding: clamp(34px, 4vw, 62px);
}
.appel-bande h2 { max-width: 18ch; }
.appel-bande .boutons { margin-top: 0; }

.final {
  background: var(--encre); color: var(--blanc); border-radius: 16px;
  padding: clamp(44px, 5.5vw, 88px) clamp(24px, 4vw, 64px); text-align: center;
}
.final h2 { max-width: 22ch; margin: 20px auto 0; }

/* ------------------------------------------------------------ questions */

.questions { max-width: 880px; margin-inline: auto; border-top: 1px solid var(--filet-fort); }
.question { border-bottom: 1px solid var(--filet); }
.question summary {
  display: flex; justify-content: space-between; gap: 24px; align-items: baseline;
  padding-block: 24px; cursor: pointer; list-style: none;
  font-size: var(--t-moyen); font-weight: 700;
}
.question summary::-webkit-details-marker { display: none; }
.question summary::after { content: "+"; color: var(--accent-texte); font-weight: 500; font-size: 1.5em; line-height: 1; }
.question[open] summary::after { content: "−"; }
.question p { padding-bottom: 26px; }

/* ------------------------------------------------------------------ pied */

.pied { background: var(--encre); color: var(--blanc); padding-block: clamp(52px, 6vw, 90px) 26px; }
.pied .marque { border-right: none; padding-right: 0; margin-bottom: 18px; }
.pied a:hover { color: var(--accent); }
.pied-haut { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; padding-bottom: 44px; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.pied-haut > div:first-child p { font-size: .95rem; max-width: 34ch; }
.pied h4 { font-size: .9rem; font-weight: 700; margin-bottom: 14px; }
.pied ul { display: grid; gap: 9px; font-size: .95rem; }
.pied-bas { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; font-size: .9rem; }
@media (max-width: 860px) { .pied-haut { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }

/* ------------------------------------------------- apparition au défilement */

[data-anim] { opacity: 0; transform: translateY(26px); }
[data-anim].vu { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-anim] { opacity: 1; transform: none; }
  .defile-piste { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}

/* Le sable de la charte pour les filets de carte, plus chaud qu'un noir
   transparent. */
.fiche { border-color: #E4D9C8; }
.fiche:hover { border-color: var(--accent); }
/* Sur la bande crème, les surfaces remontent vers le crème clair. */
.fond-gris .avis, .fond-gris .appel-bande { background: var(--blanc); }
.avis, .appel-bande { background: var(--gris); }
.heros-image { background: var(--gris); }
