/* ==========================================================================
   Campagne : feuille de style
   La couleur principale (--primary) vient des réglages de l'application.
   ========================================================================== */

/* Charte « Élan » : Outfit pour les textes, Fugaz One réservée aux accents d'affichage */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/outfit-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Fugaz One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/fugaz-one-latin.woff2) format("woff2");
}

:root {
  /* Palette de la mini-charte */
  --navy: #003678;      /* Bleu profond */
  --blue: #0052A6;      /* Bleu avenir */
  --sun: #FFC400;       /* Jaune soleil */
  --gold: #F2AD00;      /* Or du lettrage */
  --cyan: #008ED4;      /* Cyan */
  /* Interface */
  --paper: #F1F4F9;
  --card: #FFFFFF;
  --ink: #14223D;
  --ink-2: #485673;
  --ink-3: #627089;
  --line: #D6DEE9;
  --line-2: #E6EBF2;
  --primary: var(--navy);
  --on-primary: #FFFFFF;
  --primary-soft: #E6EDF7;
  --primary-ink: var(--navy);
  --yes: #1E7A4C;
  --maybe: #9A6406;
  --no: #AE4036;
  --r-lg: 14px;
  --r: 9px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fugaz One", "Outfit", sans-serif;
  --nav-w: 280px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h2 { font-size: 20px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 600; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--ink-3); }
.hint { display: block; font-weight: 400; font-size: 13px; color: var(--ink-3); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--r); }
.skip:focus { left: 8px; }

.h-display {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}
.lede { margin-top: 6px; color: var(--ink-2); font-size: 16px; }

/* ---------- Coquille : barre de marque, navigation ---------- */
.side { display: contents; }
.brandbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
.brand-logo { display: none; }
.brand-symbol { width: 58px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text strong { font-size: 16.5px; font-weight: 700; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: 13px; color: #A67600; font-weight: 600; }
.brandbar-me { text-decoration: none; border-radius: 50%; }

.mainnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 7px;
  border: 0; background: none; cursor: pointer;
  color: var(--ink-3); text-decoration: none;
  font: 600 12px/1.1 var(--font);
}
.nav-item .ic { width: 24px; height: 24px; }
.nav-item.is-active { color: var(--navy); font-weight: 700; box-shadow: inset 0 3px 0 var(--sun); }
.nav-secondary { display: none; }
.main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 16px 112px; }

@media (min-width: 900px) {
  .shell {
    display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr);
    min-height: 100vh;
    background: linear-gradient(to right, var(--card) calc(var(--nav-w) - 1px), var(--line) calc(var(--nav-w) - 1px), var(--line) var(--nav-w), transparent var(--nav-w));
  }
  .side {
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
  }
  .brandbar { position: static; padding: 24px 20px 18px; border: 0; background: none; }
  .brand-logo { display: block; width: 240px; height: auto; }
  .brand-symbol, .brand-text { display: none; }
  .brandbar-me { display: none; }
  .mainnav {
    position: static; flex: 1;
    display: flex; flex-direction: column; gap: 2px;
    padding: 4px 12px 16px; border: 0; background: none;
  }
  .nav-item {
    flex-direction: row; gap: 12px; width: 100%;
    padding: 10px 12px; border-radius: var(--r);
    font-size: 15px; color: var(--ink-2); text-align: left;
  }
  .nav-item:hover { background: var(--paper); color: var(--ink); }
  .nav-item.is-active { background: var(--primary-soft); color: var(--navy); box-shadow: inset 3px 0 0 var(--sun); }
  .nav-item .ic { width: 20px; height: 20px; }
  .nav-secondary {
    display: flex; flex-direction: column; gap: 2px;
    margin-top: auto; padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .nav-secondary .av-sm { width: 22px; height: 22px; font-size: 10px; border: 0; }
  .main { padding: 36px 44px 72px; }
}

/* ---------- Titres de page, sections ---------- */
.page-head { margin-bottom: 22px; }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head h2 { display: flex; align-items: center; gap: 8px; }
.n { display: inline-block; min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: 13px; font-weight: 600; text-align: center; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 14px; color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.back:hover { color: var(--ink); }
.link { color: var(--primary-ink); font-size: 14px; font-weight: 600; text-underline-offset: 3px; text-decoration-thickness: 1px; white-space: nowrap; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px;
  border: 1px solid transparent; border-radius: var(--r);
  background: var(--primary); color: var(--on-primary);
  font: 650 15px/1.2 var(--font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--blue); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); }
.btn-danger { background: var(--card); color: var(--no); border-color: color-mix(in srgb, var(--no) 35%, white); }
.btn-danger:hover { background: color-mix(in srgb, var(--no) 8%, white); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); color: var(--ink);
}
.icon-btn:hover { background: var(--paper); }
.linkish { padding: 0; border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--no); }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.form h2 { margin-bottom: 2px; }
.form h2.mt { margin-top: 10px; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; color: var(--ink);
  font: 400 16px/1.4 var(--font);
}
select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23485361' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cyan); outline-offset: -1px; border-color: var(--blue); }
input[type=file] { font: 400 14px var(--font); color: var(--ink-2); }
.input-short { max-width: 140px; }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.row2, .row3 { display: grid; gap: 14px; }
@media (min-width: 560px) {
  .row2 { grid-template-columns: 1fr 1fr; }
  .row3 { grid-template-columns: 1.3fr 1fr 1fr; }
}
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.narrow { max-width: 720px; }
.danger-zone { margin-top: 16px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-form select { width: auto; min-width: 160px; }
.inline-label { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.color-field { display: flex; align-items: center; gap: 12px; }
.color-field input { width: 56px; height: 44px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; }
.color-field code { font-size: 14px; color: var(--ink-2); }

/* ---------- Messages ---------- */
.flashes { display: grid; gap: 8px; margin-bottom: 18px; }
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card);
}
.flash .ic { margin-top: 2px; }
.flash-ok .ic { color: var(--yes); }
.flash-error { border-color: color-mix(in srgb, var(--no) 40%, white); background: color-mix(in srgb, var(--no) 6%, white); }
.flash-error .ic { color: var(--no); }

/* ---------- Avatars ---------- */
.av {
  --av: #4F5D86;
  width: 30px; height: 30px; flex: none;
  display: inline-grid; place-items: center;
  border: 2px solid #fff; border-radius: 50%;
  background: var(--av); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; line-height: 1;
}
.av-sm { width: 26px; height: 26px; font-size: 10.5px; }
.av-lg { width: 64px; height: 64px; font-size: 22px; border-width: 3px; }
.av-stack { display: inline-flex; }
.av-stack .av + .av { margin-left: -5px; }
.av-more { background: var(--line); color: var(--ink-2); }

/* ---------- Badges, onglets, filtres ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: 12.5px; font-weight: 650; vertical-align: 2px; }
.badge-ok { background: color-mix(in srgb, var(--yes) 12%, white); color: var(--yes); }
.badge-off { background: color-mix(in srgb, var(--no) 10%, white); color: var(--no); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--tag) 13%, white); color: color-mix(in srgb, var(--tag) 85%, black); font-size: 13px; font-weight: 650; }

.tabs { display: inline-flex; gap: 2px; padding: 3px; margin-bottom: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; color: var(--ink-2); font-size: 14.5px; font-weight: 650; text-decoration: none; }
.tab:hover { color: var(--ink); }
.tab.is-active { background: var(--navy); color: #fff; }
.tab-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: var(--navy); font-size: 12px; font-weight: 700; text-align: center; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 16px; }
.toolbar-text { flex: 1 1 260px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.toolbar .chips { margin-bottom: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); font-size: 14px; text-decoration: none; }
.chip span { color: var(--ink-3); font-size: 12.5px; }
.chip:hover { border-color: var(--ink-3); }
.chip.is-active { border-color: var(--navy); color: var(--navy); font-weight: 650; box-shadow: inset 0 0 0 1px var(--navy); }
.sort { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; }
.sort-opt { color: var(--ink-2); text-decoration: none; }
.sort-opt.is-active { color: var(--ink); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.search { position: relative; flex: 1 1 260px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 40px !important; }

/* ---------- États vides, erreurs ---------- */
.empty { padding: 28px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); background: color-mix(in srgb, var(--card) 60%, transparent); color: var(--ink-2); text-align: center; }
.empty p + .btn { margin-top: 14px; }
.empty-page { max-width: 520px; margin: 40px auto; display: grid; gap: 10px; justify-items: center; }
.empty-code { font-size: 64px; font-weight: 850; line-height: 1; color: var(--ink-3); }

/* ==========================================================================
   Tableau de bord
   ========================================================================== */
.poster {
  display: grid;
  margin-bottom: 30px;
  border-radius: var(--r-lg);
  background: var(--navy); color: #fff;
  overflow: hidden;
}
.poster :focus-visible { outline-color: var(--sun); }
.poster-main { padding: 22px 22px 18px; display: flex; flex-direction: column; min-width: 0; }
.poster-kicker { margin-bottom: 10px; color: var(--sun); font-size: 15px; font-weight: 600; }
.poster-title {
  max-width: 24ch;
  font-size: clamp(28px, 4.4vw, 50px);
  font-weight: 800;
  line-height: 1.04; letter-spacing: -0.02em;
  text-wrap: balance;
}
.poster-waves { display: block; width: 200px; height: auto; margin: 18px 0 4px; }
.poster-body { margin-top: 12px; max-width: 62ch; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, 0.92); }
.poster-body a { color: inherit; }
.poster-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 22px; font-size: 13.5px; }
.poster-foot > span { color: rgba(255, 255, 255, 0.72); }
.poster-edit {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--r);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
}
.poster-edit:hover { background: rgba(255, 255, 255, 0.12); }
.poster-count {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
  padding: 14px 22px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.count-num { font-family: var(--font-display); font-size: 44px; line-height: 1; color: var(--sun); white-space: nowrap; }
.count-label { font-size: 14px; color: rgba(255, 255, 255, 0.85); }
@media (min-width: 760px) {
  .poster { grid-template-columns: minmax(0, 1fr) auto; }
  .poster-main { padding: 30px 34px 26px; }
  .poster-count {
    flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px;
    min-width: 250px;
    padding: 30px 34px 28px;
    border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.2);
  }
  .count-num { font-size: 76px; }
}

.dash-grid { display: grid; gap: 32px; }
.dash-side { display: grid; gap: 28px; align-content: start; min-width: 0; }
.dash-events { min-width: 0; }
@media (min-width: 1140px) {
  .dash-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}
.add-under { margin-top: 12px; }

.pending { padding: 14px 16px; border-radius: var(--r-lg); background: #FFF6D9; border: 1px solid #F6D77E; }
.pending h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--navy); }
.pending h2 .ic { color: #B07D00; }
.pending ul { margin: 8px 0 0; padding-left: 28px; display: grid; gap: 4px; }
.pending a { font-weight: 600; }

.news { display: grid; }
.news-item { padding: 14px 0; border-top: 1px solid var(--line-2); }
.news-item:first-child { border-top: 0; padding-top: 2px; }
.news-item h3 { display: flex; align-items: baseline; gap: 6px; font-size: 17px; font-weight: 700; }
.news-item .pin { color: #B07D00; display: inline-flex; transform: translateY(2px); }
.news-body { margin-top: 4px; color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.news-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; color: var(--ink-3); }

.composer { margin-bottom: 14px; }
.composer > summary { cursor: pointer; }
.composer[open] > summary { margin-bottom: 12px; }
.composer-form { padding: 16px; border-radius: var(--r); background: var(--paper); }
.composer-idea .composer-form { background: var(--card); border: 1px solid var(--line); }

/* ==========================================================================
   Événements (liste)
   ========================================================================== */
.ev-list { display: grid; gap: 10px; container-type: inline-size; }
.ev {
  display: grid; grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.ev.is-past { opacity: 0.62; }
.ev-date {
  align-self: start;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden; text-decoration: none;
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff;
}
.ev-wd { display: block; width: 100%; padding: 2px 0 3px; background: var(--cat); color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; }
.ev-d { padding-top: 3px; font-size: 25px; font-weight: 700; line-height: 1.05; color: var(--navy); }
.ev-m { padding-bottom: 5px; font-size: 12px; color: var(--ink-3); }
.ev-body { min-width: 0; }
.ev-title { font-size: 16.5px; font-weight: 600; line-height: 1.25; text-decoration: none; }
.ev-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 3px 12px; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.ev-meta span { display: inline-flex; align-items: center; gap: 4px; }
.ev-cat { color: color-mix(in srgb, var(--cat) 85%, black); font-weight: 600; }
.ev-people { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }
.ev .rsvp { grid-column: 1 / -1; }
@container (min-width: 620px) {
  .ev { grid-template-columns: 62px minmax(0, 1fr) auto; align-items: center; }
  .ev .rsvp { grid-column: 3; grid-row: 1; }
  .ev .rsvp-btn { flex: none; }
}

/* Boutons de présence */
.rsvp { display: flex; gap: 6px; }
.rsvp-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; color: var(--ink-2);
  font: 650 14.5px/1.1 var(--font);
  cursor: pointer; white-space: nowrap;
}
.rsvp-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.rsvp-btn .ic { width: 17px; height: 17px; }
.rsvp-oui.is-on { background: var(--yes); border-color: var(--yes); color: #fff; }
.rsvp-peutetre.is-on { background: var(--maybe); border-color: var(--maybe); color: #fff; }
.rsvp-non.is-on { background: var(--no); border-color: var(--no); color: #fff; }
.rsvp-compact .rsvp-btn { min-height: 38px; padding: 6px 10px; font-size: 13.5px; }

/* ==========================================================================
   Agenda (grille mensuelle)
   ========================================================================== */
.month-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.month-title { min-width: 0; padding: 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.cal { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; font-weight: 650; }
.cal-day {
  min-width: 0; min-height: 108px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 6px;
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-week:last-child .cal-day { border-bottom: 0; }
.cal-day.is-out { background: #F6F7F4; }
.cal-day.is-out .cal-num { color: #A3AAB3; }
.cal-num {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 14px; font-weight: 650; text-decoration: none;
}
.cal-num:hover { background: var(--paper); }
.cal-day.is-today .cal-num { background: var(--sun); color: var(--navy); font-weight: 800; }
.cal-evs { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-ev {
  display: block; padding: 3px 6px;
  border-left: 3px solid var(--cat); border-radius: 3px;
  background: color-mix(in srgb, var(--cat) 12%, white);
  color: color-mix(in srgb, var(--cat) 70%, black);
  font-size: 12.5px; font-weight: 600; line-height: 1.25;
  text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-ev:hover { background: color-mix(in srgb, var(--cat) 22%, white); }
.cal-ev b { font-weight: 800; }
.cal-more { padding-left: 6px; color: var(--ink-2); font-size: 12px; }
@media (max-width: 640px) {
  .cal-head span { padding: 6px 0; text-align: center; font-size: 11.5px; }
  .cal-day { min-height: 56px; padding: 4px 1px 6px; align-items: center; }
  .cal-num { width: 30px; height: 30px; font-size: 13.5px; }
  .cal-evs { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .cal-ev { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--cat); }
  .cal-ev-t, .cal-more { display: none; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 30px; padding: 0; list-style: none; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--cat); }
.month-list h2 { margin-bottom: 12px; }
.day-group { scroll-margin-top: 80px; }
.day-group + .day-group { margin-top: 10px; }
.day-group:target .ev { border-color: var(--ink-3); }

/* ---------- Détail d'un événement ---------- */
.detail { display: grid; gap: 22px; max-width: 880px; }
.detail-head .h-display { margin-top: 10px; }
.facts { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--ink-2); }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts .ic { color: var(--ink-3); }
.prose { margin-top: 16px; max-width: 68ch; overflow-wrap: anywhere; }
.rsvp-panel h2 { margin-bottom: 12px; }
.rsvp-panel .rsvp { max-width: 520px; }
.rsvp-panel .hint { margin-top: 8px; }
.need { margin-bottom: 16px; }
.need-bar { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: var(--line-2); max-width: 520px; }
.need-bar span { display: block; height: 100%; background: var(--maybe); }
.need-bar.is-full span { background: var(--yes); }
.people-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.people-col { padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.people-col h3 { display: flex; align-items: center; gap: 6px; }
.people-col h3 .n { margin-left: auto; }
.people-oui h3 { color: var(--yes); }
.people-peutetre h3 { color: var(--maybe); }
.people-non h3 { color: var(--no); }
.people-col ul, .silent-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.people-col li, .silent-list li { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.silent { margin-top: 14px; }
.silent summary { cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.silent-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   Boîte à idées : post-it
   ========================================================================== */
.wall { display: grid; gap: 22px 18px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); padding: 4px 2px 8px; }
.wall-mini { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.postit {
  --note: #FFE9A3;
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 196px;
  padding: 16px 16px 12px;
  border-radius: 2px;
  background: var(--note);
  box-shadow: 0 1px 1px rgba(23, 32, 43, 0.08), 0 10px 16px -10px rgba(23, 32, 43, 0.4);
  transform: rotate(var(--tilt, 0deg));
}
.wall .postit:nth-child(4n+1) { --tilt: -0.9deg; }
.wall .postit:nth-child(4n+2) { --tilt: 0.6deg; }
.wall .postit:nth-child(4n+3) { --tilt: -0.3deg; }
.wall .postit:nth-child(4n) { --tilt: 0.8deg; }
.postit-mini { min-height: 120px; padding: 12px 12px 10px; }
.postit-cat { font-size: 12.5px; font-weight: 650; color: rgba(23, 32, 43, 0.62); }
.postit-title { font-size: 18.5px; font-weight: 700; line-height: 1.2; text-decoration: none; overflow-wrap: anywhere; }
.postit-mini .postit-title { font-size: 16px; }
a.postit-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.postit-body { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; color: rgba(23, 32, 43, 0.8); }
.postit-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; font-size: 13px; color: rgba(23, 32, 43, 0.72); }
.postit-foot span { display: inline-flex; align-items: center; gap: 4px; }
.postit-author { min-width: 0; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(23, 32, 43, 0.22); border-radius: 999px;
  background: rgba(255, 255, 255, 0.6); color: var(--ink);
  font: 700 14px/1 var(--font);
  cursor: pointer;
}
.vote-btn:hover { background: #fff; }
.vote-btn.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.vote-btn .ic { width: 16px; height: 16px; }
.stamp {
  position: absolute; top: 12px; right: 12px;
  padding: 1px 8px;
  border: 2px solid currentColor; border-radius: 4px;
  font-size: 13px; font-weight: 800;
  transform: rotate(5deg);
  background: rgba(255, 255, 255, 0.35);
}
.stamp-etude { color: #8A5A05; }
.stamp-retenue { color: var(--yes); }
.stamp-ecartee { color: var(--no); }

.postit-big { min-height: 0; padding: 22px 24px 18px; gap: 10px; transform: rotate(-0.4deg); max-width: 760px; }
.postit-big .postit-title { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.015em; padding-right: 90px; }
.postit-text { font-size: 16.5px; line-height: 1.55; color: rgba(23, 32, 43, 0.86); max-width: 64ch; overflow-wrap: anywhere; }
.postit-big .postit-foot { flex-wrap: wrap; margin-top: 12px; }
.voters { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }

.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.cat-pick legend { margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.form .cat-opt { display: inline-flex; align-items: center; gap: 0; cursor: pointer; }
.cat-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cat-opt span { padding: 7px 14px; border-radius: 2px; background: var(--note); color: var(--ink); font-weight: 600; font-size: 14px; border: 2px solid transparent; box-shadow: 0 1px 2px rgba(23, 32, 43, 0.15); }
.cat-opt input:checked + span { border-color: var(--ink); }
.cat-opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.comments { display: grid; gap: 14px; margin-bottom: 14px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; overflow-wrap: anywhere; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; font-size: 13.5px; }
.comment-meta span { color: var(--ink-3); }
.comment-del { margin-left: auto; }
.comment-form { max-width: 720px; }

/* ---------- Sondages ---------- */
.poll-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.poll-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.poll-item.is-closed { opacity: 0.7; }
.poll-link { flex: 1; min-width: 0; display: grid; gap: 2px; text-decoration: none; }
.poll-q { font-size: 17px; font-weight: 700; }
.poll-link:hover .poll-q { text-decoration: underline; text-underline-offset: 3px; }
.poll-meta { font-size: 13.5px; color: var(--ink-3); }

.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  cursor: pointer;
}
.opt:hover { border-color: var(--ink-3); }
.opt input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--primary); cursor: pointer; }
.opt.is-best { border-color: var(--yes); box-shadow: inset 0 0 0 1px var(--yes); }
.opt-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.opt-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.opt-label { font-size: 16.5px; font-weight: 650; overflow-wrap: anywhere; }
.opt-n { font-size: 22px; font-weight: 800; line-height: 1; color: var(--navy); }
.opt.is-best .opt-n { color: var(--yes); }
.opt-bar { height: 6px; overflow: hidden; border-radius: 99px; background: var(--line-2); }
.opt-bar span { display: block; height: 100%; background: var(--primary); }
.opt.is-best .opt-bar span { background: var(--yes); }
.opt-who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.opt-who > span:last-child { min-width: 0; }
.sticky-actions {
  position: sticky; bottom: 76px; z-index: 5;
  margin-top: 14px; padding: 10px 0;
  background: linear-gradient(to top, var(--paper) 70%, transparent);
}
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }

/* ==========================================================================
   Contacts : fiches bristol
   ========================================================================== */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
.fiche {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px 12px;
  background: var(--card);
  border: 1px solid var(--line); border-radius: 6px;
}
.fiche-head { position: relative; padding-bottom: 10px; border-bottom: 2px solid var(--sun); }
.fiche-name { padding-right: 4px; font-size: 18px; font-weight: 700; color: var(--navy); }
.fiche-sub { margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.fiche-cat { display: inline-block; margin-top: 8px; padding: 1px 8px; border-radius: 999px; background: var(--paper); color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.fiche-lines { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.fiche-lines a { display: inline-flex; align-items: flex-start; gap: 9px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.fiche-lines a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.fiche-lines .ic { margin-top: 2px; color: var(--ink-3); }
.fiche-notes { padding: 8px 10px; border-radius: 4px; background: var(--paper); color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.fiche-foot { display: flex; justify-content: flex-end; margin-top: auto; }

.team-intro { margin-bottom: 14px; }
.team { overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.team-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px; align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line-2);
}
.team-row:first-child { border-top: 0; }
.team-row .av { grid-row: span 3; }
.team-name { font-weight: 650; }
.team-phone a, .team-mail a { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.team-phone a:hover, .team-mail a:hover { color: var(--ink); text-decoration: underline; }
@media (min-width: 760px) {
  .team-row { grid-template-columns: auto minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 1.3fr); }
  .team-row .av { grid-row: auto; }
}

/* ==========================================================================
   Profil, réglages
   ========================================================================== */
.profile-head { display: flex; align-items: center; gap: 16px; }
.profile-grid { display: grid; gap: 28px; }
.profile-forms { display: grid; gap: 16px; align-content: start; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 1100px) { .profile-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }

.admin-grid { display: grid; gap: 18px; margin-bottom: 18px; }
@media (min-width: 1000px) { .admin-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; } }
.logo-preview { display: grid; justify-items: start; gap: 8px; margin: 12px 0 16px; }
.logo-preview img { max-height: 110px; width: auto; }
.invite-link { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.invite-link code, .color-field code { padding: 2px 6px; border-radius: 4px; background: var(--paper); }
.members { display: grid; margin-bottom: 16px; }
.member { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.member:first-child { border-top: 0; }
.member.is-off { opacity: 0.6; }
.member-id { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.member-id .muted { font-size: 13.5px; overflow-wrap: anywhere; }
.member-actions { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; }

/* ==========================================================================
   Connexion, inscription
   ========================================================================== */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px 16px; }
.auth-card { width: 100%; max-width: 440px; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.auth-brand { display: flex; justify-content: center; padding: 26px 24px 4px; }
.auth-logo { width: 260px; height: auto; }
.auth-body { display: grid; gap: 16px; padding: 14px 28px 8px; }
.auth-title { font-size: 21px; font-weight: 700; color: var(--navy); }
.auth-alt { font-size: 14px; color: var(--ink-2); }
.auth .flashes { margin-bottom: 0; }
.auth-waves { display: block; width: 180px; height: auto; margin: 14px auto 22px; }
.auth-foot { font-size: 13px; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

.brand-panel img { display: block; width: 200px; height: auto; margin: 10px 0 12px; }
