/* Santé Cellulaire France : fenêtres photo et quiz (novembre 2026) */

/* ---------- Fenêtre photo : une grande image qui respire, et une question avant de lire ---------- */
.fenetre {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(460px, 74vh, 680px);
  display: flex; align-items: center;
  color: #fff; background: var(--abysse);
}
.fenetre-photo { position: absolute; inset: -14% 0; z-index: -2; }
.fenetre-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: var(--cadrage, center); display: block;
  transform: translate3d(0, var(--decalage, 0px), 0) scale(1.06);
  will-change: transform;
}
.fenetre::before { /* voile sombre : le texte reste lisible quelle que soit la photo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(6, 27, 63, 0.88) 0%, rgba(6, 27, 63, 0.72) 38%, rgba(6, 27, 63, 0.18) 72%, rgba(6, 27, 63, 0.05) 100%);
}
.fenetre--droite::before {
  background: linear-gradient(270deg, rgba(6, 27, 63, 0.88) 0%, rgba(6, 27, 63, 0.72) 38%, rgba(6, 27, 63, 0.18) 72%, rgba(6, 27, 63, 0.05) 100%);
}
.fenetre--droite .fenetre-carte { margin-left: auto; }
.fenetre .conteneur { width: 100%; padding-top: 48px; padding-bottom: clamp(36px, 6vw, 64px); }
.fenetre-carte { max-width: 720px; }
.fenetre-invite {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px;
  font-family: var(--titre); font-weight: 600; font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.fenetre-question {
  margin: 0 0 22px; font-family: var(--titre); font-weight: 650;
  font-size: clamp(1.45rem, 1.05rem + 1.6vw, 2.25rem); line-height: 1.15; text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.fenetre-choix, .quiz-choix { display: flex; flex-wrap: wrap; gap: 10px; }
.fenetre-choix button, .quiz-choix button {
  min-height: 46px; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font-family: var(--titre); font-weight: 600; font-size: 0.98rem; line-height: 1.2; text-align: left;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.fenetre-choix button {
  color: #fff; background: rgba(6, 27, 63, 0.35); border: 1.5px solid rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.fenetre-choix button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18); border-color: #fff; }
.fenetre-choix button:focus-visible, .quiz-choix button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* Après le choix : la bonne réponse en vert, le choix erroné barré discrètement, le reste s'efface */
.fenetre-choix button:disabled, .quiz-choix button:disabled { cursor: default; }
.repondu button { opacity: 0.45; }
.repondu button.juste { opacity: 1; background: #2B7A44; border-color: #2B7A44; color: #fff; }
.repondu button.choisi:not(.juste) { opacity: 0.85; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.fenetre-reponse, .quiz-reponse { overflow: hidden; }
.fenetre-reponse[hidden], .quiz-reponse[hidden] { display: none; }
.fenetre-reponse {
  margin-top: 20px; padding: 16px 18px; border-radius: 12px; max-width: 640px;
  background: rgba(6, 27, 63, 0.72); border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fen-apparait 0.45s ease both;
}
.fenetre-reponse p { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.55; }
.fenetre-reponse p:last-child { margin-bottom: 0; }
.fenetre-verdict { font-family: var(--titre); font-weight: 700; }
.fenetre-suite { color: #fff; font-family: var(--titre); font-weight: 600; text-underline-offset: 4px; }
.fenetre-legende {
  position: absolute; right: 14px; bottom: 10px; margin: 0; z-index: 1;
  font-family: var(--titre); font-size: 0.72rem; color: #fff;
  padding: 2px 8px; border-radius: 999px; background: rgba(6, 27, 63, 0.55);
}
@keyframes fen-apparait { from { opacity: 0; transform: translateY(8px); } }

/* Ici le texte reste aligné à gauche, même sur grand écran */
.fenetre p, .quiz p { text-align: left; hyphens: manual; }
.insecable { white-space: nowrap; }
.quiz-verdict { font-family: var(--titre); font-weight: 700; color: #fff; }

/* ---------- Trois questions pour finir ---------- */
.quiz { background: var(--abysse); color: var(--abysse-texte); }
.quiz .tete-section h2 { color: #fff; }
.quiz-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .quiz-liste { grid-template-columns: 1fr; max-width: 680px; } }
.quiz-item {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px; padding: 22px 22px 20px; display: flex; flex-direction: column;
}
.quiz-num { font-family: var(--titre); font-weight: 700; font-size: 0.85rem; color: var(--abysse-doux); margin: 0 0 8px; }
.quiz-question { font-family: var(--titre); font-weight: 650; font-size: 1.15rem; line-height: 1.3; color: #fff; margin: 0 0 16px; }
.quiz-choix { flex-direction: column; align-items: stretch; }
.quiz-choix button { color: #fff; background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.4); border-radius: 12px; }
.quiz-choix button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); border-color: #fff; }
.quiz-reponse { margin-top: 14px; animation: fen-apparait 0.4s ease both; }
.quiz-reponse p { margin: 0; font-size: 0.98rem; line-height: 1.55; }
.quiz-score {
  margin: 26px 0 0; padding: 16px 20px; border-radius: 12px; max-width: 680px;
  background: rgba(255, 255, 255, 0.08); border-left: 4px solid #7FB0F0;
  font-family: var(--titre); font-weight: 600; color: #fff;
}
.quiz-score[hidden] { display: none; }
.quiz-score button {
  margin-left: 10px; background: none; border: 0; padding: 0; cursor: pointer;
  color: #A9CBF6; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}

@media (max-width: 760px) {
  .fenetre { align-items: flex-end; }
  .fenetre::before, .fenetre--droite::before { background: linear-gradient(180deg, rgba(6, 27, 63, 0.05) 0%, rgba(6, 27, 63, 0.30) 30%, rgba(6, 27, 63, 0.88) 62%, rgba(6, 27, 63, 0.94) 100%); }
  .fenetre--droite .fenetre-carte { margin-left: 0; }
  .fenetre .conteneur { padding-top: 200px; }
}
@media (max-width: 600px) {
  .fenetre { min-height: 560px; }
  .fenetre-choix { flex-direction: column; align-items: stretch; }
  .fenetre-legende { right: 10px; bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .fenetre-photo img { transform: none; will-change: auto; }
  .fenetre-reponse, .quiz-reponse { animation: none; }
}
@media print { .fenetre { min-height: 0; } .fenetre-photo, .fenetre-choix, .quiz-choix { display: none; } }

/* ---------- Accueil : trois photos en bulles, à la place des dessins ---------- */
.heros-photos { position: relative; width: 100%; max-width: 540px; aspect-ratio: 1 / 1.02; justify-self: end; }
.bulle { position: absolute; margin: 0; }
.bulle img {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.bulle figcaption {
  position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); white-space: nowrap;
  padding: 4px 11px; border-radius: 999px; background: rgba(6, 27, 63, 0.78);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-family: var(--titre); font-weight: 600; font-size: 0.8rem; color: #fff;
}
.bulle-1 { width: 52%; aspect-ratio: 1; left: 0; top: 0; z-index: 1; }
.bulle-2 { width: 36%; aspect-ratio: 1; right: 2%; top: 4%; z-index: 2; }
.bulle-3 { width: 34%; aspect-ratio: 1; right: 0; top: 48%; z-index: 2; }
.bulle-4 { width: 40%; aspect-ratio: 1; left: 12%; top: 58%; z-index: 1; }
.bulle-1 { animation: derive 26s ease-in-out infinite; }
.bulle-2 { animation: derive 31s ease-in-out -8s infinite reverse; }
.bulle-3 { animation: derive 23s ease-in-out -4s infinite; }
.bulle-4 { animation: derive 35s ease-in-out -15s infinite reverse; }
.heros-photos-legende { position: absolute; right: 0; bottom: -26px; margin: 0; font-family: var(--titre); font-size: 0.72rem; color: var(--abysse-doux); }
@media (max-width: 860px) {
  .heros-photos { justify-self: center; max-width: 440px; margin: 20px auto 30px; }
}
@media (max-width: 420px) { .bulle figcaption { font-size: 0.72rem; padding: 3px 9px; } }
@media (prefers-reduced-motion: reduce) { .bulle-1, .bulle-2, .bulle-3, .bulle-4 { animation: none; } }

/* ---------- Spiruline : deux photos rondes dans l'en-tête ---------- */
.illu-paire { position: relative; width: 100%; aspect-ratio: 1 / 0.9; }
.illu-paire img {
  position: absolute; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.85); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}
.illu-paire img:first-child { width: 62%; left: 0; top: 0; }
.illu-paire img:last-child { width: 46%; right: 0; bottom: 0; }
.illu-paire .illu-fleche { position: absolute; width: 32px; height: auto; left: 57%; top: 45%; z-index: 2; transform: rotate(38deg); }

/* ---------- Planète : une petite Terre à côté du titre ---------- */
.heros-terre .conteneur { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(20px, 4vw, 56px); align-items: center; }
.heros-terre .fil { grid-column: 1 / -1; }
.heros-terre h1 { grid-column: 1; grid-row: 2; }
.heros-terre .chapeau { grid-column: 1; grid-row: 3; text-align: left; }
.terre-titre { grid-column: 2; grid-row: 2 / span 2; margin: 0; width: clamp(150px, 19vw, 260px); text-align: center; }
.terre-titre img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 26px rgba(6, 27, 63, 0.28)); animation: terre-tourne 40s ease-in-out infinite alternate; }
.terre-titre figcaption { font-family: var(--titre); font-size: 0.72rem; color: var(--encre-doux); margin-top: 6px; }
@keyframes terre-tourne { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .terre-titre img { animation: none; } }
@media (max-width: 700px) {
  .terre-titre { grid-row: 2; width: 92px; align-self: center; }
  .terre-titre figcaption { font-size: 0.62rem; }
  .heros-terre .chapeau { grid-column: 1 / -1; }
}

/* ---------- En-tête de page sur une image ---------- */
.heros-photo { position: relative; overflow: hidden; isolation: isolate; background: var(--abysse); color: #fff; padding: clamp(72px, 9vw, 132px) 0 clamp(80px, 9vw, 132px); }
.heros-photo-image { position: absolute; inset: 0; z-index: -2; }
.heros-photo-image img { width: 100%; height: 100%; object-fit: cover; object-position: var(--heros-pos, 70% 50%); display: block; }
.heros-photo::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(6, 27, 63, 0.92) 0%, rgba(6, 27, 63, 0.80) 42%, rgba(6, 27, 63, 0.30) 75%, rgba(6, 27, 63, 0.12) 100%);
}
.heros-photo h1 { color: #fff; max-width: 21ch; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3); }
.heros-photo .chapeau, .heros-photo .etude-maj { color: var(--abysse-texte); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); }
.heros-photo .fil, .heros-photo .fil a { color: var(--abysse-texte) !important; }
.heros-photo p { text-align: left; }
.heros-photo-legende { max-width: min(92%, 520px); text-align: right; }
@media (max-width: 760px) {
  .heros-photo::before { background: linear-gradient(180deg, rgba(6, 27, 63, 0.70) 0%, rgba(6, 27, 63, 0.86) 55%, rgba(6, 27, 63, 0.92) 100%); }
  .heros-photo-legende { left: 10px; right: 10px; max-width: none; text-align: left; border-radius: 10px; }
}
