/* =========================================================
   LE SITE DÉPLOYABLE
   Le prototype empile ses vues dans une seule page ; ici chaque
   page est un document. Il lui faut donc son propre en-tête, son
   pied, et de quoi afficher une vue qui n'est plus pilotée par
   un routeur.
   ========================================================= */
.ex-corps { background: var(--bg); color: var(--texte); }

/* Une vue exportée n'est plus cachée ni positionnée par le routeur. */
.ex-vue { display: block !important; position: static !important;
          min-height: 0 !important; opacity: 1 !important; visibility: visible !important; }
.ex-vue .reveal { opacity: 1 !important; transform: none !important; }

/* ---------- En-tête ---------- */
.ex-entete {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--trait);
}
.ex-entete__in { display: flex; align-items: center; gap: 1rem; min-height: 66px; padding: .5rem 0; }
.ex-logo img { height: 48px; width: auto; border-radius: 10px; display: block; }
.ex-nav { display: flex; flex-wrap: wrap; gap: .15rem; margin-left: auto; }
.ex-nav a {
  padding: .5rem .72rem; border-radius: var(--r-pill);
  text-decoration: none; font-size: .86rem; font-weight: 500; color: var(--texte-doux);
}
.ex-nav a:hover, .ex-nav a[aria-current="page"] { background: var(--bg-alt); color: var(--accent); }

.ex-burger { display: none; width: 44px; height: 44px; margin-left: auto;
  position: relative; border-radius: 12px; border: 1px solid var(--trait);
  background: var(--surface); cursor: pointer; }
.ex-burger span { position: absolute; left: 12px; width: 20px; height: 2px;
  background: var(--texte); border-radius: 2px; }
.ex-burger span:nth-child(1) { top: 15px; }
.ex-burger span:nth-child(2) { top: 21px; }
.ex-burger span:nth-child(3) { top: 27px; }

@media (max-width: 1100px) {
  .ex-burger { display: block; }
  .ex-nav { display: none; order: 3; width: 100%; flex-direction: column; gap: .1rem;
            margin: .4rem 0 .5rem; padding-top: .5rem; border-top: 1px solid var(--trait);
            max-height: min(64svh, 540px); overflow-y: auto; }
  .ex-nav.ouvert { display: flex; }
  .ex-nav a { padding: .7rem .9rem; border-radius: 10px; font-size: 1rem;
              font-weight: 600; color: var(--texte); }
  .ex-entete__in { flex-wrap: wrap; }
}

/* ---------- Pied ---------- */
.ex-pied { background: var(--c-vert-950); color: rgba(255, 255, 255, .8); margin-top: 3rem; }
.ex-pied .contenu { padding: 2.6rem 0 1.6rem; }
.ex-pied a { color: rgba(255, 255, 255, .8); }
.ex-pied a:hover { color: #fff; }
.ex-pied__g { display: grid; gap: 1.8rem; grid-template-columns: 1.3fr repeat(3, 1fr); }
.ex-pied h2 { font-family: var(--f-titre); font-size: 1.1rem; letter-spacing: .06em;
              text-transform: uppercase; color: var(--c-anis); margin: 0 0 .6rem; }
.ex-pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem;
              font-size: var(--fs-sm); }
.ex-pied p { font-size: var(--fs-sm); }
.ex-pied img { border-radius: 12px; background: #fff; padding: .35rem; margin-bottom: .8rem; }
.ex-pied__bas {
  display: flex; gap: 1rem; flex-wrap: wrap; justify-content: space-between;
  margin-top: 2rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: var(--fs-xs);
}
.ex-pied__bas a { margin-right: .9rem; }
@media (max-width: 860px) { .ex-pied__g { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ex-pied__g { grid-template-columns: 1fr; } }

/* ---------- Le passage du document figé au site vivant ----------
   Pendant que la coque se monte, elle occupe tout l'écran sans se
   montrer : les modules qui mesurent leur conteneur, la visite et
   la carte en trois dimensions, trouvent ainsi de vraies
   dimensions. La page statique, elle, reste à l'écran jusqu'au
   dernier moment : le visiteur ne voit jamais de vide. */
html[data-anime="montage"] #ex-coque {
  position: fixed; inset: 0; overflow: hidden;
  opacity: 0; pointer-events: none;
}
html[data-anime="montage"] { overflow: hidden; }

/* Une fois monté, le site reprend le flux normal de la page. */
html[data-vivant] .ex-entete, html[data-vivant] .ex-pied { display: none; }
