/* =====================================================================
   PAGE DÉMONSTRATION — direction artistique « Comptoir »

   Chargé APRÈS site.css et pages.css (DA commune). Ici :
     1. Le téléphone        3. La visite guidée
     2. Le ruban            4. L'appel final        5. Mobile
   ===================================================================== */

/* =====================================================================
   1. LE TÉLÉPHONE — cadre noir, ombre portée rose nette (comme la carte
   de visite du contact), sans reflet ni lueur
   ================================================================== */
.d-tel{ position: relative; width: min(290px, 72vw); padding: 8px; border-radius: 38px; background: var(--noir);
  box-shadow: 12px 12px 0 var(--rose); }
.d-tel img{ display: block; width: 100%; height: auto; border-radius: 30px; background: #1a1614; }

/* (2. Le ruban est désormais un composant commun : .p-ruban dans pages.css) */

/* =====================================================================
   3. LA VISITE GUIDÉE
   ================================================================== */
.d-visite{ padding-top: clamp(56px, 6vw, 88px); }

/* Un chapitre = un écran : capture (mobile / sans script) + texte */
.d-chapitres{ display: grid; gap: clamp(64px, 9vw, 110px); }
.d-chap{ display: grid; gap: 32px; align-items: center; justify-items: center; }
.d-chap-texte{ max-width: 52ch; }
.d-num{ margin: 0 0 12px; font-family: var(--display); font-weight: 800; font-size: 1rem; color: var(--rose); font-variant-numeric: tabular-nums; }
.d-num small{ font-size: 1rem; color: var(--texte2); font-weight: 600; }
.d-chap h2{ font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.6rem); letter-spacing: -.035em; line-height: 1.08; margin: 0 0 14px; color: var(--noir); }
.d-chap-texte > p:not(.d-num):not(.d-atout){ margin: 0 0 20px; font-size: clamp(1.02rem, .98rem + .2vw, 1.12rem); line-height: 1.7; color: var(--texte2); }
/* L'atout : un petit ticket, bord pointillé */
.d-atout{ display: inline-flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 16px;
  border: 2px dashed var(--ligne); background: var(--papier); font-weight: 600; line-height: 1.5; color: var(--noir); }
.d-atout svg{ flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--rose); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* La scène fixe : seulement sur ordinateur, et seulement avec le script */
.d-scene{ display: none; }

@media (min-width: 960px){
  .d-chap{ grid-template-columns: auto 1fr; gap: 64px; justify-items: start; }
  .d-chap:nth-child(even){ grid-template-columns: 1fr auto; }
  .d-chap:nth-child(even) .d-chap-tel{ order: 2; }

  /* --- Avec le script : visite guidée, téléphone fixe à droite --- */
  .d-js .d-grille{ display: grid; grid-template-columns: 1fr minmax(320px, 420px); gap: clamp(48px, 7vw, 120px); }
  .d-js .d-chapitres{ gap: 0; }
  .d-js .d-chap{ display: flex; align-items: center; min-height: 82vh; }
  .d-js .d-chap-tel{ display: none; }
  /* Le chapitre lu est net ; les autres s'effacent.
     On estompe les ENFANTS du bloc texte, pas le bloc lui-même : le bloc
     est animé à son entrée par pages.js, qui fixe son opacité finale. */
  .d-js .d-chap-texte > *{ opacity: .22; transition: opacity .5s; }
  .d-js .d-chap.actif .d-chap-texte > *{ opacity: 1; }
  .d-js .d-chap .d-atout{ transform: translateY(10px); opacity: 0; transition: transform .6s var(--sortie) .15s, opacity .6s .15s; }
  .d-js .d-chap.actif .d-atout{ transform: none; opacity: 1; }

  .d-js .d-scene{ display: block; }
  .d-scene-colle{ position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
  .d-tel-scene{ margin-bottom: 16px; }   /* place pour l'ombre rose sous le téléphone */
  .d-tel-scene{ width: min(300px, 32vh); }
  .d-ecrans{ position: relative; border-radius: 30px; overflow: hidden; background: #1a1614; }
  .d-ecrans img + img{ position: absolute; inset: 0; }
  .d-ecrans img{ will-change: clip-path, transform; }

  /* Compteur « 01 / 06 » : le chiffre défile dans sa fenêtre */
  .d-compteur{ font-family: var(--display); font-weight: 800; font-size: 1.1rem; color: var(--texte2); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; }
  .d-compteur-fen{ display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; vertical-align: bottom; }
  .d-compteur b{ display: inline-block; color: var(--noir); font-size: 1.6rem; }

  /* Onglets : six barres ; l'active s'allonge en rose. Au survol, le titre de l'écran apparaît. */
  .d-onglets{ display: flex; gap: 6px; }
  .d-onglets button{ position: relative; width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
  .d-onglets button::before{ content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; background: var(--ligne); transition: background .3s, transform .3s; }
  .d-onglets button:hover::before{ background: var(--noir); }
  .d-onglets button.actif{ width: 40px; }
  .d-onglets button.actif::before{ background: var(--rose); }
  .d-onglets button{ transition: width .4s var(--sortie); }
  .d-onglets span{ position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(4px); white-space: nowrap;
    font: 600 .78rem var(--display); color: #fff; background: var(--noir); padding: 5px 9px; opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s; }
  .d-onglets button:hover span, .d-onglets button:focus-visible span{ opacity: 1; transform: translateX(-50%); }
}

/* =====================================================================
   4. L'APPEL FINAL — bloc noir, encoches de ticket en haut
   ================================================================== */
.d-fin{ padding: clamp(40px, 5vw, 72px) 0 clamp(72px, 8vw, 112px); }
/* Le bloc noir lui-même est commun : .p-appel dans pages.css */

/* =====================================================================
   5. MOBILE
   ================================================================== */
@media (max-width: 959px){
  .p-hero .p-tampon{ position: absolute; right: 16px; top: 38px; width: 104px; }
  .p-hero .p-titre{ padding-right: 100px; }
  .d-chap-texte{ text-align: left; }
  .d-tel{ box-shadow: 8px 8px 0 var(--rose); }
}
