/* F4IOZ site — « L'ISS et la radio » (tuto-iss.js): the station's plan, the callsigns' wires, the stopwatch, the five
   memories, the handheld, the repeater's queue, the APRS frame in colour, the SSTV picture, the real gallery. */

/* The plan of the station: modules to touch, solar wings that breathe. */
.iss-plan { border-radius: 16px; background: radial-gradient(ellipse at 50% 120%, #22305A, #0A1030 70%); padding: 6px; border: 1px solid var(--border-strong); }
.iss-plan svg { display: block; width: 100%; height: auto; max-height: 34vh; }
.iss-aile { animation: iss-respire 5s ease-in-out var(--delai, 0s) infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes iss-respire { from { opacity: .82; } to { opacity: 1; } }
.iss-module { cursor: pointer; outline: none; }
.iss-module rect { fill: color-mix(in srgb, var(--c) 30%, #1A2440); stroke: var(--c); stroke-width: 3; transition: fill .2s, transform .2s; transform-box: fill-box; transform-origin: center; }
.iss-module text { fill: #E8EEF6; font: 800 24px system-ui, sans-serif; }
.iss-module:hover rect, .iss-module:focus-visible rect { fill: color-mix(in srgb, var(--c) 55%, #1A2440); }
.iss-module:focus-visible rect { stroke-width: 5; }
.iss-attend .iss-module rect { animation: iss-appel 1.1s ease-in-out infinite alternate; }
@keyframes iss-appel { from { stroke-dasharray: none; } to { stroke-dasharray: 10 6; transform: scale(1.03); } }
.iss-module.iss-ok rect { fill: color-mix(in srgb, var(--tu-vert) 60%, #1A2440); }
.iss-pose { font-size: 22px; animation: iss-tombe .5s cubic-bezier(.3, 1.6, .6, 1) both; }
@keyframes iss-tombe { from { transform: translateY(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
.iss-postes .tu-rep { text-align: left; }
.iss-ico { font-size: 20px; margin-right: 6px; }

/* Linking the callsigns: two columns, coloured wires between them. */
.iss-relier { margin-top: 6px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(40px, 120px) minmax(0, 1.4fr); gap: 0; align-items: stretch; }
.iss-col { display: flex; flex-direction: column; gap: 8px; justify-content: space-around; }
.iss-col .tu-rep { border-left: 6px solid var(--tu-c, var(--border-strong)); }
.iss-ind b { font-size: 18px; letter-spacing: .04em; }
.iss-fils { width: 100%; height: 100%; overflow: visible; }
.iss-fil { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: iss-trace .7s ease-out forwards; }
@keyframes iss-trace { to { stroke-dashoffset: 0; } }

/* Kepler's stopwatch. */
.iss-chrono { align-self: center; display: flex; align-items: baseline; gap: 12px; padding: 8px 18px; border-radius: 999px; background: #0E1626; border: 2px solid var(--tu-rose); color: #E8EEF6; }
.iss-chrono b { font-size: 32px; }
.iss-chrono span { font-weight: 700; color: var(--tu-or); }
.iss-pop { animation: iss-pop .45s cubic-bezier(.3, 1.8, .6, 1); }
@keyframes iss-pop { from { transform: scale(.85); } to { transform: none; } }
.iss-memoires .tu-rep[aria-pressed="true"] { outline: 3px solid var(--tu-vert); }

/* The handheld. */
.iss-talkie { position: relative; align-self: center; width: min(260px, 70%); margin-top: 30px; padding: 16px 16px 12px; border-radius: 22px 22px 30px 30px; background: linear-gradient(160deg, #3A4252, #1C222E); border: 2px solid #565F70; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.iss-antenne { position: absolute; left: 26px; top: -42px; width: 10px; height: 46px; border-radius: 6px 6px 2px 2px; background: #2A2F38; }
.iss-ecran { padding: 8px 10px; border-radius: 8px; background: linear-gradient(#FFB45A, #F08A2A); color: #2A1404; font-size: 14px; box-shadow: inset 0 0 10px rgba(0, 0, 0, .25); }
.iss-ecran p { margin: 2px 0; }
.iss-ecran small { opacity: .7; }
.iss-bip .iss-ecran { animation: iss-allume .35s ease-out; }
@keyframes iss-allume { from { filter: brightness(1.5); } to { filter: none; } }
.iss-pret .iss-ecran { background: linear-gradient(#BFF5E0, #6FD8A8); }
.iss-clavier { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.iss-clavier i { font-style: normal; text-align: center; padding: 3px 0; border-radius: 6px; background: #2A303C; color: #C8D0DA; font-size: 12px; }
.iss-simule { margin: 10px 0 0; font-size: 11.5px; color: #FFE6B0; }

/* The repeater's queue: the stations waiting, cross when someone talks too long. */
.iss-file { display: flex; align-items: center; gap: 10px; font-size: 26px; padding: 4px 8px; }
.iss-rep { font-size: 34px; animation: iss-flotte 3s ease-in-out infinite alternate; }
.iss-file i { font-style: normal; animation: iss-attente 1.6s ease-in-out calc(var(--i) * -.3s) infinite alternate; }
@keyframes iss-attente { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@keyframes iss-flotte { from { transform: translateY(-3px) rotate(-4deg); } to { transform: translateY(3px) rotate(4deg); } }
.iss-colere i { animation: iss-secoue .5s ease-in-out 2; }
@keyframes iss-secoue { 25% { transform: translateX(-4px) rotate(-8deg); } 75% { transform: translateX(4px) rotate(8deg); } }

/* An APRS frame, a field a colour. */
.iss-vol svg { display: block; width: 100%; max-height: 120px; }
.iss-vol-iss { animation: iss-flotte 3s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.iss-paquet { offset-path: path("M40 110Q300 -40 560 110"); animation: iss-paquet 3.2s ease-in-out infinite; }
@keyframes iss-paquet { from { offset-distance: 0%; } 45%, 55% { offset-distance: 50%; } to { offset-distance: 100%; } }
.iss-trame { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 12px; border-radius: 14px; background: #0A1326; border: 1px solid var(--border-strong); font-size: clamp(14px, 2.1vw, 20px); }
.iss-champ { font: inherit; color: #0A1326; background: var(--c); border: none; border-radius: 6px; padding: 4px 5px; cursor: pointer; transition: transform .15s; }
.iss-champ:hover, .iss-champ:focus-visible { transform: translateY(-3px); box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 50%, #000); }
.iss-champ.trouve { outline: 3px solid #FFF; }
.iss-sep { color: #9AA8BA; }
.iss-info { min-height: 2.8em; margin: 0; padding: 8px 12px; border-left: 5px solid var(--c, var(--border-strong)); border-radius: 8px; background: var(--panel-2); }

/* SSTV: the sky band, the picture. */
.iss-sstv { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; align-items: center; }
.iss-bande { min-width: 0; }
.tu-app[data-tuto="tiss"] .tu-scene { overflow-x: hidden; }
.iss-image { width: 100%; height: auto; image-rendering: auto; border-radius: 10px; border: 2px solid var(--tu-ciel); background: #000; }
.iss-ecoute { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.iss-son.joue { background: color-mix(in srgb, var(--tu-vert) 30%, var(--panel-2)); animation: iss-allume 1s ease-in-out infinite alternate; }

/* The gallery: the operator's real pictures. */
.iss-galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.iss-vignette { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--panel-2); color: inherit; text-align: left; cursor: zoom-in;
  animation: iss-entre .5s cubic-bezier(.3, 1.4, .6, 1) calc(var(--i) * 90ms) both; transition: transform .2s; }
.iss-vignette:hover, .iss-vignette:focus-visible { transform: translateY(-4px) rotate(-1deg); }
.iss-vignette img { width: 100%; height: auto; border-radius: 8px; display: block; }
.iss-vignette b { font-size: 12.5px; line-height: 1.25; }
.iss-vignette small { display: block; color: var(--text-dim); font-size: 11px; }
@keyframes iss-entre { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }
.iss-grand { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: rgba(6, 10, 22, .9); border-radius: 16px; color: #E8EEF6; }
.iss-grand img { max-width: 100%; max-height: 70%; border-radius: 10px; image-rendering: auto; animation: iss-pop .4s ease-out; }
.iss-grand p { margin: 0; text-align: center; }
.iss-ferme { position: absolute; top: 10px; right: 10px; }
.iss-credit { margin: 0; font-size: 12px; }
.iss-ordre { margin: 0; padding-left: 1.6em; display: flex; flex-direction: column; gap: 6px; }
.iss-etape { padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--tu-vert) 16%, var(--panel-2)); animation: iss-entre .4s ease-out both; }

/* « Apprendre »: the frequencies. */
.iss-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.iss-table th, .iss-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }

@media (max-width: 700px) {
  .iss-sstv { grid-template-columns: 1fr; }
  .iss-relier { grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1.3fr); }
}
@media (prefers-reduced-motion: reduce) {
  .iss-aile, .iss-rep, .iss-file i, .iss-vol-iss, .iss-paquet, .iss-son.joue, .iss-attend .iss-module rect { animation: none; }
  .iss-pose, .iss-fil, .iss-pop, .iss-vignette, .iss-etape, .iss-grand img, .iss-colere i, .iss-bip .iss-ecran { animation-duration: .01s; }
  .iss-fil { stroke-dashoffset: 0; }
}
