/* Club Médical du Grand Boulogne — feuille unique.
   Charte : bleu nuit 0E2235, orange E4572E, sarcelle 0F7385, pêche FFE3D8, fond F6F7F9.
   Thème sombre par [data-theme="dark"] (posé par mode-jour-nuit.js). */

@font-face {
  font-family: "Manrope";
  src: url("polices/Manrope-VariableFont_wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --fond: #F6F7F9;
  --surface: #FFFFFF;
  --surface-2: #EEF2F5;
  --texte: #0E2235;
  --attenue: #42566B;
  --discret: #5F7183;
  --trait: #D9E0E7;
  --nuit: #0E2235;
  --orange: #E4572E;
  --orange-texte: #B8401C;   /* orange lisible sur fond clair (contraste ≥ 4,5) */
  --sarcelle: #0F7385;
  --peche: #FFE3D8;
  --peche-texte: #7A2A10;
  --lien: #0F7385;
  --ombre: 0 1px 2px rgba(14, 34, 53, .06), 0 4px 16px rgba(14, 34, 53, .06);
  --rayon: 14px;
  --mesure: 68ch;
  color-scheme: light;
}

[data-theme="dark"] {
  --fond: #0B1824;
  --surface: #13283B;
  --surface-2: #17324A;
  --texte: #F2F5F7;
  --attenue: #A9BCCB;
  --discret: #8FA3B4;
  --trait: #22445F;
  --orange-texte: #FF8A5C;
  --sarcelle: #5FC3D3;
  --peche: #3A2318;
  --peche-texte: #FFD2C0;
  --lien: #7FD3E0;
  --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--lien); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); font-weight: 750; margin: .2em 0 .5em; }
h2 { font-size: 1.45rem; font-weight: 720; margin: 1.8em 0 .6em; }
h3 { font-size: 1.12rem; font-weight: 700; margin: 1.4em 0 .4em; }
p, li { max-width: var(--mesure); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement { position: absolute; left: -999px; top: 0; background: var(--nuit); color: #fff; padding: .6em 1em; z-index: 10; }
.evitement:focus { left: 1em; }

/* ---------- en-tête ---------- */
.entete { background: var(--nuit); color: #F2F5F7; }
.entete-int { max-width: 1240px; margin: 0 auto; padding: 18px 24px 0; }
.marque { display: inline-flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; padding-right: 190px; }
.marque img { width: 54px; height: 54px; flex: none; }
.marque-nom { display: block; font-weight: 780; font-size: 1.3rem; letter-spacing: -.01em; line-height: 1.15; }
.marque-sous { display: block; color: #A9BCCB; font-size: .88rem; font-weight: 500; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 14px -10px 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 10px 12px 12px; color: #DDE6EC; text-decoration: none; font-weight: 600; font-size: .95rem;
  border-bottom: 3px solid transparent;
}
.nav a:hover { color: #fff; border-bottom-color: #42566B; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--orange); }

/* ---------- mise en page ---------- */
.cadre {
  max-width: 1240px; margin: 0 auto; padding: 32px 24px 56px;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start;
}
.contenu { min-width: 0; }
.colonne { position: sticky; top: 16px; display: grid; gap: 18px; }
@media (max-width: 960px) {
  .cadre { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .colonne { position: static; }
  .marque { padding-right: 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .entete-int { padding: 14px 16px 0; }
  .cadre { padding: 22px 16px 40px; }
  .marque img { width: 44px; height: 44px; }
  .marque-nom { font-size: 1.1rem; }
  .nav { margin: 10px -8px 0; }
  .nav a { padding: 8px 8px 10px; font-size: .9rem; }
}

.chapeau { font-size: 1.12rem; color: var(--attenue); max-width: 60ch; }
.surtitre { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 750; color: var(--orange-texte); margin: 0; }

/* ---------- cartes et encadrés ---------- */
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 20px 22px; box-shadow: var(--ombre); }
.carte > :first-child { margin-top: 0; }
.carte > :last-child { margin-bottom: 0; }
.encadre { background: var(--peche); color: var(--peche-texte); border-left: 5px solid var(--orange); border-radius: 10px; padding: 14px 18px; margin: 1.2em 0; max-width: 72ch; }
.encadre p { margin: .3em 0; }
.encadre strong { color: inherit; }
.info { background: var(--surface-2); border-left: 5px solid var(--sarcelle); border-radius: 10px; padding: 14px 18px; margin: 1.2em 0; max-width: 72ch; }
.info p { margin: .3em 0; }

.bouton {
  display: inline-flex; align-items: center; gap: .5em; background: #C8461F; color: #fff; text-decoration: none;
  font-weight: 700; padding: .7em 1.2em; border-radius: 999px; border: 0; font: inherit; font-weight: 700; cursor: pointer;
}
.bouton:hover { background: #A93B19; text-decoration: none; }
.bouton.second { background: transparent; color: var(--texte); box-shadow: inset 0 0 0 2px var(--trait); }
.bouton.second:hover { box-shadow: inset 0 0 0 2px var(--sarcelle); background: transparent; }
.boutons { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0; }

/* ---------- étapes (comment venir) ---------- */
.etapes { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); counter-reset: etape; }
.etapes li { counter-increment: etape; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px 18px 16px; position: relative; max-width: none; }
.etapes li::before {
  content: counter(etape); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--sarcelle); color: #fff; font-weight: 800; margin-bottom: 10px;
}
[data-theme="dark"] .etapes li::before { color: #0B1824; }
.etapes h3 { margin: 0 0 .3em; font-size: 1.02rem; }
.etapes p { margin: 0; font-size: .95rem; color: var(--attenue); }

/* ---------- soirée mise en avant (accueil) ---------- */
.vedette { background: var(--nuit); color: #F2F5F7; border-radius: 18px; padding: 26px 28px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin: 1.2em 0 1.6em; }
[data-theme="dark"] .vedette { background: #17324A; }
.vedette .surtitre { color: #FF8A5C; }
.vedette h2 { margin: .25em 0 .3em; font-size: 1.5rem; color: #fff; }
.vedette p { margin: .2em 0; color: #C9D6E0; }
.vedette a:not(.bouton) { color: #9FE0EA; }
.vedette .bouton.second { color: #fff; box-shadow: inset 0 0 0 2px #42566B; }
.date-bloc { width: 112px; text-align: center; border-radius: 14px; overflow: hidden; background: #fff; color: var(--nuit); box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.date-bloc .j-sem { display: block; background: var(--orange); color: #fff; font-weight: 750; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; padding: 5px 0; }
.date-bloc .j-num { display: block; font-size: 2.6rem; font-weight: 800; line-height: 1.1; padding-top: 6px; }
.date-bloc .j-mois { display: block; font-weight: 700; font-size: .9rem; padding-bottom: 8px; }
@media (max-width: 560px) { .vedette { grid-template-columns: 1fr; padding: 22px 20px; } }

.pastille { display: inline-block; font-size: .76rem; font-weight: 750; letter-spacing: .03em; padding: .2em .65em; border-radius: 999px; vertical-align: .1em; }
.pastille.dpc { background: var(--sarcelle); color: #fff; }
[data-theme="dark"] .pastille.dpc { color: #0B1824; }
.pastille.flou { background: transparent; color: var(--attenue); box-shadow: inset 0 0 0 1.5px var(--trait); }
.vedette .pastille.flou { color: #C9D6E0; box-shadow: inset 0 0 0 1.5px #42566B; }
.pastille.compte { background: var(--orange); color: #fff; }

/* ---------- colonne de droite : calendrier ---------- */
.agenda { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; }
.agenda-tete { background: var(--nuit); color: #fff; padding: 14px 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
[data-theme="dark"] .agenda-tete { background: #17324A; }
.agenda-tete h2 { margin: 0; font-size: 1.05rem; color: #fff; }
.agenda-tete span { color: #A9BCCB; font-size: .8rem; }
.agenda ol { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--trait); max-width: none; }
.agenda li:first-child { border-top: 0; }
.agenda li.prochaine { background: var(--peche); }
.agenda li.prochaine .a-titre { color: var(--peche-texte); }
.a-date { text-align: center; border: 1.5px solid var(--trait); border-radius: 10px; padding: 0 0 5px; line-height: 1.1; background: var(--surface); align-self: start; overflow: hidden; }
.a-date .a-sem { display: block; background: var(--orange); color: #fff; font-size: .62rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; padding: 2px 0 3px; margin-bottom: 3px; }
.a-date b { display: block; font-size: 1.35rem; font-weight: 800; }
.a-date small { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--attenue); letter-spacing: .04em; }
li.prochaine .a-date { border-color: var(--orange); }
.a-titre { font-weight: 700; font-size: .93rem; line-height: 1.35; margin: 0 0 2px; }
.a-meta { font-size: .82rem; color: var(--attenue); margin: 0; line-height: 1.4; }
.a-badge { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-texte); margin-bottom: 2px; }
.agenda-pied { padding: 12px 18px; border-top: 1px solid var(--trait); font-size: .88rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.agenda-vide { padding: 16px 18px; color: var(--attenue); font-size: .93rem; }

.bloc-cote { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px; box-shadow: var(--ombre); }
.bloc-cote h2 { font-size: 1rem; margin: 0 0 .6em; }
.bloc-cote p { font-size: .92rem; margin: .3em 0; }
.partenaires { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.partenaires li { max-width: none; }
.partenaires a { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: start; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--texte); }
.partenaires img { grid-row: span 2; width: 40px; height: 40px; border-radius: 9px; object-fit: cover; margin-top: 2px; }
.partenaires a:hover { background: var(--surface-2); }
.partenaires b { display: block; font-size: .95rem; color: var(--lien); }
.partenaires span { display: block; font-size: .82rem; color: var(--attenue); line-height: 1.35; }

/* ---------- programme (page Soirées) ---------- */
.programme { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 14px; }
.programme li { max-width: none; }
.soiree { display: grid; grid-template-columns: 92px 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px; box-shadow: var(--ombre); }
.soiree.prochaine { border: 2px solid var(--orange); }
.soiree .date-bloc { width: 92px; box-shadow: none; border: 1.5px solid var(--trait); }
.soiree .date-bloc .j-num { font-size: 2rem; }
.soiree h3 { margin: .1em 0 .25em; }
.soiree p { margin: .15em 0; color: var(--attenue); font-size: .95rem; }
.soiree .actions { margin-top: .6em; display: flex; flex-wrap: wrap; gap: 8px; }
.soiree .actions .bouton { font-size: .88rem; padding: .5em 1em; }
.passees .soiree { box-shadow: none; }
.passees .date-bloc .j-sem { background: #5F7183; }
@media (max-width: 520px) {
  .soiree { grid-template-columns: 1fr; gap: 10px; }
  .soiree .date-bloc { width: auto; justify-self: start; display: inline-flex; align-items: center; gap: .5em; padding-right: .8em; }
  .soiree .date-bloc .j-sem { padding: .45em .6em; }
  .soiree .date-bloc .j-num { font-size: 1.3rem; padding: 0; }
  .soiree .date-bloc .j-mois { padding: 0; }
}

/* ---------- tableaux, listes ---------- */
.tableau { width: 100%; border-collapse: collapse; font-size: .94rem; background: var(--surface); border-radius: 12px; overflow: hidden; }
.tableau th, .tableau td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th { background: var(--surface-2); font-weight: 750; }
.tableau-defile { overflow-x: auto; border: 1px solid var(--trait); border-radius: 12px; }
.bureau { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.bureau li { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 16px; max-width: none; }
.bureau b { display: block; }
.bureau span { color: var(--attenue); font-size: .92rem; }
.tuiles { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tuiles li { max-width: none; }
.tuiles a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px 18px; text-decoration: none; color: var(--texte); box-shadow: var(--ombre); }
.tuiles a:hover { border-color: var(--sarcelle); }
.tuiles b { display: block; color: var(--lien); font-size: 1.05rem; margin-bottom: .2em; }
.tuiles span { color: var(--attenue); font-size: .93rem; }
ol.tuto li { margin: .35em 0; }

/* ---------- bibliothèque ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0; align-items: end; }
.filtres label { display: grid; gap: 4px; font-size: .85rem; font-weight: 650; color: var(--attenue); }
.filtres input, .filtres select { font: inherit; font-size: .95rem; padding: .5em .7em; border-radius: 10px; border: 1.5px solid var(--trait); background: var(--surface); color: var(--texte); min-width: 180px; }
.filtres input { min-width: 260px; }
.compteur { font-size: .9rem; color: var(--attenue); margin: .4em 0 .8em; }
.biblio td.type { text-transform: uppercase; font-size: .78rem; font-weight: 700; color: var(--attenue); white-space: nowrap; }
.biblio td.annee { white-space: nowrap; font-variant-numeric: tabular-nums; }
.biblio th button { font: inherit; font-weight: 750; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
.nouveau { font-size: .7rem; font-weight: 800; color: var(--orange-texte); text-transform: uppercase; letter-spacing: .05em; margin-left: .4em; }

/* ---------- actualités ---------- */
.actu { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 22px 24px; margin: 0 0 22px; box-shadow: var(--ombre); }
.actu h2 { margin: .1em 0 .6em; }
.actu-date { margin: 0; font-size: .85rem; font-weight: 700; color: var(--orange-texte); text-transform: uppercase; letter-spacing: .05em; }
.actu-source { font-size: .82rem; color: var(--discret); margin-top: 1.2em; }
.actu ul, .actu ol { padding-left: 1.3em; }

/* ---------- outils (blocs repris tels quels, toujours sur fond clair) ---------- */
.outil-cadre { background: #fff; color: #1d2b3a; border-radius: var(--rayon); padding: 20px; border: 1px solid var(--trait); overflow-x: auto; }
.outil-cadre a { color: #0b5f6e; }

/* ---------- pied ---------- */
.pied { background: var(--nuit); color: #A9BCCB; font-size: .9rem; }
[data-theme="dark"] .pied { background: #07111B; }
.pied-int { max-width: 1240px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.pied a { color: #DDE6EC; }
.pied p { margin: .2em 0; max-width: none; }
.credit a { color: #fff; font-weight: 700; }

@media print {
  .entete, .colonne, .pied, #rochoy-mode { display: none !important; }
  .cadre { display: block; padding: 0; }
  body { background: #fff; }
}

/* miniature d'un article (actualités) */
.actu-photo { float: right; width: 240px; margin: .2em 0 12px 20px; }
.actu-photo img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--trait); }
.actu::after { content: ""; display: block; clear: both; }
@media (max-width: 640px) { .actu-photo { float: none; width: 100%; margin: .4em 0 12px; } }

/* formulaire « Ne rien rater » */
.formulaire { display: grid; gap: 10px; max-width: 34rem; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 18px 20px; }
.formulaire label { font-weight: 600; }
.formulaire input[type=email] { font: inherit; padding: .6em .8em; border-radius: 10px; border: 1.5px solid var(--trait); background: var(--fond, #fff); color: var(--texte); }
.formulaire .case { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.formulaire .case input { margin-top: .25em; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.petit { font-size: .88rem; color: var(--attenue); }

/* Couleur du haut des petits calendriers selon le jour de la semaine (le nom du jour y est
   toujours écrit : la couleur n'est qu'un repère en plus, lisible par un daltonien).
   Mardi orange et jeudi bleu, les deux soirs les plus fréquents, sont les plus faciles à distinguer. */
.jour-0 .j-sem, .jour-0 .a-sem { background: #6A3D9A; }  /* dimanche : violet */
.jour-1 .j-sem, .jour-1 .a-sem { background: #A63A6E; }  /* lundi : framboise */
.jour-2 .j-sem, .jour-2 .a-sem { background: #B8401C; }  /* mardi : orange */
.jour-3 .j-sem, .jour-3 .a-sem { background: #007A5E; }  /* mercredi : vert */
.jour-4 .j-sem, .jour-4 .a-sem { background: #0072B2; }  /* jeudi : bleu */
.jour-5 .j-sem, .jour-5 .a-sem { background: #8A5A00; }  /* vendredi : ambre */
.jour-6 .j-sem, .jour-6 .a-sem { background: #0F7385; }  /* samedi : sarcelle */
.passees .date-bloc .j-sem { background: #5F7183; }      /* soirées passées : gris */

/* sujets proposés (sujets.html) */
.sujets { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 12px; }
.sujets li { max-width: none; }
.sujet { display: grid; grid-template-columns: 70px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 14px 18px; }
.sujet.retenu { opacity: .8; }
.sujet h3 { margin: .1em 0 .3em; }
.sujet p { margin: .2em 0 .6em; color: var(--attenue); }
.sujet-voix { text-align: center; border: 1.5px solid var(--trait); border-radius: 12px; padding: 6px 0; align-self: start; }
.sujet-voix b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--orange-texte); }
.sujet-voix small { font-size: .75rem; color: var(--attenue); text-transform: uppercase; letter-spacing: .05em; }
.formulaire textarea, .formulaire input[type=text] { font: inherit; padding: .6em .8em; border-radius: 10px; border: 1.5px solid var(--trait); background: var(--fond, #fff); color: var(--texte); }
.sujet button[disabled] { opacity: .65; cursor: default; }
.bloc-sujets { border: 2px solid var(--orange); }
