/* F4IOZ site — « Le miroir invisible » (tuto-atmosphere.js): the lift, the mirror, the layers, the hops, the clock, the K bars.
   Only .at-… classes (and the « Apprendre » cards); the site's colours, light and dark. */

.at-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 12px; }
.at-cartes .cw-carte { padding: 10px 12px 4px; border-radius: 14px; background: linear-gradient(150deg, color-mix(in srgb, var(--tu-ciel) 9%, var(--panel-2)), var(--panel-2)); border: 1px solid var(--border-strong); border-top: 4px solid var(--tu-ciel); }
.at-cartes .cw-carte:nth-child(3n+2) { border-top-color: var(--tu-or); } .at-cartes .cw-carte:nth-child(3n) { border-top-color: var(--tu-rose); }
.at-cartes .cw-carte h3 { margin: 0 0 4px; font-size: 15px; }
.at-cartes .cw-carte p, .at-cartes .cw-carte li { margin: 0 0 8px; font-size: 13.5px; line-height: 1.45; }
.at-cartes .cw-carte ul { margin: 0 0 8px; padding-left: 18px; }
.tu-apprendre .cw-loin { margin: 6px 0 12px; padding: 8px 12px; border-radius: 14px; border: 1px dashed var(--border-strong); background: var(--panel); }
.tu-apprendre .cw-loin summary { cursor: pointer; font-weight: 800; color: var(--tu-violet); }
.tu-apprendre .cw-loin li { font-size: 13px; line-height: 1.5; margin-bottom: 4px; }

.at-panneau { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(150deg, color-mix(in srgb, var(--tu-ciel) 9%, var(--panel-2)), var(--panel-2)); border: 1px solid var(--border-strong); min-height: 0; }
.at-compte { margin: 0; color: var(--tu-or); font-size: 13px; }
.at-mon { margin: 0; font-weight: 800; }
.at-aide { margin: 0; font-size: 12.5px; }
.at-ko { color: var(--tu-rouge); margin: 0; }

/* The sky of the scenes: night, a fixed satellite, a dish, and (to compare) the arc of a satellite that crosses. */
.at-ciel { padding: 0; overflow: hidden; background: #0B1B45; border-color: #2A3B63; }
.at-svg { width: 100%; height: auto; max-height: 100%; display: block; }
.at-etoiles circle { fill: #E8EEF6; opacity: .85; }

.at-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 4px; width: 100%; }
.at-form label { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--text-dim); flex: 1 1 200px; }
.at-form input[type="range"] { width: 100%; accent-color: var(--tu-or); }
.at-form input:not([type="range"]), .at-form select { padding: 8px 10px; border-radius: 10px; border: 2px solid var(--border-strong); background: var(--panel); color: inherit; font-size: 16px; }
.at-form input:focus-visible, .at-form select:focus-visible { outline: 3px solid var(--tu-or); outline-offset: 1px; }

/* The statements, the rules. */
.at-phrase { margin: 0; padding: 10px 14px; border-left: 6px solid var(--tu-violet); border-radius: 8px; background: var(--panel); font-size: 18px; font-weight: 700; line-height: 1.4; }

/* The match. */
.at-colonnes { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(0, 2.4fr); gap: 10px; }
.at-acteurs, .at-roles { display: flex; flex-direction: column; gap: 6px; }
.at-acteur, .at-role { text-align: left; font-size: 13.5px; line-height: 1.35; }
.at-acteur[aria-pressed="true"] { outline: 3px solid var(--tu-or); background: color-mix(in srgb, var(--tu-or) 28%, var(--panel)); }
.at-bon { background: color-mix(in srgb, var(--tu-vert) 26%, var(--panel)) !important; border-color: var(--tu-vert) !important; }

/* The dish to point. */
.at-fond-ciel { fill: color-mix(in srgb, var(--tu-ciel) 20%, var(--tu-ecran)); }
.at-sol { fill: var(--tu-terre); }
.at-lbl { fill: var(--tu-dim); font: 700 9px ui-monospace, monospace; }



/* Common drawing. */
.at-svg { width: 100%; height: auto; max-height: 100%; display: block; border-radius: 10px; }
.at-svg-bas { max-height: 90px; }
.at-etoiles circle { fill: #E8EEF6; opacity: .85; }
.at-iono { fill: none; stroke: #7CF0FF; stroke-width: 6; opacity: .28; } .at-iono2 { stroke: #B59CFF; stroke-width: 4; opacity: .25; }
.at-sol-svg { fill: var(--tu-terre); }
.at-mat { stroke: #E8EEF6; stroke-width: 2; fill: none; }
.at-trajet { stroke: #FFC94D; stroke-width: 1.4; stroke-dasharray: 3 4; opacity: .85; }
.at-fond-ciel { fill: color-mix(in srgb, var(--tu-ciel) 20%, var(--tu-ecran)); }
.at-fond-jour { fill: #5FB4F0; } .at-fond-nuit { fill: #0B1B45; }
.at-soleil { fill: #FFC94D; filter: drop-shadow(0 0 5px #FFC94D); } .at-lune { fill: #E8EEF6; } .at-lune-disque { fill: #E8EEF6; }
.at-lbl { fill: var(--tu-dim); font: 700 9px ui-monospace, monospace; }
.at-lbl-ion { fill: #0B1220; font-size: 10px; }
.at-graduation { stroke: var(--tu-grille); stroke-width: 1; }
.at-rayon { stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.at-revient { stroke: #FFC94D; } .at-perdu { stroke: #FF6FAE; stroke-dasharray: 5 4; }
.at-impact { fill: #4FE08A; } .at-emetteur { fill: #FFC94D; }
.at-couche-f { fill: #B59CFF; opacity: .55; } .at-couche-arc { stroke: #B59CFF; stroke-width: 3; opacity: .75; }
.at-oui { color: var(--tu-vert); font-weight: 800; margin: 0; } .at-non { color: var(--tu-rose); font-weight: 800; margin: 0; }

/* The lift. */
.at-asc { flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: 14px; }
.at-asc-fig { flex: 0 1 150px; min-width: 110px; } .at-asc-fig .at-svg { max-height: 250px; background: transparent; }
.at-asc-lect { flex: 1 1 200px; font-size: 14px; } .at-asc-lect p { margin: 0 0 6px; }
.at-b-tropo { fill: #59B7F0; } .at-b-strato { fill: #7A8CFF; } .at-b-meso { fill: #B07CFF; } .at-b-thermo { fill: #FF8A5C; }
.at-t-tropo { color: #59B7F0; } .at-t-strato { color: #7A8CFF; } .at-t-meso { color: #B07CFF; } .at-t-thermo { color: #FF8A5C; } .at-t-exo { color: var(--tu-dim); }
.at-ascenseur rect { fill: #FFC94D; stroke: #0B1220; stroke-width: 1; } .at-ascenseur circle { fill: #0B1220; }
.at-cible { margin: 0; font-size: 15px; flex: 1 1 100%; } .at-fait { color: var(--text-dim); font-size: 13px; }
.at-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-top: 4px; width: 100%; }
.at-form select { padding: 8px 10px; border-radius: 10px; border: 2px solid var(--border-strong); background: var(--panel); color: inherit; font-size: 16px; }

/* The mirror, the layers. */
.at-miroir, .at-saut, .at-coupe { gap: 6px; }
.at-mir-fig, .at-coupe-fig, .at-saut-fig { min-height: 0; }
.at-mir-fig .at-svg, .at-saut-fig .at-svg, .at-coupe-fig .at-svg { max-height: 170px; }
.at-ion-d { fill: #FF9A4D; } .at-ion-e { fill: #FFC94D; } .at-ion-f1 { fill: #B59CFF; } .at-ion-f2 { fill: #7CF0FF; }
.at-jn { display: flex; gap: 8px; } .at-jn [aria-pressed="true"] { outline: 3px solid var(--tu-or); background: color-mix(in srgb, var(--tu-or) 28%, var(--panel)); }
.at-legende { margin: 0; font-size: 13.5px; min-height: 2.6em; }
.at-es { fill: #FF6FAE; opacity: .7; } .at-inversion { fill: #FF9A4D; opacity: .35; } .at-aurore { stroke: #4FE08A; stroke-width: 5; opacity: .6; stroke-linecap: round; }

/* The clock. */
.at-horloge { gap: 6px; }
.at-act { border: 0; padding: 0; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.at-act legend { font-weight: 800; color: var(--text-dim); padding: 0; margin-right: 6px; float: left; }
.at-radio { flex-direction: row !important; align-items: center; gap: 4px !important; flex: 0 0 auto !important; }
.at-hlect { font-size: 13px; }
.at-bandes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.at-bande { display: flex; flex-direction: column; padding: 5px 8px; border-radius: 10px; border: 2px solid var(--border-strong); font-size: 12px; }
.at-e-ouverte { background: color-mix(in srgb, var(--tu-vert) 26%, var(--panel)); border-color: var(--tu-vert); }
.at-e-limite { background: color-mix(in srgb, var(--tu-or) 24%, var(--panel)); border-color: var(--tu-or); }
.at-e-fermee { background: var(--panel); opacity: .72; }

/* The K bars. */
.at-fond-k { fill: var(--tu-ecran); }
.at-kbar { fill: #4FE08A; } .at-kg1 { fill: #C8E04F; } .at-kg2 { fill: #FFC94D; } .at-kg3 { fill: #FF9A4D; } .at-kg4 { fill: #FF6464; } .at-kg5 { fill: #FF3D9A; }
.at-seuil { stroke: var(--tu-rose); stroke-dasharray: 4 3; stroke-width: 1.2; }
.at-gchoix { flex-wrap: wrap; }

@media (max-width: 859px) { .at-colonnes { grid-template-columns: 1fr; } .at-asc-fig { flex-basis: 100%; } }

/* The lessons (« À retenir avant l'exercice »): a card that fills the scene, its body scrolls inside, never the page. */
.at-lecon { display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 6px 14px; overflow: hidden; flex: 1 1 auto; min-height: 0; }
.at-lecon-fig { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.at-lecon-titre { grid-column: 1 / -1; margin: 0; font-size: 18px; display: flex; flex-direction: column; gap: 0; }
.at-lecon-titre small { color: var(--tu-or); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.at-lecon-corps { overflow: auto; min-height: 0; padding-right: 6px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.at-lecon-corps section { border-left: 5px solid var(--tu-ciel); padding: 2px 0 2px 10px; }
.at-lecon-corps section:nth-child(2n) { border-left-color: var(--tu-or); } .at-lecon-corps section:nth-child(3n) { border-left-color: var(--tu-rose); }
.at-lecon-corps h4 { margin: 0 0 3px; font-size: 14.5px; color: var(--tu-violet); }
.at-lecon-corps p, .at-lecon-corps li { margin: 0 0 4px; font-size: 14px; line-height: 1.42; }
.at-lecon-corps ul { margin: 0 0 4px; padding-left: 18px; }
.at-lecon-figure { min-height: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; overflow: auto; }
.at-lecon-figure .at-svg { max-height: 260px; }
.at-tab-cadre { overflow-x: auto; margin: 2px 0 6px; }
.at-tab { border-collapse: collapse; font-size: 13px; line-height: 1.35; width: 100%; }
.at-tab th, .at-tab td { border: 1px solid var(--border-strong); padding: 3px 6px; text-align: left; vertical-align: top; }
.at-tab thead th { background: color-mix(in srgb, var(--tu-ciel) 18%, var(--panel)); }
.at-tab tbody th { background: color-mix(in srgb, var(--tu-or) 12%, var(--panel)); white-space: nowrap; }
.at-liste { line-height: 1.6; } .at-liste small { color: var(--tu-or); font-weight: 800; }

/* The animated explanations' own drawings (atmo-explique.js). */
.ax-b { stroke: none; opacity: .32; } .ax-b-tropo { fill: #59B7F0; } .ax-b-strato { fill: #7A8CFF; } .ax-b-meso { fill: #B07CFF; } .ax-b-thermo { fill: #FF8A5C; }
.ax-iono { fill: color-mix(in srgb, var(--ex-c0) 40%, transparent); stroke: var(--ex-c0); stroke-width: 1.5; }
.ax-fenetre { fill: color-mix(in srgb, var(--ex-c2) 16%, transparent); stroke: none; }
.ax-ferme { fill: var(--ex-dim); opacity: .55; }
.ax-tirets { stroke-dasharray: 6 5; }
.ax-es { fill: #FF6FAE; opacity: .75; } .ax-inversion { fill: #FF9A4D; opacity: .38; } .ax-aurore { fill: none; stroke: #4FE08A; stroke-width: 6; opacity: .65; stroke-linecap: round; }
.ax-soleil { fill: #FFC94D; filter: drop-shadow(0 0 10px #FFC94D); } .ax-coupure { fill: #FF5C7A; opacity: .75; }
.ax-ovale { fill: none; stroke: #4FE08A; stroke-width: 3; } .ax-cme { fill: #FF9A4D; opacity: .55; }
.ax-kg0 { fill: #4FE08A; } .ax-kg1 { fill: #C8E04F; } .ax-kg2 { fill: #FFC94D; } .ax-kg3 { fill: #FF9A4D; } .ax-kg4 { fill: #FF6464; } .ax-kg5 { fill: #FF3D9A; }
.ax-max { stroke: var(--ex-texte); stroke-width: 2.5; }
.ax-lit { fill: color-mix(in srgb, var(--ex-c1) 22%, transparent); stroke: var(--ex-c1); stroke-width: 1.5; }
.ax-suivi { fill: color-mix(in srgb, var(--ex-c3) 30%, transparent); stroke: var(--ex-c3); stroke-width: 1.5; }

@media (max-width: 859px) { .at-lecon-fig { grid-template-columns: 1fr; } .at-lecon { overflow: visible; } .at-lecon-corps { overflow: visible; } }

/* In this episode's scene, the explanation's picture takes the whole width, its caption goes under it (the scene is narrow and tall). */
@media (min-width: 860px) {
  [data-tuto="tatmosphere"] .tu-scene > .ex-lecteur .ex-cadre { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  [data-tuto="tatmosphere"] .tu-scene > .ex-lecteur .ex-cote { max-height: 128px; }
  [data-tuto="tatmosphere"] .tu-scene > .ex-lecteur .ex-titre { font-size: 16px; }
  [data-tuto="tatmosphere"] .tu-scene > .ex-lecteur .ex-legende { font-size: 14px; }
}
