/* ==========================================================================
   CAST Orion — feuille de style
   Reprend l'identité du thème « Rapid » (bleu #1bb1dc, violet nuit #413e66,
   Montserrat / Open Sans), sans Bootstrap ni jQuery.
   ========================================================================== */

:root {
  --accent: #1bb1dc;
  --accent-dark: #0a98c0;
  --accent-soft: #e3f6fb;
  --navy: #413e66;
  --navy-deep: #282646;
  --text: #444;
  --muted: #6c6992;
  --bg: #fff;
  --bg-soft: #f5f8fd;
  --bg-alt: #ebf1fa;
  --border: #dce1ec;
  --danger: #d9534f;
  --danger-soft: #fdeceb;
  --success: #2e9d63;
  --success-soft: #e6f6ee;
  --warn: #c98a12;
  --radius: 10px;
  --shadow: 0 10px 29px rgba(68, 88, 144, .1);
  --shadow-lg: 0 20px 45px rgba(40, 38, 70, .18);
  --header-h: 72px;
  --font-title: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }
p { margin: 0 0 1.1em; }
h1, h2, h3, h4 { font-family: var(--font-title); color: var(--navy); margin: 0 0 .6em; line-height: 1.25; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px; }
.skip-link:focus { top: 12px; color: #fff; }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.center { text-align: center; }
.empty { color: var(--muted); font-style: italic; }
.img-fluid { max-width: 100%; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  font: 600 13px/1 var(--font-title); letter-spacing: 1px; text-transform: uppercase;
  padding: 13px 30px; border-radius: 5px; border: 2px solid var(--accent);
  background: var(--accent); color: #fff; cursor: pointer; transition: background .25s, border-color .25s, transform .1s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn:active { transform: scale(.97); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); border-color: var(--navy); }
.btn-sm { padding: 9px 16px; font-size: 11.5px; }
.btn-block { width: 100%; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c2c0; }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------- En-tête ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 1000; transition: background .3s, box-shadow .3s; }
.site-header.is-solid, .site-header.is-scrolled { background: #fff; box-shadow: 0 0 30px rgba(127, 137, 161, .3); }
.topbar { font-size: 14px; transition: margin .3s, opacity .3s; }
.topbar .container { display: flex; justify-content: flex-end; padding-top: 8px; }
.topbar-social a { color: #535074; padding: 2px 10px; display: inline-block; }
.topbar-social a:hover { color: var(--accent); }
.site-header.is-scrolled .topbar, .site-header.is-solid .topbar { display: none; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.logo { font: 400 32px/1 var(--font-title); letter-spacing: 3px; text-transform: uppercase; color: var(--navy); }
.logo:hover { color: var(--navy); }

.main-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a, .dropdown-toggle {
  display: flex; align-items: center; gap: 6px; padding: 10px 13px; color: var(--navy);
  font: 600 13.5px/1.2 var(--font-body); text-transform: uppercase; background: none; border: 0; cursor: pointer; border-radius: 6px;
}
.main-nav a:hover, .main-nav a.is-active, .dropdown-toggle:hover { color: var(--accent); }
.has-dropdown { position: relative; }
.dropdown-toggle { border: 1.5px solid var(--border); margin-left: 8px; }
.dropdown-toggle .caret { transition: transform .2s; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; list-style: none; margin: 0; padding: 8px 0;
  background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(127, 137, 161, .3);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown, .has-dropdown.is-open .dropdown { opacity: 1; visibility: visible; transform: none; }
.has-dropdown.is-open .caret { transform: rotate(180deg); }
.dropdown a, .dropdown-link {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 20px; text-transform: none; font: 500 14.5px var(--font-body);
  color: #065e77; background: none; border: 0; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown-link:hover { color: var(--accent); background: var(--bg-soft); }
.dropdown form { margin: 0; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--navy); cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }
.nav-toggle .icon-close, .nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }
.nav-overlay { position: fixed; inset: 0; background: rgba(40, 38, 70, .6); z-index: 998; }

/* ---------- Messages ---------- */
.flash-stack { position: fixed; top: calc(var(--header-h) + 14px); right: 16px; z-index: 1100; display: grid; gap: 10px; max-width: min(440px, calc(100vw - 32px)); }
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 8px; background: #fff; box-shadow: var(--shadow-lg); border-left: 5px solid var(--accent); animation: slide-in .35s ease; }
.flash span { flex: 1; }
.flash-success { border-color: var(--success); }
.flash-error { border-color: var(--danger); }
.flash-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }
@keyframes slide-in { from { opacity: 0; transform: translateX(20px); } }

.alert { padding: 14px 18px; border-radius: 8px; margin: 0 0 20px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert p:last-child { margin: 0; }
.alert-error { background: var(--danger-soft); color: #8a2c29; }
.alert-info { background: var(--accent-soft); color: #075b73; }

/* ---------- Accueil (hero) ---------- */
.hero {
  min-height: 100vh; padding: calc(var(--header-h) + 60px) 0 60px;
  background: var(--bg-soft) url("../../img/intro-bg2.jpg") center top / cover no-repeat;
}
.hero-top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hero-text h1 { font-size: clamp(32px, 4.6vw, 50px); font-weight: 700; margin-bottom: 36px; }
.hero-text h1 span { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-img { text-align: center; }
.hero-img img { width: min(420px, 90%); filter: drop-shadow(0 20px 30px rgba(40, 38, 70, .15)); }
.hero-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; margin-top: 50px; align-items: start; }

.notice { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--danger); padding: 22px 26px; }
.notice h2 { font-size: 20px; color: var(--danger); display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid #f3d3d2; }
.notice p { margin: 0 0 .7em; color: #5a3130; }
.notice .is-bold { font-weight: 700; }

.agenda { display: grid; gap: 14px; }
.event { display: flex; gap: 18px; background: rgba(255, 255, 255, .95); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.event-date { flex: 0 0 72px; height: 76px; border-radius: 8px; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-title); }
.event-num { font-size: 30px; font-weight: 700; line-height: 1; }
.event-month { font-size: 13px; letter-spacing: 2px; color: var(--accent); margin-top: 4px; }
.event-body h3 { font-size: 17px; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.event-meta { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--muted); }
.event-meta li { display: flex; align-items: center; gap: 5px; }
.event-meta .icon { color: var(--accent); }
.event-body p { margin: 0; font-size: 14.5px; }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-bg { background: var(--bg-soft); }
.section-alt { background: #e4e6ea; }
.section-header { text-align: center; margin-bottom: 44px; }
.section-header h2 { font-size: 36px; font-weight: 700; }
.section-header h2::after { content: ""; display: block; width: 56px; height: 3px; margin: 14px auto 0; background: var(--accent); border-radius: 2px; }
.section-header p { max-width: 640px; margin: 0 auto; color: #535074; }

/* Le club */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 60px; align-items: start; }
.about-img { position: relative; margin: 30px; }
.about-img::before, .about-img::after { content: ""; position: absolute; width: 90%; height: 92%; background: var(--bg-alt); z-index: -1; }
.about-img::before { left: -30px; top: -30px; }
.about-img::after { right: -30px; bottom: -30px; }
.about-img img { display: block; width: 100%; border: 8px solid #fff; transition: transform .5s; }
.about-img img:hover { transform: scale(1.03); }
.about-content h2 { font-size: 34px; font-weight: 700; }
.about-subtitle { color: #696592; font: italic 400 21px/1.4 var(--font-title); }
.lead { font-size: 17.5px; color: var(--navy); }
.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; }
.checklist .icon { color: var(--accent); width: 22px; height: 22px; }
.member-hint { background: var(--bg-soft); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: 15px; }

.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 60px; }
.info-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border-top: 4px solid var(--accent); }
.info-card h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.info-card h3 .icon { color: var(--accent); }
.info-card p:last-child { margin: 0; }
.social-logos { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.social-logos img { height: 44px; width: auto; transition: transform .2s; }
.social-logos a:hover img { transform: translateY(-3px); }

.map-block { margin-top: 60px; text-align: center; }
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 7; min-height: 320px; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Galerie photos ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 34px; }
.filter { background: #fff; border: 1.5px solid var(--border); color: var(--navy); padding: 8px 18px; border-radius: 30px; font: 500 15px var(--font-body); cursor: pointer; transition: all .2s; }
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.gallery-item { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--navy-deep); box-shadow: var(--shadow); }
.gallery-item.is-hidden { display: none; }
.gallery-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, opacity .3s; }
.gallery-open figcaption {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px;
  background: linear-gradient(to top, rgba(28, 26, 50, .88), rgba(28, 26, 50, 0) 60%); color: #fff; text-align: left;
  opacity: 0; transition: opacity .3s;
}
.gallery-open figcaption strong { font: 700 19px var(--font-title); }
.gallery-open figcaption span { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: #d8e9f5; }
.gallery-open .zoom { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.gallery-open .zoom .icon { color: #fff; }
.gallery-open:hover img, .gallery-open:focus-visible img { transform: scale(1.06); opacity: .85; }
.gallery-open:hover figcaption, .gallery-open:focus-visible figcaption { opacity: 1; }
@media (hover: none) { .gallery-open figcaption { opacity: 1; } .gallery-open .zoom { display: none; } }

.vote-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #fff; }
.vote-bar form { margin: 0; }
.gallery-item.is-voted { outline: 3px solid var(--accent); }
.voted { color: var(--accent-dark); font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* Visionneuse */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(15, 14, 30, .92); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 70px 30px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox figcaption { color: #eee; margin-top: 14px; text-align: center; max-width: 800px; }
.lb-close, .lb-nav { position: absolute; background: rgba(255, 255, 255, .12); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.lb-close:hover, .lb-nav:hover { background: var(--accent); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; translate: 0 -50%; }
.lb-next { right: 14px; top: 50%; translate: 0 -50%; }
.lb-close .icon, .lb-nav .icon { width: 24px; height: 24px; }

/* ---------- Cartes (clubs, partenaires, logiciels) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }
.card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; color: var(--text);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); color: var(--text); }
.card h3 { font-size: 18px; font-weight: 700; color: #111; margin: 10px 0 4px; display: flex; align-items: center; gap: 6px; }
.card:hover h3 { color: var(--accent); }
.card p { font-size: 14.5px; margin: 0 0 10px; }
.card-logo { width: 100px; height: 100px; object-fit: contain; border-radius: 50%; }
.card-link { margin-top: auto; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.card-partner img { max-height: 120px; width: auto; object-fit: contain; }
.cards-soft .card img { max-height: 120px; object-fit: contain; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy-deep); color: #c9c7e0; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 40px; padding: 60px 20px 40px; }
.footer-logo { font: 400 28px var(--font-title); letter-spacing: 3px; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer-title { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: 4px 0; }
.site-footer a { color: #c9c7e0; }
.site-footer a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 8px; margin-bottom: 14px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 17px; transition: background .2s; }
.footer-social a:hover { background: var(--accent-dark); color: #fff; }
.footer-mail a { display: inline-flex; align-items: center; gap: 6px; word-break: break-all; }
.copyright { text-align: center; border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px; font-size: 14px; }

.back-to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 900; width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .3s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--accent-dark); color: #fff; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 16px; }
.form-narrow { max-width: 420px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; margin: 0; }
.field label, .field > span { font-weight: 600; font-size: 14px; color: var(--navy); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 6px; }
.field label > :is(input, select, textarea, .input-affix) { flex: 1 1 100%; }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=date], select, textarea {
  width: 100%; font: 15px var(--font-body); color: #222; background: var(--bg-soft);
  border: 2px solid var(--bg-soft); border-bottom-color: var(--border); border-radius: 6px; padding: 11px 13px; transition: border-color .2s, background .2s;
}
input:focus, select:focus, textarea:focus { outline: none; background: #fff; border-color: var(--accent); }
input[type=file] { font-size: 14px; padding: 8px; border: 2px dashed var(--border); border-radius: 6px; background: #fff; width: 100%; }
input[type=file]::file-selector-button { font: 600 12px var(--font-title); text-transform: uppercase; border: 0; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 4px; margin-right: 12px; cursor: pointer; }
textarea { resize: vertical; }
.input-group { display: flex; gap: 8px; }
.input-group select { width: auto; flex: 0 0 auto; }
fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin: 0; }
legend { font: 600 14px var(--font-title); color: var(--navy); padding: 0 6px; }

/* ---------- Pages de connexion ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: calc(var(--header-h) + 40px) 16px 60px; background: var(--bg-soft) url("../../img/intro-bg2.jpg") center / cover; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, .18); padding: 36px 34px 28px; animation: fade-down .6s ease both; }
.auth-card-wide { max-width: 580px; }
.auth-card h1 { text-align: center; font-size: 26px; font-weight: 700; }
.auth-logo { display: block; margin: -4px auto 10px; width: 130px; }
.auth-intro { text-align: center; color: var(--muted); }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 22px -34px -28px; padding: 18px 34px; background: #f6f6f6; border-top: 1px solid #dce8f1; border-radius: 0 0 14px 14px; font-size: 14.5px; }
.auth-links a:only-child { margin: 0 auto; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-24px); } }

/* ---------- Espace membre ---------- */
.member-page { padding: calc(var(--header-h) + 40px) 0 70px; background: var(--bg-soft); min-height: 100vh; }
.member-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.member-header h1 { margin: 0; font-size: 30px; font-weight: 700; }
.tabs, .subtabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; margin-bottom: 24px; padding-bottom: 4px; }
.tab, .subtab { white-space: nowrap; padding: 10px 18px; border-radius: 30px; color: var(--navy); font-weight: 600; font-size: 14.5px; background: #fff; border: 1.5px solid var(--border); }
.tab:hover, .subtab:hover { border-color: var(--accent); color: var(--accent); }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.subtabs { border-bottom: 2px solid var(--border); gap: 0; padding: 0; }
.subtab { border: 0; border-radius: 0; background: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subtab.is-active { border-bottom-color: var(--accent); color: var(--accent); }
.tab-panel { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 30px; }
.tab-panel > h2 { font-size: 24px; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin: 0 0 24px; }
.tab-panel .panel { box-shadow: none; }
.panel h3 { font-size: 19px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel h4 { font-size: 16px; margin-top: 18px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
details > summary { cursor: pointer; font: 600 16px var(--font-title); color: var(--navy); list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; font-size: 22px; line-height: 1; color: var(--accent); transition: transform .2s; }
details[open] > summary::before { transform: rotate(90deg); }
details[open] > summary { margin-bottom: 16px; }
.sub-panel { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; background: var(--bg-soft); }
.sub-panel[open] { background: #fff; }
.count { margin-left: auto; background: var(--bg-alt); color: var(--navy); border-radius: 20px; padding: 1px 10px; font-size: 13px; }

.tag { display: inline-block; font: 600 11.5px var(--font-body); text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 20px; background: var(--bg-alt); color: var(--navy); }
.tag-role { background: var(--accent); color: #fff; }
.tag-warn { background: #fff3dc; color: var(--warn); }

.welcome h2 small { color: var(--muted); font-weight: 400; font-size: .7em; }
.welcome-img { display: block; margin: 0 auto 26px; border-radius: var(--radius); max-height: 460px; object-fit: cover; }

.table-wrap { overflow-x: auto; margin-bottom: 24px; border: 1px solid var(--border); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { background: var(--navy); color: #fff; text-align: left; font: 600 13px var(--font-title); text-transform: uppercase; letter-spacing: .5px; padding: 12px 14px; }
.table td { padding: 11px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:nth-child(even) { background: var(--bg-soft); }
.table tr.is-pending { background: #fffaf0 !important; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { width: auto; padding: 7px 10px; }

.link-list, .doc-list { list-style: none; padding: 0; margin: 0; }
.link-list li a { display: flex; align-items: center; gap: 6px; padding: 12px 4px; border-bottom: 1px solid var(--border); color: var(--navy); font-weight: 600; }
.link-list li a:hover { color: var(--accent); }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.chips { display: flex; gap: 6px; flex-shrink: 0; }
.chip { display: inline-flex; align-items: center; gap: 4px; font: 600 12px var(--font-title); padding: 6px 12px; border-radius: 20px; background: var(--accent-soft); color: #075b73; }
.chip:hover { background: var(--accent); color: #fff; }

.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.manage-row, .member-row { border-bottom: 1px solid var(--border); padding: 14px 0; }
.manage-form, .member-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0; }
.member-row.is-new { background: var(--bg-soft); border-radius: 8px; padding: 14px; border: 1px dashed var(--border); margin-top: 14px; }
.row-title { width: 100%; margin: 0; font: 600 15px var(--font-title); color: var(--navy); }
.field-inline { flex: 1 1 150px; }
.field-inline span { font-size: 12.5px; }
.field-inline input, .field-inline select { padding: 8px 10px; font-size: 14px; }
.field-sm { flex: 0 1 120px; }
.row-actions { display: flex; gap: 6px; }
.row-meta { width: 100%; font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.event-edit { margin-bottom: 8px; }
.ranking { padding: 0; margin: 0; list-style: none; counter-reset: rank; }
.ranking li { counter-increment: rank; display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ranking li::before { content: counter(rank); font: 700 18px var(--font-title); color: var(--accent); width: 24px; text-align: center; }
.ranking .score { margin-left: auto; font-weight: 700; color: var(--navy); white-space: nowrap; }

/* ==========================================================================
   Comptes rendus
   ========================================================================== */
.container-narrow { max-width: 900px; }
.cr-page { background: var(--bg-soft); padding-bottom: 70px; min-height: 100vh; }
.cr-hero {
  padding: calc(var(--header-h) + 44px) 0 44px; color: #fff;
  background: radial-gradient(1200px 400px at 85% -10%, rgba(27, 177, 220, .35), transparent 60%), linear-gradient(135deg, var(--navy-deep), var(--navy));
  position: relative; overflow: hidden;
}
.cr-hero::after { /* petites étoiles */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(1.5px 1.5px at 12% 30%, #fff, transparent), radial-gradient(1px 1px at 28% 70%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 46% 22%, #fff, transparent), radial-gradient(1px 1px at 63% 58%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 78% 34%, #fff, transparent), radial-gradient(1px 1px at 90% 76%, #fff, transparent),
    radial-gradient(1px 1px at 7% 84%, #fff, transparent), radial-gradient(1.3px 1.3px at 55% 88%, #fff, transparent);
}
.cr-hero .container { position: relative; z-index: 1; }
.cr-hero h1 { color: #fff; font-size: clamp(26px, 4vw, 38px); font-weight: 700; margin: 6px 0 12px; }
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: #b9b6dc; margin-bottom: 18px; }
.breadcrumb a { color: #d7e9f5; }
.breadcrumb a:hover { color: #fff; }
.cr-kicker { margin: 0; font: 600 12.5px var(--font-title); letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.cr-date { display: flex; align-items: center; gap: 8px; margin: 0; color: #dcdaf0; font-size: 16px; }
.cr-date .icon { color: var(--accent); }
.cr-edit-link { margin-top: 16px; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cr-edit-link:hover { background: #fff; color: var(--navy); border-color: #fff; }
.cr-hero .tag-warn { margin-top: 12px; }

.cr-body { margin-top: -26px; position: relative; z-index: 2; }
.cr-intro {
  display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px; border-left: 5px solid var(--accent); font-size: 17px; color: var(--navy); margin-bottom: 34px;
}
.cr-intro > .icon { width: 26px; height: 26px; color: var(--accent); margin-top: 2px; }
.cr-intro p { margin: 0 0 .4em; font-weight: 600; }
.cr-intro p:last-child { margin: 0; }
.cr-section-title { font-size: 22px; font-weight: 700; margin: 10px 0 20px; display: flex; align-items: center; gap: 12px; }
.cr-section-title::after { content: ""; flex: 1; height: 2px; background: var(--border); }

.cr-timeline { list-style: none; margin: 0 0 30px; padding: 0 0 0 30px; position: relative; counter-reset: step; }
.cr-timeline::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--accent), var(--border)); }
.cr-timeline > li {
  position: relative; counter-increment: step; background: #fff; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(68, 88, 144, .07);
  padding: 16px 20px; margin-bottom: 14px;
}
.cr-timeline > li::before {
  content: counter(step); position: absolute; left: -31px; top: 14px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font: 700 12px/24px var(--font-title); text-align: center; box-shadow: 0 0 0 4px var(--bg-soft);
}
.cr-point-text { margin: 0 0 .5em; color: #333; font-size: 16px; }
.cr-point-text:first-child { font-weight: 600; color: var(--navy); }
.cr-timeline > li > :last-child { margin-bottom: 0; }
.cr-sub { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 6px; }
.cr-sub li { position: relative; padding-left: 20px; font-size: 15px; color: #4d4a6d; }
.cr-sub li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--accent); }

.cr-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.cr-media.is-single { grid-template-columns: minmax(0, 520px); }
.cr-media-large { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-bottom: 30px; }
.cr-media figure { margin: 0; }
.cr-photo { display: block; width: 100%; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--navy-deep); cursor: zoom-in; aspect-ratio: 4 / 3; }
.cr-media.is-single .cr-photo { aspect-ratio: auto; }
.cr-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, opacity .3s; }
.cr-photo:hover img, .cr-photo:focus-visible img { transform: scale(1.04); opacity: .9; }
.cr-media figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; text-align: center; }
.cr-docs { margin: 12px 0 0; flex-wrap: wrap; }

.cr-notes { background: #fff; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 18px; border: 1px dashed var(--border); }
.cr-notes p:last-child { margin: 0; }
.cr-end { display: flex; gap: 14px; align-items: flex-start; background: var(--navy); color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 34px; font-weight: 600; }
.cr-end .icon { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.cr-end p { margin: 0 0 .4em; }
.cr-end p:last-child { margin: 0; }
.cr-footer-nav { text-align: center; margin-top: 10px; }
a.discret, .cr-notes a.discret { color: inherit; text-decoration: none; }
a.break { word-break: break-all; }

/* Liste des comptes rendus (espace membre) */
.cr-season { margin-top: 26px; }
.cr-season h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.cr-season h3 .count { margin-left: 0; }
.cr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cr-list a {
  display: flex; align-items: center; gap: 16px; padding: 10px 16px 10px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cr-list a:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateX(3px); color: var(--text); }
.cr-list .event-date { flex: 0 0 58px; height: 60px; }
.cr-list .event-num { font-size: 22px; }
.cr-list .event-month { font-size: 11px; }
.cr-list-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.cr-list-text strong { color: var(--navy); font-family: var(--font-title); }
.cr-list-text .muted { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-list-arrow { color: var(--accent); width: 20px; height: 20px; }

/* Gestion : nouveau compte rendu */
.cr-new { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.cr-new .field { flex: 1 1 280px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; color: var(--navy); }

/* Fenêtre (dialog) */
.modal { border: 0; padding: 0; border-radius: 14px; width: min(980px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: var(--shadow-lg); color: var(--text); }
.modal::backdrop { background: rgba(28, 26, 50, .65); backdrop-filter: blur(2px); }
.modal[open] { display: flex; animation: modal-in .25s ease; }
.modal form { display: flex; flex-direction: column; width: 100%; max-height: calc(100vh - 24px); margin: 0; }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.modal-head h2 { margin: 0; font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.modal-close:hover { background: var(--bg-alt); color: var(--navy); }
.modal-close .icon { width: 22px; height: 22px; }
.modal-body { padding: 20px 24px; overflow-y: auto; display: grid; gap: 18px; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: #fff; flex-wrap: wrap; }
.modal-foot .field-sm { flex: 0 0 130px; margin-right: auto; }
.modal-status { font-size: 14px; color: var(--muted); flex: 1 1 180px; text-align: right; }
.modal fieldset { display: grid; gap: 12px; }
.modal textarea { min-height: 44px; }
.modal .field > span { font-weight: 600; font-size: 13.5px; color: var(--navy); }

.input-affix { display: flex; align-items: stretch; }
.input-affix span { display: flex; align-items: center; padding: 0 10px; background: var(--bg-alt); color: var(--muted); font: 13px ui-monospace, Menlo, Consolas, monospace; border-bottom: 2px solid var(--border); }
.input-affix span:first-child { border-radius: 6px 0 0 6px; }
.input-affix span:last-child { border-radius: 0 6px 6px 0; }
.input-affix input { border-radius: 0; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.input-affix input[readonly] { color: var(--muted); background: var(--bg-alt); }

.cr-points { display: grid; gap: 12px; }
.cr-point-edit { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 14px; display: grid; gap: 10px; background: #fff; }
.cr-point-head { display: flex; align-items: center; justify-content: space-between; }
.cr-point-num { font: 700 13px var(--font-title); text-transform: uppercase; letter-spacing: 1px; color: var(--accent-dark); }
.cr-point-tools { display: flex; gap: 4px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--navy); cursor: pointer; }
.icon-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn-danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }

.cr-media-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cr-media-edit:empty { display: none; }
.media-item { position: relative; display: grid; gap: 6px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft); }
.media-item.is-new { border-style: dashed; border-color: var(--accent); }
.media-item img, .media-doc { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; background: var(--navy-deep); }
.media-doc { display: grid; place-items: center; color: #fff; font: 700 18px var(--font-title); letter-spacing: 1px; background: var(--navy); }
.media-item input[type=text] { padding: 6px 8px; font-size: 13px; }
.media-item small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-item .icon-btn { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; }

.file-drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border: 2px dashed var(--border); border-radius: 8px; color: var(--navy); font-weight: 600; font-size: 14px; cursor: pointer; background: #fff; transition: border-color .2s, background .2s; }
.file-drop:hover, .file-drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop-sm { padding: 9px; font-size: 13.5px; }
.cr-help { font-size: 14px; color: var(--muted); }
.cr-help summary { font-size: 14px; color: var(--muted); }
.cr-help ul { margin: 0; padding-left: 20px; }

@media (max-width: 640px) {
  .cr-timeline { padding-left: 24px; }
  .cr-timeline::before { left: 7px; }
  .cr-timeline > li { padding: 14px; }
  .cr-timeline > li::before { left: -25px; width: 20px; height: 20px; line-height: 20px; font-size: 11px; }
  .cr-media { grid-template-columns: 1fr 1fr; }
  .cr-media.is-single { grid-template-columns: 1fr; }
  .modal { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .modal form { max-height: 100vh; }
  .modal-body, .modal-head, .modal-foot { padding-left: 14px; padding-right: 14px; }
  .modal-status { text-align: left; }
}

/* Diagnostic e-mail */
.diag { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.diag li { padding: 10px 14px 10px 38px; border-radius: 8px; position: relative; font-size: 14.5px; }
.diag li::before { position: absolute; left: 13px; top: 9px; font-weight: 700; }
.diag .is-ok { background: var(--success-soft); color: #1d6b43; }
.diag .is-ok::before { content: "✓"; }
.diag .is-ko { background: var(--danger-soft); color: #8a2c29; }
.diag .is-ko::before { content: "✕"; }
.diag-log { margin-bottom: 14px; font-size: 13px; }
.diag-log pre { max-height: 240px; overflow: auto; background: var(--navy-deep); color: #d7e9f5; padding: 12px; border-radius: 8px; font-size: 12px; white-space: pre-wrap; }

/* Éditeur d'e-mail */
.editor { border: 2px solid var(--bg-soft); border-bottom-color: var(--border); border-radius: 8px; background: var(--bg-soft); overflow: hidden; transition: border-color .2s; }
.editor:focus-within { border-color: var(--accent); background: #fff; }
.editor-bar { display: flex; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--border); background: #fff; flex-wrap: wrap; }
.tool { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--navy); font: 15px var(--font-body); cursor: pointer; display: inline-grid; place-items: center; }
.tool:hover:not(:disabled) { background: var(--bg-soft); border-color: var(--border); }
.tool:disabled { opacity: .35; cursor: default; }
.tool[aria-pressed="true"] { background: var(--navy); color: #fff; }
.tool[aria-pressed="true"]:hover:not(:disabled) { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.tool-text { font: 600 12.5px var(--font-title); text-transform: uppercase; letter-spacing: .5px; margin-left: auto; border-color: var(--border); }
.tool-t { font: 700 15px var(--font-title); }
.editor-sep { flex: 0; }
.editor textarea { border: 0; border-radius: 0; background: transparent; min-height: 220px; font-size: 15px; line-height: 1.6; }
.editor textarea:focus { border: 0; }
.editor-preview { padding: 18px 20px; background: #fff; min-height: 220px; line-height: 1.6; }
.editor-preview h3 { font-size: 19px; margin-bottom: 14px; }
.editor-preview h4 { font-size: 17px; margin: 18px 0 8px; color: var(--navy); text-transform: none; letter-spacing: 0; }
.editor-preview ul { padding-left: 22px; margin: 0 0 1em; }
.editor-preview figure { margin: 0 0 16px; text-align: center; }
.editor-preview img { max-width: min(100%, 544px); border-radius: 8px; }
.editor-preview figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.media-actions { display: flex; }
.media-actions .btn { width: 100%; padding: 7px 8px; font-size: 10.5px; }
.form-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.form-actions .modal-status { margin-right: auto; text-align: left; }

/* ---------- Animations d'apparition ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  :root { --header-h: 64px; }
  .topbar { display: none; }
  .site-header { background: #fff; box-shadow: 0 0 20px rgba(127, 137, 161, .25); }
  .logo { font-size: 26px; }
  .nav-toggle { display: block; position: relative; z-index: 1001; }
  .main-nav {
    position: fixed; top: 0; bottom: 0; left: 0; width: min(290px, 82vw); z-index: 999; overflow-y: auto;
    background: var(--navy-deep); padding: 80px 10px 30px; transform: translateX(-100%); transition: transform .3s ease;
  }
  .nav-open .main-nav { transform: none; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav a, .dropdown-toggle { color: #fff; padding: 12px 16px; font-size: 15px; width: 100%; }
  .main-nav a:hover, .main-nav a.is-active { color: #8dc2fa; }
  .dropdown-toggle { margin: 10px 0 0; border-color: rgba(255, 255, 255, .2); justify-content: flex-start; }
  .dropdown-toggle .caret { margin-left: auto; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent; display: none; padding: 4px 0 0 14px; }
  .has-dropdown.is-open .dropdown { display: block; }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.is-open:hover .dropdown { display: block; }
  .dropdown a, .dropdown-link { color: #dcdaf0; }
  .dropdown a:hover, .dropdown-link:hover { background: rgba(255, 255, 255, .06); color: #8dc2fa; }
  .nav-open { overflow: hidden; }

  .hero-top, .hero-panels, .about-grid { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
  .hero-text { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-img { order: -1; }
  .hero-img img { width: min(260px, 70%); }
  .about-grid { gap: 20px; }
  .about-img { max-width: 520px; margin: 30px auto; }
  .info-cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .section { padding: 60px 0; }
  .section-header h2 { font-size: 28px; }
  .info-cards, .footer-grid, .form-row, .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .event { padding: 14px; gap: 14px; }
  .event-date { flex-basis: 60px; height: 66px; }
  .map-frame { aspect-ratio: 4 / 5; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery-open figcaption { padding: 10px; }
  .gallery-open figcaption strong { font-size: 15px; }
  .gallery-open figcaption span { display: none; }
  .tab-panel { padding: 18px; }
  .auth-card { padding: 28px 20px 22px; }
  .auth-links { margin: 20px -20px -22px; padding: 16px 20px; }
  .lightbox figure { padding: 70px 10px 20px; }
  .lb-nav { top: auto; bottom: 16px; translate: none; }
  .doc-list li { flex-direction: column; align-items: flex-start; }
}
