/* F4IOZ site — « Des messages dans le ciel » (tuto-aprs.js): the night sky and its mast, the frames cut in four, the position to
   read, the packets, the chain of relays, the length of a pass, the position to send. Only .ap-… classes (and the « Apprendre »
   cards); the site's colours, light and dark. */

.ap-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ap-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); }
.ap-cartes .cw-carte:nth-child(3n+2) { border-top-color: var(--tu-or); } .ap-cartes .cw-carte:nth-child(3n) { border-top-color: var(--tu-rose); }
.ap-cartes .cw-carte h3 { margin: 0 0 4px; font-size: 15px; }
.ap-cartes .cw-carte p, .ap-cartes .cw-carte li { margin: 0 0 8px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ap-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; }

.ap-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; }
.ap-compte { margin: 0; color: var(--tu-or); font-size: 13px; }
.ap-aide { margin: 0; font-size: 12.5px; }
.ap-ko { color: var(--tu-rouge); }
.ap-lect p { margin: 0 0 4px; font-size: 14px; overflow-wrap: anywhere; }

/* The sky of the scenes: night, a mast on a roof sending waves and, for the station, a satellite that crosses. */
.ap-ciel { padding: 0; overflow: hidden; background: #0B1B45; border-color: #2A3B63; }
.ap-svg { width: 100%; height: auto; max-height: 100%; display: block; }
.ap-etoiles circle { fill: #E8EEF6; opacity: .85; }
.ap-toit { fill: #14213D; }
.ap-mat { stroke: #E8EEF6; stroke-width: 2; fill: none; }
.ap-onde path { stroke: #FFC94D; stroke-width: 1.6; fill: none; opacity: .9; }
.ap-arc { stroke: #FF6FAE; stroke-width: 1.2; stroke-dasharray: 2 4; }
.ap-iss rect { fill: #D9E2F2; stroke: #0B1220; stroke-width: .6; }
.ap-sol { fill: #4FC3FF !important; }

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

/* The statements, the frames, the packets. */
.ap-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; overflow-wrap: anywhere; }
.ap-phrase.mono { font-size: 15px; }
.ap-trame { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; font-size: 14px; }
.ap-gros { padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border-strong); font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ap-bloc { font: inherit; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--border-strong); background: var(--panel); color: inherit; cursor: pointer; overflow-wrap: anywhere; }
.ap-bloc-src { border-color: var(--tu-or); } .ap-bloc-dst { border-color: var(--tu-ciel); } .ap-bloc-path { border-color: var(--tu-rose); } .ap-bloc-info { border-color: var(--tu-violet); }
.ap-bloc:hover:not(:disabled) { background: color-mix(in srgb, var(--tu-or) 20%, var(--panel)); }
.ap-bloc:focus-visible { outline: 3px solid var(--tu-or); outline-offset: 2px; }
.ap-bloc.juste { background: color-mix(in srgb, var(--tu-vert) 30%, var(--panel)); border-color: var(--tu-vert); }
.ap-bloc.faux { background: color-mix(in srgb, var(--tu-rouge) 25%, var(--panel)); }
.ap-sep { color: var(--tu-dim); font-weight: 800; }
.ap-consigne { margin: 0; font-weight: 700; }
.ap-cinq .tu-rep { flex: 1 1 130px; }
.ap-pre { white-space: pre; }

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

/* The chain of relays, the pass, the area. */
.ap-axe { stroke: var(--tu-grille); stroke-width: 2; }
.ap-zone { fill: color-mix(in srgb, var(--tu-ciel) 12%, transparent); stroke: var(--tu-ciel); stroke-width: 1; stroke-dasharray: 3 3; }
.ap-st circle, .ap-st rect { fill: var(--panel); stroke: var(--tu-dim); stroke-width: 2; }
.ap-st text { fill: var(--tu-dim); font: 700 9px ui-monospace, monospace; }
.ap-st.ap-ent circle, .ap-st.ap-ent rect { stroke: var(--tu-vert); }
.ap-st.ap-rep circle { fill: color-mix(in srgb, var(--tu-or) 45%, var(--panel)); stroke: var(--tu-or); }
.ap-vous circle { fill: var(--tu-or); stroke: var(--tu-or); }
.ap-igate.ap-ent rect { fill: color-mix(in srgb, var(--tu-vert) 45%, var(--panel)); }
.ap-fond-ciel { fill: color-mix(in srgb, var(--tu-ciel) 20%, var(--tu-ecran)); }
.ap-terre { fill: var(--tu-terre); }
.ap-arc2 { stroke: var(--tu-rose); stroke-width: 2; stroke-dasharray: 5 4; }
.ap-iss-pt { fill: #FFC94D; }
.ap-visee { stroke: var(--tu-or); stroke-width: 1; stroke-dasharray: 3 3; }
.ap-lbl { fill: var(--tu-dim); font: 700 11px ui-monospace, monospace; }
.ap-cercle { fill: none; stroke: var(--tu-dim); stroke-width: 1; stroke-dasharray: 2 4; opacity: .6; }
.ap-cercle-on { stroke: var(--tu-rose); stroke-width: 2.5; stroke-dasharray: none; opacity: 1; fill: color-mix(in srgb, var(--tu-rose) 14%, transparent); }
.ap-point { fill: var(--tu-or); }
.ap-svg-portee { max-height: 130px; }
.ap-portee .ap-fig, .ap-passage .ap-fig, .ap-flou .ap-fig { min-height: 0; }
.ap-flou .ap-svg { max-height: 150px; }

@media (max-width: 859px) { .ap-colonnes { grid-template-columns: 1fr; } }

/* The lessons (read before the exercise): a card that scrolls inside the frame, never the page. */
.ap-lecon { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; overflow: hidden; }
.ap-lecon-titre { margin: 0; font-size: 18px; display: flex; flex-direction: column; }
.ap-lecon-titre small { color: var(--tu-or); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ap-lecon-corps { overflow: auto; min-height: 0; padding-right: 6px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 14px; align-content: start; overscroll-behavior: contain; }
.ap-lecon-corps section { border-left: 5px solid var(--tu-ciel); padding: 2px 0 2px 10px; }
.ap-lecon-corps section:nth-child(2n) { border-left-color: var(--tu-or); } .ap-lecon-corps section:nth-child(3n) { border-left-color: var(--tu-rose); }
.ap-lecon-corps h4 { margin: 0 0 3px; font-size: 14.5px; color: var(--tu-violet); }
.ap-lecon-corps p, .ap-lecon-corps li { margin: 0 0 4px; font-size: 14px; line-height: 1.42; overflow-wrap: anywhere; }
.ap-lecon-corps ul { margin: 0 0 4px; padding-left: 18px; }
.ap-tab { border-collapse: collapse; width: 100%; font-size: 13px; margin: 2px 0 6px; }
.ap-tab th, .ap-tab td { border: 1px solid var(--border-strong); padding: 3px 7px; text-align: left; vertical-align: top; }
.ap-tab thead th { background: color-mix(in srgb, var(--tu-ciel) 18%, var(--panel)); }
.ap-tab tbody th { background: var(--panel); font-weight: 700; }

/* The episode's own pieces of the animated explanations (aprs-explique.js). */
.ap-ex-zone { fill: color-mix(in srgb, currentColor 10%, transparent); stroke: currentColor; stroke-width: 2; stroke-dasharray: 6 5; }
.ap-ex-boite { fill: color-mix(in srgb, currentColor 20%, var(--panel, #131C24)); stroke: currentColor; stroke-width: 2; }
.ap-ex-route { fill: none; stroke: var(--ex-dim); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.ap-tab th, .ap-tab td { text-transform: none; letter-spacing: normal; font-size: 13px; }
.ap-tab th { font-family: inherit; color: var(--text); }
.ap-tab thead th { font-weight: 800; color: var(--tu-violet); }
