/* Ouverture de Tessera (index.html ; lot I, I10, maquette validée le 12.10.2026, labo/maquettes-lot-i/ page 1) :
   « Première fois avec Tessera ? », l'animation de principe, le rôle, « Pour continuer, ouvrez … ». Une vue à la
   fois, centrée, rien ne défile. Derrière (I1) : l'interface de Tessera dessinée, sous un voile clair ≈ 90 %. */

body.intro {
  min-height: 100dvh; margin: 0; background: var(--fond); overflow-x: hidden;
  color: var(--texte); font-family: var(--police-texte); font-size: 1.05rem; line-height: 1.45;
}
.intro-vue h1:focus { outline: none; } /* le titre reçoit le focus à l'arrivée (lecteurs d'écran), sans cadre */

.intro-vue {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  text-align: center;
}
.intro-vue[hidden] { display: none; }

/* ---------- L'interface devinée derrière (I1) : dessin statique, inerte, jamais un cadre ---------- */
.intro-fond { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; user-select: none; display: none; }
.intro-fond::after { content: ''; position: absolute; inset: 0; background: rgba(250, 250, 251, 0.9); }
.intro-fond > div { position: absolute; inset: 0; filter: blur(1.5px); display: none; }
/* Ordinateur, tablette : derrière la question, l'animation et le rôle ; téléphone : derrière la question seulement. */
body:not([data-appareil="telephone"])[data-vue="premiere"] .intro-fond,
body:not([data-appareil="telephone"])[data-vue="intro"] .intro-fond,
body:not([data-appareil="telephone"])[data-vue="role"] .intro-fond,
body[data-appareil="telephone"][data-vue="premiere"] .intro-fond { display: block; }
body:not([data-appareil="telephone"]) .fond-ordi,
body[data-appareil="telephone"] .fond-tel { display: flex; }

.fond-ordi { flex-direction: column; min-width: 1100px; }
.fo-entete { display: flex; align-items: center; gap: 12px; padding: 18px 32px; }
.fo-logo svg { display: block; width: 28px; height: 28px; }
.fo-nom { font: 700 20px var(--police-titre); }
.fo-espace { flex-grow: 1; }
.fo-etat { font-size: 13px; color: var(--texte-doux); }
.fo-onglets { display: flex; gap: 8px; padding: 0 32px; border-bottom: 1px solid var(--surface-3); }
.fo-onglets span { padding: 12px 20px; color: var(--texte-doux); }
.fo-onglets .fo-actif { border: 1px solid var(--surface-3); border-bottom-color: var(--fond); margin-bottom: -1px; font-weight: 600; color: var(--encre); }
.fo-corps { display: flex; gap: 32px; padding: 28px 32px; }
.fo-principal { flex-grow: 1; display: flex; flex-direction: column; gap: 18px; text-align: left; }
.fo-titre { font: 700 28px var(--police-titre); }
.fo-encart { border: 1.5px dashed var(--bordure); padding: 40px; display: flex; flex-direction: column; gap: 14px; }
.fo-encart-titre { font: 700 26px var(--police-titre); }
.fo-texte { font-size: 16px; color: var(--texte-doux); }
.fo-bouton { align-self: flex-start; background: var(--encre); color: #fff; padding: 14px 20px; font-weight: 600; }
.fo-cartes { width: 280px; flex-shrink: 0; border: 1px solid var(--surface-3); background: #fff; padding: 20px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.fo-cartes-titre { font: 700 18px var(--police-titre); }
.fo-bloc { height: 120px; background: var(--surface-2); }
.fo-ligne { height: 14px; width: 70%; background: var(--surface-2); }

.fond-tel { flex-direction: column; gap: 16px; padding: 24px 20px; text-align: left; }
.ft-nom { font: 700 18px var(--police-titre); }
.ft-camera { height: 280px; background: #1C1C21; }
.ft-titre { font: 700 22px var(--police-titre); }
.ft-bouton { height: 52px; background: var(--encre); }

/* ---------- Les cartes (question, rôle) ---------- */
.premiere-fois,
.intro-carte {
  box-sizing: border-box;
  background: #FFFFFF; border: 1px solid var(--encre); border-radius: var(--rayon);
  box-shadow: 0 1px 2px rgba(17, 17, 20, 0.06), 0 12px 32px rgba(17, 17, 20, 0.10);
  display: flex; flex-direction: column; text-align: left;
}

/* ---------- « Première fois avec Tessera ? » ---------- */
.intro-premiere { gap: 22px; }
.intro-marque { display: block; }
.intro-marque .nom-stylise { --case: 0.36rem; }
.premiere-fois { width: min(40rem, 100%); padding: 34px 36px; gap: 18px; }
.premiere-fois-titre { margin: 0; font: 700 32px / 1.15 var(--police-titre); text-wrap: balance; }
.premiere-fois-boutons { display: flex; gap: 12px; flex-wrap: wrap; }
.premiere-fois-promesse { margin: 0; font-size: 18px; line-height: 1.45; color: var(--texte-doux, #4A4A55); text-wrap: pretty; } /* OBS-11 */
.premiere-fois-bouton { min-height: 52px; padding: 0 24px; font-size: 17px; }
.premiere-fois-arrivee { align-self: center; font-size: 15px; }

/* ---------- L'animation ---------- */
.intro-anim { gap: 14px; }
.intro-scene {
  display: block;
  width: min(92vw, 820px, calc((100dvh - 250px) * 1.6));
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--surface-3);
  cursor: pointer;
}
.intro-legende {
  margin: 0;
  max-width: 34ch;
  min-height: 2.7em;
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.1vw, 1.5rem);
  line-height: 1.3;
  text-wrap: balance;
  transition: opacity 0.3s, transform 0.3s;
}
.intro-legende.sort { opacity: 0; transform: translateY(5px); }
.intro-cadenas { display: inline-block; height: 0.85em; width: auto; vertical-align: -0.08em; margin-right: 0.35em; }
.intro-progres { display: flex; gap: 6px; width: min(220px, 50vw); }
.intro-progres span { flex: 1; height: 3px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.intro-progres i { display: block; height: 100%; width: 0; background: var(--encre); }
.intro-passer { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; }
.intro-fin { display: flex; gap: 12px; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s; min-height: 48px; }
.intro-fin.visible { opacity: 1; pointer-events: auto; }

/* ---------- Le rôle ---------- */
.role-carte { width: min(47.5rem, 100%); padding: 34px 36px; gap: 22px; }
.intro-titre { margin: 0; font: 700 clamp(1.5rem, 3.4vw, 1.9rem) / 1.2 var(--police-titre); text-wrap: balance; }
.intro-choix { width: 100%; }
.intro-note { margin: 0; font-size: 14px; color: var(--texte-doux); }
.intro-gros { min-height: 52px; padding: 0 28px; font-size: 17px; }
.role-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.role-actions .btn-lien { font-size: 15px; }
/* Les deux choix, comme la maquette : à gauche, coins nets, le choix entouré de noir. */
.intro-role .role-choix { gap: 16px; }
.intro-role .role-option {
  justify-items: start; text-align: left; gap: 12px; padding: 20px;
  border: 1.5px solid var(--bordure); border-radius: var(--rayon); background: #FFFFFF;
}
.intro-role .role-option:hover { background: #FFFFFF; border-color: var(--texte-doux); }
.intro-role .role-option[aria-checked="true"] { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); background: #FFFFFF; }
.intro-role .role-picto svg { width: 92px; }
.intro-role .role-titre { font-size: 20px; }
.intro-role .role-aide { font-size: 14px; }

/* ---------- « Pour continuer, ouvrez … » ---------- */
.intro-suite { align-items: flex-start; text-align: left; gap: 22px; max-width: 40rem; margin: 0 auto; padding-inline: 20px; }
.suite-titre { font-size: 26px; line-height: 1.25; max-width: none; }
.suite-adresse { font-family: var(--police-chiffres); font-size: 0.85em; white-space: nowrap; }

/* ---------- Téléphone, petit écran ---------- */
@media (max-width: 600px) {
  .intro-premiere { align-items: stretch; justify-content: center; padding-inline: 20px; gap: 18px; }
  .intro-marque .nom-stylise { --case: 0.25rem; }
  .premiere-fois { padding: 24px 20px; gap: 16px; }
  .premiere-fois-titre { font-size: 26px; }
  .premiere-fois-promesse { font-size: 16px; }
  .premiere-fois-boutons { flex-direction: column; }
  .premiere-fois-bouton { width: 100%; justify-content: center; }
  /* Le rôle (maquette Tel-oui) : la page entière, le titre en haut, « Continuer » en bas. */
  .intro-role { justify-content: flex-start; align-items: stretch; padding: 28px 20px max(24px, env(safe-area-inset-bottom)); }
  .role-carte { flex-grow: 1; width: 100%; padding: 0; gap: 16px; border: 0; box-shadow: none; background: transparent; }
  .role-carte .intro-titre { font-size: 26px; }
  .role-actions { margin-top: auto; flex-direction: column; align-items: stretch; gap: 8px; }
  .role-actions .btn-principal { width: 100%; justify-content: center; }
  .intro-role .role-option { padding: 16px; }
  .intro-role .role-picto svg { width: 58px; }
  .intro-role .role-titre { font-size: 18px; }
}
