/* Alpine par Vercolabs — feuille de style du site officiel.
   Palette tirée de l'icône de l'application : nuit indigo, lavande du crépuscule, abricot, clair de lune. */

@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/Barlow-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/BarlowCondensed-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/BarlowCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --nuit: #121D42;
  --indigo: #24306A;
  --lavande: #7E64A0;
  --abricot: #F6C08A;
  --abricot-fonce: #9A4E1E;
  --lune: #FFF6DF;
  --givre: #EEF2FB;
  --encre: #18214A;
  --encre-douce: #4A5378;
  --trait: #D3D9EC;
  --trait-nuit: rgba(255, 246, 223, 0.16);

  --ciel-haut: #8480a3;   /* remplacé en direct par le ciel choisi */
  --ciel-bas: #686863;

  --titre: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --texte: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mesure: 38rem;
  --large: 72rem;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--texte);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--encre);
  background: var(--givre);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--abricot); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 600; line-height: 1; letter-spacing: 0.005em; margin: 0; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(3rem, 7.2vw, 6.25rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h3 { font-family: var(--texte); font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 1em; }
.evitement { position: absolute; inset-inline-start: 1rem; top: 0; transform: translateY(-150%); background: var(--abricot); color: var(--nuit); padding: 0.6rem 1rem; z-index: 10; }
.evitement:focus { transform: none; top: 1rem; }
.cadre { max-width: var(--large); margin-inline: auto; padding-inline: var(--gouttiere); }

/* ---------------------------------------------------------------- En-tête */
.entete { background: var(--nuit); color: var(--lune); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--trait-nuit); }
.entete-int { max-width: var(--large); margin-inline: auto; padding: 0.7rem var(--gouttiere); display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.marque { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-inline-end: auto; }
.marque img { border-radius: 10px; }
.marque-nom { font-family: "Barlow Condensed", var(--titre); font-size: 1.75rem; font-weight: 600; line-height: 1; }
.marque-par { font-size: 0.85rem; color: #C9D0EA; padding-top: 0.35rem; }
.navigation { display: flex; gap: 1.6rem; }
.navigation a { text-decoration: none; font-weight: 500; font-size: 1.02rem; padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.navigation a:hover, .navigation a[aria-current="page"] { border-bottom-color: var(--abricot); }
.menu-bouton { display: none; }

@media (max-width: 760px) {
  .marque-par { display: none; }
  .menu-bouton { display: inline-block; font: inherit; font-weight: 500; color: var(--lune); background: transparent; border: 1px solid var(--trait-nuit); border-radius: 999px; padding: 0.35rem 1rem; cursor: pointer; }
  .navigation { display: none; width: 100%; flex-direction: column; gap: 0; padding-bottom: 0.6rem; }
  .navigation.ouverte { display: flex; }
  .navigation a { padding: 0.7rem 0; border-bottom: 1px solid var(--trait-nuit); }
  .navigation a[aria-current="page"] { color: var(--abricot); border-bottom-color: var(--trait-nuit); }
}

/* ---------------------------------------------------------------- Sélecteur de langue */
.langues { position: relative; }
.langues summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.04em; padding: 0.35rem 0.8rem; border: 1px solid var(--trait-nuit); border-radius: 999px; }
.langues summary::-webkit-details-marker { display: none; }
.langues summary:hover, .langues[open] summary { border-color: var(--abricot); }
.langues ul { position: absolute; inset-inline-end: 0; top: calc(100% + 0.5rem); z-index: 6; margin: 0; padding: 0.4rem; list-style: none; min-width: 13rem; max-height: min(70vh, 30rem); overflow-y: auto;
  background: var(--nuit); border: 1px solid var(--trait-nuit); border-radius: 12px; box-shadow: 0 18px 40px rgba(6, 10, 30, 0.45); }
.langues a { display: block; padding: 0.5rem 0.8rem; border-radius: 8px; text-decoration: none; }
.langues a:hover { background: var(--indigo); }
.langues a[aria-current] { color: var(--abricot); font-weight: 600; }
.note-traduction { font-size: 0.92rem; color: var(--encre-douce); background: #fff; border: 1px solid var(--trait); border-inline-start: 3px solid var(--lavande); border-radius: 6px; padding: 0.7rem 1rem; margin: 2rem 0 0; max-width: 46rem; }
.choix-langue .liste-langues { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.8rem; }
.choix-langue .liste-langues a { display: flex; flex-direction: column; gap: 0.3rem; padding: 1rem 1.1rem; border: 1px solid var(--trait); border-radius: 12px; text-decoration: none; height: 100%; }
.choix-langue .liste-langues a:hover { border-color: var(--lavande); }
.choix-langue .liste-langues strong { font-size: 1.15rem; }
.choix-langue .liste-langues span { color: var(--encre-douce); font-size: 0.95rem; }

/* ---------------------------------------------------------------- Écritures non latines (polices du système) */
html:lang(ru) { --titre: "Roboto Condensed", "Arial Narrow", system-ui, sans-serif; --texte: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
html:lang(ar) { --titre: "Noto Kufi Arabic", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; --texte: "Noto Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; }
html:lang(zh-Hans) { --titre: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif; --texte: var(--titre); }
html:lang(ja) { --titre: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, "Noto Sans CJK JP", "Noto Sans JP", sans-serif; --texte: var(--titre); }
html:lang(ko) { --titre: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", sans-serif; --texte: var(--titre); }
html:lang(ar) h1, html:lang(ar) h2, html:lang(zh-Hans) h1, html:lang(zh-Hans) h2, html:lang(ja) h1, html:lang(ja) h2, html:lang(ko) h1, html:lang(ko) h2 { line-height: 1.25; font-weight: 700; letter-spacing: 0; }
html:lang(ar) body, html:lang(zh-Hans) body, html:lang(ja) body, html:lang(ko) body { line-height: 1.75; }
html:lang(ja) body, html:lang(zh-Hans) body { word-break: normal; line-break: strict; overflow-wrap: anywhere; }
html:lang(ko) body { word-break: keep-all; }
html:lang(ja) :is(h1, h2, h3, dt, summary, figcaption) { word-break: auto-phrase; overflow-wrap: normal; }

/* ---------------------------------------------------------------- Bouton Google Play */
.bouton-play {
  display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 1.05rem;
  background: var(--abricot); color: var(--nuit); text-decoration: none;
  padding: 0.85rem 1.4rem; border-radius: 999px; border: 2px solid var(--abricot);
}
.bouton-play::before { content: ""; width: 0.9rem; height: 1rem; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.bouton-play:hover { background: var(--lune); border-color: var(--lune); }
.bouton-play.bientot { background: transparent; color: inherit; border-color: currentColor; cursor: default; opacity: 0.9; }
.bouton-play.bientot::before { clip-path: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--abricot); }
.bouton-play.petit { font-size: 0.95rem; padding: 0.55rem 1rem; }
.lien-fleche { font-weight: 600; }

/* ---------------------------------------------------------------- Ciel (accueil) */
.ciel {
  position: relative; color: var(--lune); overflow: hidden;
  background:
    radial-gradient(120% 70% at 78% 8%, color-mix(in oklab, var(--ciel-haut) 70%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in oklab, var(--ciel-haut) 38%, var(--nuit)) 0%, var(--nuit) 78%);
  transition: background-color 0.9s ease;
}
.ciel-int { max-width: var(--large); margin-inline: auto; padding: clamp(2.5rem, 6vw, 5rem) var(--gouttiere) clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.ciel h1 { max-width: 14ch; font-size: clamp(3rem, 6.2vw, 5.4rem); }
.ciel .chapo { font-size: clamp(1.15rem, 1.6vw, 1.35rem); max-width: 32rem; margin: 1.6rem 0 2rem; color: #E4E8F7; }
.ciel .actions { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.ciel .actions a.lien-fleche { color: var(--lune); }
.ciel-note { font-size: 0.95rem; color: #C9D0EA; margin-top: 2rem; max-width: 30rem; }

.telephone { justify-self: center; width: min(19rem, 78vw); }
.ecran {
  position: relative; aspect-ratio: 720 / 1560; border-radius: 2.6rem; overflow: hidden;
  border: 0.6rem solid #0B1230; background: #0B1230;
  box-shadow: 0 2.5rem 5rem -1.5rem rgba(5, 8, 25, 0.75), 0 0 0 1px rgba(255, 246, 223, 0.12);
}
.ecran img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.7s ease; }
.ecran img.cache { opacity: 0; }
.ecran::after { /* encoche discrète */
  content: ""; position: absolute; top: 0.7rem; left: 50%; width: 4.2rem; height: 1.1rem; transform: translateX(-50%);
  background: #0B1230; border-radius: 999px;
}
.choix-ciel { margin-top: 1.4rem; border: 0; padding: 0; }
.choix-ciel legend { font-size: 0.95rem; color: #C9D0EA; margin: 0 auto 0.6rem; padding: 0; text-align: center; }
.choix-ciel-liste { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.choix-ciel input { position: absolute; opacity: 0; pointer-events: none; }
.choix-ciel label {
  font-size: 0.95rem; font-weight: 500; padding: 0.35rem 0.8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--trait-nuit); color: var(--lune); user-select: none;
}
.choix-ciel input:checked + label { background: var(--lune); color: var(--nuit); border-color: var(--lune); }
.choix-ciel input:focus-visible + label { outline: 3px solid var(--abricot); outline-offset: 2px; }
.legende-ciel { text-align: center; font-size: 0.9rem; color: #C9D0EA; margin: 0.9rem 0 0; }

@media (max-width: 860px) {
  .ciel-int { grid-template-columns: 1fr; }
  .ciel h1 { max-width: 13ch; }
}

/* ---------------------------------------------------------------- Sections */
.bloc { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.bloc + .bloc { border-top: 1px solid var(--trait); }
.bloc-nuit { background: var(--nuit); color: var(--lune); }
.bloc-nuit + .bloc { border-top: 0; }
.bloc-nuit a { color: var(--lune); }
.intro { max-width: var(--mesure); }
.intro p { color: var(--encre-douce); font-size: 1.15rem; margin-top: 1.2rem; }
.bloc-nuit .intro p { color: #C9D0EA; }

.deux-colonnes { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
@media (max-width: 860px) { .deux-colonnes { grid-template-columns: 1fr; } }

.points { margin: 0; display: grid; gap: 1.8rem; }
.points dt { font-family: var(--texte); font-weight: 600; font-size: 1.25rem; }
.points dd { margin: 0.3rem 0 0; color: var(--encre-douce); max-width: 34rem; }
.bloc-nuit .points dd { color: #C9D0EA; }

/* Bande de vignettes (régions, saisons) */
.bande { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(8.4rem, 1fr); gap: 1rem; overflow-x: auto; padding: 0.3rem 0.1rem 1rem; margin-top: 2.5rem; scroll-snap-type: x mandatory; }
.bande figure { margin: 0; scroll-snap-align: start; }
.bande img { aspect-ratio: 9 / 16; width: 100%; object-fit: cover; border-radius: 1.1rem; }
.bande figcaption { margin-top: 0.55rem; font-weight: 600; }
.bande figcaption span { display: block; font-weight: 400; font-size: 0.95rem; color: var(--encre-douce); }
.bande.saisons { grid-auto-columns: minmax(7rem, 1fr); margin-top: 0; }
.contact-carte h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 2.2rem 0 0.6rem; }

.note-rendu { font-size: 0.95rem; color: var(--encre-douce); margin-top: 0.4rem; }
.bloc-nuit .note-rendu { color: #C9D0EA; }

.telechargement { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.telechargement p { margin: 0.8rem 0 0; color: #C9D0EA; }

/* ---------------------------------------------------------------- Pages de contenu */
.titre-page { background: var(--nuit); color: var(--lune); }
.titre-page .cadre { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.titre-page p { color: #C9D0EA; font-size: 1.2rem; max-width: var(--mesure); margin: 1.2rem 0 0; }
.prose > * { max-width: 44rem; }
.prose > .tableau { max-width: 56rem; }
.prose h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); margin: 3rem 0 1rem; }
.prose h3 { margin: 2rem 0 0.6rem; }
.prose h4 { font-size: 1.1rem; margin: 1.6rem 0 0.4rem; }
.prose ul { padding-inline-start: 1.2rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.35rem; }
.prose hr { border: 0; border-top: 1px solid var(--trait); margin: 3rem 0; }
.tableau { overflow-x: auto; margin: 1rem 0 1.6rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; line-height: 1.45; }
.prose th, .prose td { text-align: start; vertical-align: top; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--trait); }
.prose th { font-weight: 600; background: #E3E8F6; }
mark.a-completer { background: #FFE2B8; color: var(--abricot-fonce); padding: 0.05em 0.35em; border-radius: 4px; font-weight: 600; }

.fonction { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.fonction + .fonction { margin-top: clamp(3rem, 7vw, 5rem); }
.fonction .visuels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7rem; }
.fonction .visuels img { aspect-ratio: 9 / 16; object-fit: cover; border-radius: 1rem; width: 100%; }
.fonction h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 1rem; }
.fonction ul { padding-inline-start: 1.2rem; margin: 0; color: var(--encre-douce); }
.fonction li { margin-bottom: 0.4rem; }
.fonction.texte-seul { grid-template-columns: minmax(0, 1fr); max-width: 44rem; }
@media (max-width: 860px) { .fonction { grid-template-columns: 1fr; } }

.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; max-width: 46rem; }
.etapes > li { counter-increment: etape; position: relative; padding: 0 0 2.6rem; padding-inline-start: 4.2rem; }
.etapes > li::before {
  content: counter(etape); position: absolute; inset-inline-start: 0; top: -0.2rem;
  font-family: var(--titre); font-weight: 600; font-size: 2.6rem; line-height: 1; color: var(--lavande);
}
.etapes > li::after { content: ""; position: absolute; inset-inline-start: 1.05rem; top: 2.8rem; bottom: 0.6rem; width: 1px; background: var(--trait); }
.etapes > li:last-child::after { display: none; }
.etapes h2 { font-family: var(--texte); font-size: 1.35rem; font-weight: 600; margin-bottom: 0.4rem; }
.etapes p, .etapes ul { color: var(--encre-douce); margin-bottom: 0.6rem; }
.etapes ul { padding-inline-start: 1.2rem; }

.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--trait); }
.faq summary { cursor: pointer; list-style: none; padding: 1.2rem 0; padding-inline-end: 2.5rem; font-weight: 600; font-size: 1.2rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 0.3rem; top: 0.95rem; font-family: var(--titre); font-size: 1.8rem; color: var(--lavande); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 1.3rem; color: var(--encre-douce); }
.faq details > div p:last-child { margin-bottom: 0; }

.contact-carte { max-width: 40rem; }
.contact-carte .adresse { font-family: var(--titre); font-size: clamp(1.6rem, 4vw, 2.3rem); word-break: break-word; }
.contact-carte .adresse a { text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------- Pied de page */
.pied { background: var(--nuit); color: #C9D0EA; font-size: 1rem; }
.pied-int { max-width: var(--large); margin-inline: auto; padding: 3.5rem var(--gouttiere) 2rem; display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 2.5rem; }
.pied-titre { font-family: var(--titre); font-size: 1.45rem; color: var(--lune); margin-bottom: 0.6rem; }
.pied-liens { display: flex; flex-direction: column; gap: 0.45rem; }
.pied a { color: var(--lune); }
.pied .bouton-play { color: var(--lune); }
.pied-copyright { max-width: var(--large); margin-inline: auto; padding: 1.2rem var(--gouttiere) 2rem; border-top: 1px solid var(--trait-nuit); font-size: 0.9rem; margin-bottom: 0; }
@media (max-width: 860px) { .pied-int { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .entete, .pied, .ciel .telephone, .evitement { display: none; }
  body { background: #fff; }
}
