/* ==========================================================================
   VIGIE — École SSA Opale Lifeguard
   Palette issue du logo : bleu canard, rouge bouée, blanc écume, encre marine.
   ========================================================================== */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument"; src: url("../fonts/instrument-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --teal-900: #0E2C38;
  --teal-800: #143B4A;
  --teal-700: #1C4A5C;
  --teal-600: #2F6378;
  --teal-400: #5E95A8;
  --teal-200: #BFD9E0;
  --teal-100: #E2EEF1;
  --red: #E3202B;
  --red-700: #B9141E;
  --red-100: #FDE7E8;
  --ink: #141A2E;
  --ink-2: #3B4256;
  --ink-3: #6B7185;
  --sand: #F4F1EA;
  --sand-2: #EBE6DA;
  --paper: #FFFDF9;
  --line: #DDD6C6;
  --gold: #E7A817;
  --green: #2E8B57;
  --violet: #6C4FB3;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20,26,46,.06), 0 8px 24px -8px rgba(20,26,46,.18);
  --shadow-lg: 0 2px 4px rgba(20,26,46,.06), 0 24px 48px -16px rgba(14,44,56,.35);
  --display: "Bricolage", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --tabbar-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--sand); color: var(--ink);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: var(--tabbar-h);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-600); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.9rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
strong { font-weight: 600; }
.ico { flex: none; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }

/* ------------------------------------------------------------ Annonce */
.announce {
  display: flex; gap: 10px; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-weight: 600; font-size: .92rem;
  padding: 9px 16px; text-align: center;
}

/* ------------------------------------------------------------ Topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,241,234,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); background: rgba(244,241,234,.95); }
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 44px; height: 44px; filter: drop-shadow(0 3px 6px rgba(14,44,56,.25)); transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.brand:hover img { transform: rotate(-12deg) scale(1.06); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--display); font-size: 1.45rem; letter-spacing: -.03em; }
.brand__text small { font-size: .74rem; color: var(--ink-3); font-weight: 500; letter-spacing: .02em; }
.nav { display: flex; gap: 4px; }
.nav__link {
  position: relative; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.nav__link:hover { background: var(--sand-2); color: var(--ink); }
.nav__link.is-active { color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.nav__link.is-active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--red); }

/* ----------------------------------------------------------- Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
  background: var(--ink); color: #fff; transition: transform .15s, background .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); color: #fff; background: var(--teal-800); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--red { background: var(--red); }
.btn--red:hover { background: var(--red-700); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--sand); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn--ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); }
.btn--ghost-light:hover { background: rgba(255,255,255,.18); border-color: #fff; }
.btn--small { padding: 9px 15px; font-size: .88rem; }
.btn--block { width: 100%; }

/* ------------------------------------------------------ Ligne d'eau */
.lane {
  height: 14px;
  background:
    radial-gradient(circle at 7px 7px, var(--red) 5px, transparent 5.5px) 0 0 / 28px 14px repeat-x,
    radial-gradient(circle at 7px 7px, #fff 5px, transparent 5.5px) 14px 0 / 28px 14px repeat-x,
    linear-gradient(transparent 6px, rgba(20,26,46,.25) 6px, rgba(20,26,46,.25) 8px, transparent 8px);
}
.lane--dark { background:
    radial-gradient(circle at 7px 7px, var(--red) 5px, transparent 5.5px) 0 0 / 28px 14px repeat-x,
    radial-gradient(circle at 7px 7px, #F0F0F5 5px, transparent 5.5px) 14px 0 / 28px 14px repeat-x,
    linear-gradient(transparent 6px, rgba(255,255,255,.3) 6px, rgba(255,255,255,.3) 8px, transparent 8px); }

/* ---------------------------------------------------------------- Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--teal-700);
  isolation: isolate;
}
.hero::before { /* reflets de lumière dans l'eau */
  content: ""; position: absolute; inset: -40%; z-index: -2;
  background:
    radial-gradient(ellipse 30% 18% at 20% 30%, rgba(255,255,255,.10), transparent 70%),
    radial-gradient(ellipse 25% 15% at 70% 20%, rgba(127,209,217,.18), transparent 70%),
    radial-gradient(ellipse 35% 22% at 60% 75%, rgba(255,255,255,.07), transparent 70%),
    radial-gradient(ellipse 20% 12% at 30% 80%, rgba(127,209,217,.14), transparent 70%),
    linear-gradient(160deg, var(--teal-600) 0%, var(--teal-700) 45%, var(--teal-900) 100%);
  animation: caustics 18s ease-in-out infinite alternate;
}
.hero::after { /* carrelage du bassin */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
@keyframes caustics { 0% { transform: translate(0,0) rotate(0deg); } 100% { transform: translate(4%, -3%) rotate(4deg); } }
.hero__grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; padding: 72px 0 120px; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--red); background: #fff; padding: 0 .18em; border-radius: .18em; display: inline-block; transform: rotate(-2deg); box-shadow: 0 6px 0 rgba(0,0,0,.15); }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.86); max-width: 34em; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-600); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--red); }
.hero .eyebrow { color: #9FD3DC; }
.hero__logo { position: relative; justify-self: center; width: min(100%, 380px); }
.hero__logo img { width: 100%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)); animation: float 6s ease-in-out infinite; }
.hero__ring { position: absolute; inset: -8%; border: 2px dashed rgba(255,255,255,.22); border-radius: 50%; animation: spin 60s linear infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(2deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; pointer-events: none; }
.waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
.waves .w1 { fill: rgba(244,241,234,.35); animation: drift 14s linear infinite; }
.waves .w2 { fill: var(--sand); animation: drift 9s linear infinite reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------- Chronos */
.chronos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -64px; position: relative; z-index: 2; }
.chrono {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink);
  border: 1px solid rgba(255,255,255,.6); transition: transform .2s;
}
.chrono:hover { transform: translateY(-4px); color: var(--ink); }
.chrono__label { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.chrono__time { font-family: var(--display); font-size: 3.2rem; line-height: 1; letter-spacing: -.04em; font-weight: 800; font-variant-numeric: tabular-nums; }
.chrono__time small { font-size: .4em; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 4px; }
.chrono__desc { font-size: .92rem; color: var(--ink-2); }
.chrono--red .chrono__time { color: var(--red); }
.chrono--teal .chrono__time { color: var(--teal-600); }

/* ------------------------------------------------------------ Sections */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--paper { background: var(--paper); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section__head h2 { margin: 0; }
.section__head p { margin: 8px 0 0; color: var(--ink-3); max-width: 36em; }

/* --------------------------------------------------------- Page header */
.pagehead { position: relative; overflow: hidden; background: var(--teal-700); color: #fff; padding: 64px 0 96px; isolation: isolate; }
.pagehead::before { content: ""; position: absolute; inset: -40%; z-index: -1;
  background: radial-gradient(ellipse 30% 20% at 80% 30%, rgba(127,209,217,.2), transparent 70%), radial-gradient(ellipse 30% 20% at 10% 80%, rgba(255,255,255,.08), transparent 70%), linear-gradient(160deg, var(--teal-600), var(--teal-900));
  animation: caustics 18s ease-in-out infinite alternate; }
.pagehead h1 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 3.8rem); margin-bottom: .25em; }
.pagehead p { color: rgba(255,255,255,.82); font-size: 1.1rem; max-width: 40em; margin: 0; }
.pagehead .eyebrow { color: #9FD3DC; }
.pagehead__mark { position: absolute; right: max(16px, calc(50% - 590px)); top: 50%; width: 220px; transform: translateY(-50%) rotate(-10deg); opacity: .14; z-index: -1; }
.pagehead + .wrap, .pagehead + .content { position: relative; margin-top: -48px; }

/* -------------------------------------------------------------- Cartes */
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border: 1px solid rgba(221,214,198,.6); }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --------------------------------------------------------- Événements */
.event {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 18px; align-items: center;
  background: var(--paper); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  border: 1px solid rgba(221,214,198,.6); transition: transform .15s, box-shadow .15s;
}
.event:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.event__date {
  width: 74px; height: 80px; border-radius: 14px; background: var(--teal-700); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; position: relative; overflow: hidden;
}
.event__date::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--red); }
.event__day { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.event__num { font-family: var(--display); font-size: 2rem; font-weight: 800; margin: 3px 0 2px; }
.event__mon { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.event__body h3 { font-size: 1.15rem; margin: 6px 0 4px; }
.event__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-3); font-size: .9rem; }
.event__meta span { display: inline-flex; align-items: center; gap: 6px; }
.event__desc { margin: 8px 0 0; color: var(--ink-2); font-size: .94rem; }
.event__desc ul { margin: 4px 0; padding-left: 20px; }
.event--past { opacity: .62; box-shadow: none; }
.event--past .event__date { background: var(--ink-3); }
.events { display: grid; gap: 14px; }
.month { font-family: var(--display); font-size: 1.1rem; text-transform: capitalize; color: var(--ink-3); margin: 28px 0 12px; display: flex; align-items: center; gap: 12px; }
.month::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.month:first-child { margin-top: 0; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; letter-spacing: .03em; padding: 4px 10px; border-radius: 999px; background: var(--sand-2); color: var(--ink-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--teal { background: var(--teal-100); color: var(--teal-600); }
.badge--red { background: var(--red-100); color: var(--red-700); }
.badge--gold { background: #FCF1D6; color: #9A6A00; }
.badge--navy { background: #E3E5EE; color: var(--ink); }
.badge--violet { background: #ECE7F8; color: var(--violet); }
.badge--green { background: #E2F2E9; color: var(--green); }
.badge--grey { background: var(--sand-2); color: var(--ink-3); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: all .15s;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; }
.chips--scroll::-webkit-scrollbar { display: none; }

/* ------------------------------------------------------------ Séances */
.tcard {
  position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--paper); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid rgba(221,214,198,.6);
  transition: transform .2s, box-shadow .2s; overflow: hidden;
}
.tcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(var(--red) 0 50%, #fff 50% 100%); background-size: 5px 22px; }
.tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.tcard__date { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--teal-600); }
.tcard h3 { margin: 0; font-size: 1.3rem; }
.tcard p { margin: 0; color: var(--ink-2); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .86rem; color: var(--ink-3); }
.tcard__go { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--teal-100); color: var(--teal-700); }
.tcard__num { position: absolute; right: 16px; top: 10px; font-family: var(--display); font-size: 3.6rem; font-weight: 800; color: var(--sand-2); line-height: 1; letter-spacing: -.04em; z-index: 0; }
.tcard > *:not(.tcard__num) { position: relative; z-index: 1; }

/* Détail d'une séance */
.session { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.session__aside { position: sticky; top: 92px; display: grid; gap: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact { background: var(--sand); border-radius: 12px; padding: 12px 14px; }
.fact span { display: block; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.fact strong { font-family: var(--display); font-size: 1.25rem; }
.objective { font-size: 1.1rem; color: var(--ink-2); border-left: 4px solid var(--red); padding: 4px 0 4px 18px; margin: 0 0 28px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 2px; background: repeating-linear-gradient(var(--teal-200) 0 8px, transparent 8px 14px); }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding-bottom: 18px; }
.step__dot {
  width: 56px; height: 56px; border-radius: 50%; background: var(--paper); border: 2px solid var(--teal-600); color: var(--teal-700);
  display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 1.15rem; z-index: 1;
  box-shadow: 0 0 0 6px var(--sand);
}
.step:first-child .step__dot { background: var(--red); border-color: var(--red); color: #fff; }
.step__card { background: var(--paper); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid rgba(221,214,198,.6); }
.step__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 8px; }
.step__top h3 { margin: 0; font-size: 1.2rem; }
.step__time { font-weight: 600; font-size: .86rem; color: var(--teal-600); background: var(--teal-100); padding: 3px 9px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.step__dist { font-weight: 600; font-size: .86rem; color: var(--ink-3); }
.step__content { color: var(--ink); }
.step__content ul { margin: 6px 0; padding-left: 20px; }
.step__tip { margin-top: 12px; display: flex; gap: 10px; background: #FFF6E3; border-radius: 10px; padding: 10px 12px; font-size: .92rem; color: #5B4300; }
.step__tip .ico { color: var(--gold); margin-top: 2px; }
.callout { border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; }
.callout--teal { background: var(--teal-100); color: var(--teal-900); }
.callout--red { background: var(--red-100); color: #5E0A10; }
.callout--sand { background: #FFF6E3; color: #4A3700; }
.callout h4 { font-size: 1rem; margin: 0 0 4px; font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.callout p:last-child { margin: 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: var(--ink); color: var(--ink); }
.pager small { color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pager .is-next { text-align: right; align-items: end; }

/* Mode bord de bassin : gros caractères, contraste maximal */
body.poolside { background: #000; }
body.poolside .topbar, body.poolside .footer, body.poolside .tabbar, body.poolside .pagehead, body.poolside .session__aside, body.poolside .pager, body.poolside .announce { display: none !important; }
body.poolside .poolbar { display: flex; }
body.poolside .session { grid-template-columns: 1fr; }
body.poolside .content, body.poolside .wrap { margin-top: 0 !important; }
body.poolside .step__card { background: #111; color: #fff; border-color: #333; font-size: 1.3rem; box-shadow: none; }
body.poolside .step__top h3 { color: #fff; font-size: 1.8rem; }
body.poolside .step__content { color: #fff; }
body.poolside .step__dot { box-shadow: 0 0 0 6px #000; background: #111; color: #fff; }
body.poolside .timeline::before { background: repeating-linear-gradient(#335 0 8px, transparent 8px 14px); }
body.poolside .objective, body.poolside .session h2 { color: #fff; font-size: 1.4rem; }
body.poolside .card, body.poolside .callout { background: #111; border-color: #333; color: #fff; box-shadow: none; }
body.poolside .callout h4 { color: #fff; }
body.poolside .step__tip { background: #2A2200; color: #FFE7A3; }
.poolbar { display: none; position: sticky; top: 0; z-index: 60; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: #000; color: #fff; border-bottom: 1px solid #222; }
.poolbar__clock { font-family: var(--display); font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- Cours */
.catnav { position: sticky; top: 72px; z-index: 10; background: rgba(244,241,234,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 12px 0; margin-bottom: 8px; }
.cat { margin-bottom: 48px; }
.cat__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.cat__head h2 { font-size: 1.8rem; margin: 0; }
.cat__head p { margin: 0; color: var(--ink-3); }
.doc {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: var(--paper); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid rgba(221,214,198,.6);
}
.doc__icon { width: 56px; height: 64px; border-radius: 10px; background: var(--teal-700); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative; font-size: .64rem; font-weight: 700; letter-spacing: .05em; }
.doc__icon::after { content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 14px 14px 0; border-color: transparent var(--sand) rgba(255,255,255,.35) transparent; }
.doc__icon--PDF { background: var(--red); }
.doc__icon--Vidéo { background: var(--ink); }
.doc__icon--PowerPoint { background: #C4561E; }
.doc__icon--Word { background: #2B5797; }
.doc__icon--Image { background: var(--violet); }
.doc__icon--lien { background: var(--teal-600); }
.doc h3 { font-size: 1.12rem; margin: 0 0 4px; }
.doc__desc { color: var(--ink-2); font-size: .94rem; margin: 0 0 10px; }
.doc__desc ul { margin: 4px 0; padding-left: 20px; }
.doc__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.doc__meta { font-size: .8rem; color: var(--ink-3); }

/* --------------------------------------------------------------- SSA */
.ssa-tabs { position: sticky; top: 72px; z-index: 10; background: rgba(244,241,234,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 12px 0; }
.block { padding: 56px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block__grid { display: grid; grid-template-columns: 300px 1fr; gap: 48px; }
.block__side h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.block__num { font-family: var(--display); font-weight: 800; font-size: 5rem; line-height: .9; color: transparent; -webkit-text-stroke: 2px var(--teal-200); display: block; margin-bottom: 8px; }
.block__side p { color: var(--ink-3); }
.lead { font-size: 1.12rem; color: var(--ink-2); }
.checklist { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border-radius: 12px; padding: 12px 14px; border: 1px solid rgba(221,214,198,.6); }
.checklist .ico { color: var(--green); margin-top: 3px; }
.checklist strong { display: block; }
.parcours { list-style: none; margin: 0 0 20px; padding: 0; counter-reset: p; display: grid; gap: 0; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.parcours li { counter-increment: p; display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px dashed var(--line); }
.parcours li:last-child { border-bottom: 0; }
.parcours li::before { content: counter(p); width: 38px; height: 38px; border-radius: 50%; background: var(--teal-700); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; }
.parcours__dist { font-family: var(--display); font-weight: 700; color: var(--teal-600); font-size: 1.05rem; white-space: nowrap; }
.pool { position: relative; height: 92px; border-radius: 14px; background: linear-gradient(180deg, #4FA3B8, #2F7E93); overflow: hidden; margin: 8px 0 22px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.25); }
.pool__lanes { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 28px, rgba(255,255,255,.0) 28px), linear-gradient(90deg, transparent 59.5%, rgba(255,255,255,.7) 59.5% 60%, transparent 60%); }
.pool__seg { position: absolute; top: 18px; height: 56px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .78rem; text-align: center; line-height: 1.1; border-radius: 10px; padding: 0 4px; }
.pool__seg--apnee { background: rgba(14,44,56,.55); border: 2px dashed rgba(255,255,255,.6); }
.pool__seg--nage { background: rgba(255,255,255,.18); }
.pool__marker { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--red); }
.pool__marker span { position: absolute; top: 4px; left: 6px; color: #fff; font-size: .7rem; font-weight: 700; background: var(--red); padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.pool__labels { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-3); margin-top: -16px; margin-bottom: 20px; }
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.rule { background: var(--paper); border-radius: 12px; padding: 14px 16px; border: 1px solid rgba(221,214,198,.6); font-size: .95rem; }
.rule strong { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 2px; }
.rule--no { border-left: 4px solid var(--red); }
.rule--yes { border-left: 4px solid var(--green); }
.table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: .95rem; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--sand-2); vertical-align: top; }
.table th { background: var(--ink); color: #fff; font-weight: 600; font-size: .85rem; letter-spacing: .02em; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 20px; }
.split__card { border-radius: var(--radius); padding: 22px; color: #fff; position: relative; overflow: hidden; }
.split__card h3 { color: #fff; margin-bottom: 6px; }
.split__card p { margin: 0; color: rgba(255,255,255,.85); }
.split__card .big { font-family: var(--display); font-size: 3rem; font-weight: 800; line-height: 1; display: block; margin-bottom: 8px; }
.split__card--teal { background: var(--teal-700); }
.split__card--red { background: var(--red); }
.split__card--ink { background: var(--ink); }

/* Calculateur d'allure */
.calc { background: var(--ink); color: #fff; border-radius: 24px; padding: 28px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; position: relative; overflow: hidden; }
.calc::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 30px solid rgba(255,255,255,.04); }
.calc h3 { color: #fff; font-size: 1.6rem; }
.calc p { color: rgba(255,255,255,.72); }
.calc__seg { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.calc__seg button { font: 600 .9rem var(--body); border: 0; background: transparent; color: rgba(255,255,255,.75); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.calc__seg button.is-active { background: #fff; color: var(--ink); }
.calc__inputs { display: flex; align-items: center; gap: 10px; }
.calc__inputs input { width: 92px; font: 800 2.4rem/1 var(--display); text-align: center; background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.18); border-radius: 14px; color: #fff; padding: 10px 6px; }
.calc__inputs input::-webkit-inner-spin-button, .calc__inputs input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.calc__inputs input { -moz-appearance: textfield; appearance: textfield; }
.calc__inputs input:focus { border-color: #fff; outline: none; }
.calc__inputs span { font: 800 2.4rem var(--display); color: rgba(255,255,255,.5); }
.calc__out { display: grid; gap: 10px; align-content: start; position: relative; z-index: 1; }
.calc__verdict { border-radius: 14px; padding: 14px 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.calc__verdict.ok { background: rgba(46,139,87,.25); color: #A8F0C6; }
.calc__verdict.ko { background: rgba(227,32,43,.25); color: #FFC2C5; }
.calc__rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc__rows div { background: rgba(255,255,255,.06); border-radius: 12px; padding: 12px; }
.calc__rows span { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 600; }
.calc__rows strong { font: 800 1.5rem var(--display); font-variant-numeric: tabular-nums; }
.calc__bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.calc__bar i { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, #7FD1D9, #fff); border-radius: inherit; transition: width .3s, background .3s; }
.calc__bar.ko i { background: linear-gradient(90deg, #ff8a8f, var(--red)); }

/* ------------------------------------------------------------- Accueil */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.intro__visual { position: relative; border-radius: 28px; background: var(--teal-700); aspect-ratio: 4 / 3.2; overflow: hidden; box-shadow: var(--shadow-lg); }
.intro__visual svg { width: 100%; height: 100%; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--paper); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid rgba(221,214,198,.6); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; gap: 10px; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.feature__ico { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--teal-100); color: var(--teal-700); }
.feature:nth-child(2) .feature__ico { background: var(--red-100); color: var(--red); }
.feature:nth-child(3) .feature__ico { background: #FCF1D6; color: #9A6A00; }
.feature:nth-child(4) .feature__ico { background: #E3E5EE; color: var(--ink); }
.feature h3 { margin: 4px 0 0; font-size: 1.2rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: .94rem; }
.feature__go { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; color: var(--teal-600); }
.countdown { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; background: var(--ink); color: #fff; border-radius: 28px; padding: 36px; position: relative; overflow: hidden; }
.countdown::before { content: ""; position: absolute; right: -10%; top: -40%; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(227,32,43,.35), transparent 65%); }
.countdown h2 { color: #fff; }
.countdown p { color: rgba(255,255,255,.75); }
.countdown__clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; position: relative; }
.countdown__clock div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 16px 8px; text-align: center; }
.countdown__clock strong { display: block; font: 800 clamp(1.8rem, 4vw, 2.8rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.countdown__clock span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.6); font-weight: 600; }
.quote { font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; max-width: 22em; }
.quote em { font-style: normal; color: var(--red); }
.empty { text-align: center; padding: 48px 24px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-3); background: rgba(255,253,249,.5); }
.empty .ico { color: var(--teal-400); margin: 0 auto 10px; }
.empty h3 { color: var(--ink-2); font-size: 1.2rem; }

/* ------------------------------------------------------------- Footer */
.footer { background: var(--ink); color: rgba(255,255,255,.75); margin-top: 0; }
.footer .lane { background:
    radial-gradient(circle at 7px 7px, var(--red) 5px, transparent 5.5px) 0 0 / 28px 14px repeat-x,
    radial-gradient(circle at 7px 7px, #F0F0F5 5px, transparent 5.5px) 14px 0 / 28px 14px repeat-x,
    var(--sand); }
.footer__inner { display: grid; grid-template-columns: 1.2fr 1.5fr; gap: 48px; padding: 56px 0 36px; }
.footer__brand { display: flex; gap: 18px; align-items: flex-start; }
.footer__brand img { width: 84px; height: 84px; }
.footer__title { font-family: var(--display); font-size: 1.8rem; color: #fff; font-weight: 800; margin: 0 0 4px; letter-spacing: -.03em; }
.footer__coach { font-size: .92rem; }
.footer__coach strong { color: #fff; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__h { color: #fff; font-weight: 600; margin-bottom: 10px; }
.footer__cols a { display: block; color: rgba(255,255,255,.7); text-decoration: none; padding: 4px 0; font-size: .95rem; }
.footer__cols a:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; gap: 12px; padding: 18px 0 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: .86rem; }
.footer__admin { color: rgba(255,255,255,.6); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.footer__admin:hover { color: #fff; }

/* --------------------------------------------------- Barre mobile */
.tabbar { display: none; }

/* ---------------------------------------------------------- Divers */
.prose h2 { font-size: 1.6rem; margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.back { display: flex; width: fit-content; align-items: center; gap: 6px; color: rgba(255,255,255,.8); text-decoration: none; font-weight: 600; font-size: .92rem; margin-bottom: 18px; }
.back:hover { color: #fff; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.error-page { text-align: center; padding: 80px 0 100px; }
.error-page__code { font-family: var(--display); font-size: clamp(6rem, 20vw, 12rem); font-weight: 800; line-height: 1; color: transparent; -webkit-text-stroke: 3px var(--teal-600); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ======================================================== Responsive */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .block__grid { grid-template-columns: 1fr; gap: 16px; }
  .block__num { font-size: 3.4rem; }
  .session { grid-template-columns: 1fr; }
  .session__aside { position: static; order: -1; }
}

@media (max-width: 860px) {
  :root { --tabbar-h: calc(66px + env(safe-area-inset-bottom)); }
  .nav, .topbar__cta { display: none; }
  .topbar__inner { height: 62px; }
  .brand img { width: 38px; height: 38px; }
  .brand__text strong { font-size: 1.25rem; }
  .catnav, .ssa-tabs { top: 62px; }
  html { scroll-padding-top: 130px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,253,249,.94); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar__item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; text-decoration: none; color: var(--ink-3); font-size: .7rem; font-weight: 600; border-radius: 12px; position: relative; }
  .tabbar__item.is-active { color: var(--ink); }
  .tabbar__item.is-active .ico { color: var(--red); }
  .tabbar__item.is-active::before { content: ""; position: absolute; top: -7px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }
  .hero__grid { grid-template-columns: 1fr; padding: 40px 0 110px; gap: 8px; text-align: left; }
  .hero__logo { order: -1; width: 150px; justify-self: start; }
  .hero__ring { display: none; }
  .chronos { grid-template-columns: 1fr; gap: 12px; margin-top: -70px; }
  .chrono { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 14px; padding: 16px 18px; }
  .chrono__time { font-size: 2.4rem; order: -1; min-width: 4ch; }
  .chrono__label { width: calc(100% - 6ch); }
  .chrono__desc { width: 100%; }
  .section { padding: 60px 0; }
  .intro, .countdown, .calc { grid-template-columns: 1fr; }
  .countdown, .calc { padding: 24px; border-radius: 22px; }
  .grid--2, .grid--3, .grid--4, .split, .rules { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .footer__bottom { flex-direction: column; }
  .pagehead { padding: 40px 0 80px; }
  .pagehead__mark { width: 140px; right: -20px; opacity: .1; }
  .event { grid-template-columns: 60px 1fr; gap: 14px; padding: 14px; }
  .event__date { width: 60px; height: 68px; }
  .event__num { font-size: 1.6rem; }
  .event__actions { grid-column: 1 / -1; }
  .pager { grid-template-columns: 1fr; }
  .step { grid-template-columns: 40px 1fr; gap: 12px; }
  .step__dot { width: 40px; height: 40px; font-size: .95rem; }
  .timeline::before { left: 19px; }
  .step__card { padding: 16px; }
  .parcours li { grid-template-columns: 44px 1fr; }
  .parcours__dist { grid-column: 2; }
  .pool__seg { font-size: .66rem; }
  .table th, .table td { padding: 10px 12px; }
}

@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .hero__actions .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr 1fr; }
  .calc__rows { grid-template-columns: 1fr 1fr 1fr; }
  .calc__rows strong { font-size: 1.2rem; }
  .countdown__clock { gap: 6px; }
  .countdown__clock div { padding: 12px 4px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .topbar, .tabbar, .footer, .announce, .session__aside .toolbar, .pager, .poolbar, .no-print { display: none !important; }
  body { background: #fff; padding: 0; }
  .pagehead { background: #fff !important; color: #000; padding: 0 0 12px; }
  .pagehead::before, .pagehead__mark { display: none; }
  .pagehead h1, .pagehead p, .back { color: #000; }
  .pagehead + .wrap, .pagehead + .content { margin-top: 0; }
  .session { grid-template-columns: 1fr; }
  .step__card, .card { box-shadow: none; break-inside: avoid; }
}

/* ======================================================================
   ESPACE ENTRAÎNEUR (admin)
   ====================================================================== */
.admin-body { background: #EEF2F3; }
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--teal-900); color: rgba(255,255,255,.8); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.side__brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 0 8px 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.1); }
.side__brand img { width: 40px; height: 40px; }
.side__brand strong { font-family: var(--display); font-size: 1.3rem; display: block; line-height: 1; }
.side__brand small { font-size: .74rem; color: rgba(255,255,255,.6); }
.side a.side__link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,.78); text-decoration: none; font-weight: 600; font-size: .94rem; }
.side a.side__link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side a.side__link.is-active { background: #fff; color: var(--teal-900); }
.side a.side__link.is-active .ico { color: var(--red); }
.side__spacer { flex: 1; }
.side__user { font-size: .85rem; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 8px; }
.side__user form button { all: unset; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; color: rgba(255,255,255,.75); font-weight: 600; }
.side__user form button:hover { color: #fff; }
.amain { padding: 32px clamp(16px, 3vw, 44px) 80px; min-width: 0; }
.ahead { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.ahead h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0; }
.ahead p { margin: 4px 0 0; color: var(--ink-3); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: #fff; border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.stat span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.stat strong { display: block; font: 800 2.2rem/1.1 var(--display); }
.panel { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 22px; margin-bottom: 20px; }
.panel h2 { font-size: 1.25rem; margin-bottom: 14px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel__head h2 { margin: 0; }
.list { display: grid; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #EDF0F1; }
.row:last-child { border-bottom: 0; }
.row__title { font-weight: 600; color: var(--ink); text-decoration: none; }
.row__title:hover { color: var(--red); }
.row__meta { font-size: .86rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; align-items: center; }
.row__actions { display: flex; gap: 6px; align-items: center; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.iconbtn:hover { border-color: var(--ink); color: var(--ink); }
.iconbtn--danger:hover { border-color: var(--red); color: var(--red); background: var(--red-100); }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .03em; }
.pill--on { background: #E2F2E9; color: var(--green); }
.pill--off { background: #FCF1D6; color: #9A6A00; }

/* Formulaires */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form__row--3 { grid-template-columns: repeat(3, 1fr); }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: .82rem; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=date], .field input[type=time], .field input[type=url], .field input[type=number], .field select, .field textarea {
  width: 100%; font: 400 1rem var(--body); color: var(--ink); background: #F8FAFA; border: 1.5px solid #D8DFE1; border-radius: 12px; padding: 12px 14px; transition: border-color .15s, background .15s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-600); background: #fff; box-shadow: 0 0 0 4px var(--teal-100); }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--teal-600); }
.form__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 6px; }
.alert { border-radius: 12px; padding: 12px 16px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.alert--ok { background: #E2F2E9; color: #1D5E3A; }
.alert--error { background: var(--red-100); color: var(--red-700); }
.alert--warn { background: #FCF1D6; color: #7A5300; }
.blk { border: 1.5px solid #E1E7E9; border-radius: 14px; padding: 14px; background: #FBFCFC; display: grid; gap: 12px; }
.blk__head { display: flex; align-items: center; gap: 10px; }
.blk__num { width: 30px; height: 30px; border-radius: 50%; background: var(--teal-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--display); flex: none; }
.blk__head .grow { flex: 1; }
.blocks { display: grid; gap: 12px; }
.blk__grid { display: grid; grid-template-columns: 1fr 140px 140px; gap: 10px; }
.drop { position: relative; border: 2px dashed #C6D2D5; border-radius: 16px; padding: 26px; text-align: center; background: #F8FAFA; transition: all .15s; cursor: pointer; }
.drop.is-over, .drop:hover { border-color: var(--teal-600); background: var(--teal-100); }
.drop.has-file { border-style: solid; border-color: var(--green); background: #EEF8F2; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .ico { color: var(--teal-600); margin: 0 auto 8px; }
.drop strong { display: block; }
.code { font: 500 .82rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--ink); color: #D7F5E4; border-radius: 12px; padding: 14px 16px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.log { max-height: 340px; }
.status { display: flex; gap: 10px; align-items: center; font-weight: 700; margin-bottom: 10px; }
.status__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(231,168,23,.6); animation: pulse 1.4s infinite; }
[data-state-value=success] .status__dot { background: var(--green); animation: none; }
[data-state-value=failed] .status__dot, [data-state-value=rolled_back] .status__dot { background: var(--red); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(231,168,23,0); } 100% { box-shadow: 0 0 0 0 rgba(231,168,23,0); } }
.version { display: flex; align-items: center; gap: 16px; }
.version strong { font: 800 2.6rem/1 var(--display); }
details.help summary { cursor: pointer; font-weight: 600; color: var(--teal-600); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--teal-700); position: relative; overflow: hidden; isolation: isolate; }
.login::before { content: ""; position: absolute; inset: -40%; z-index: -1; background: radial-gradient(ellipse 30% 20% at 70% 30%, rgba(127,209,217,.25), transparent 70%), linear-gradient(160deg, var(--teal-600), var(--teal-900)); animation: caustics 18s ease-in-out infinite alternate; }
.login__card { width: min(100%, 420px); background: var(--paper); border-radius: 24px; padding: 32px; box-shadow: var(--shadow-lg); }
.login__card img { width: 96px; margin: -80px auto 12px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.25)); }
.login__card h1 { font-size: 1.8rem; text-align: center; margin-bottom: 4px; }
.login__card > p { text-align: center; color: var(--ink-3); margin-bottom: 22px; }
.atabs { display: none; }

@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 40; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px 12px; gap: 6px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side__brand { border: 0; padding: 0 6px 0 0; margin: 0; }
  .side__brand span { display: none; }
  .side a.side__link { white-space: nowrap; padding: 8px 12px; font-size: .86rem; }
  .side__spacer { display: none; }
  .side__user { border: 0; padding: 0 0 0 6px; display: flex; white-space: nowrap; }
  .side__user > span { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .form__row, .form__row--3, .blk__grid { grid-template-columns: 1fr; }
  .amain { padding-top: 22px; }
  .row { grid-template-columns: 1fr; }
}
