/* Groupe Scolaire BAKAYE — feuille de style (site public + administration) */
:root {
  --primary: #1f7a3a;
  --primary-dark: #145a2a;
  --primary-soft: #e8f3eb;
  --accent: #e07b12;
  --accent-dark: #c2410c;
  --gold: #e8a317;
  --text: #1a2420;
  --muted: #5f6b66;
  --line: #e3e8e5;
  --bg: #ffffff;
  --bg-alt: #f6f8f6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 8px 24px rgba(16, 40, 24, .07);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
code { background: var(--bg-alt); padding: .1em .4em; border-radius: 6px; font-size: .9em; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; justify-content: center; }
.row-between { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: .6rem; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.25rem; border-radius: 10px; border: 1px solid transparent; background: var(--primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none !important; transition: background .15s, transform .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: .45rem .85rem; font-size: .9rem; border-radius: 8px; }
.btn-lg { padding: .95rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-light { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.5); color: #fff; }
.btn-light:hover { background: rgba(255,255,255,.25); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-danger { background: #b3261e; }
.btn-danger:hover { background: #8c1d17; }

/* Bandeau promo + en-tête */
.promo-bar { background: var(--accent-dark); color: #fff; font-size: .9rem; font-weight: 600; text-align: center; padding: .45rem 0; }
.promo-bar a { color: #fff; text-decoration: underline; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none !important; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand small { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); font-weight: 700; }
.brand strong { font-size: 1.35rem; font-weight: 800; color: var(--accent-dark); letter-spacing: .02em; }
.brand-light small { color: #a7d7b4; }
.brand-light strong { color: #fff; }
.main-nav { display: flex; align-items: center; gap: .25rem; }
.main-nav > a, .main-nav .dropdown > button { padding: .55rem .75rem; border-radius: 8px; color: var(--text); font-weight: 600; font-size: .95rem; background: none; border: 0; font-family: inherit; cursor: pointer; text-decoration: none; }
.main-nav > a:hover, .main-nav .dropdown > button:hover, .main-nav .active { background: var(--primary-soft); color: var(--primary); }
.main-nav .nav-cta { color: #fff; background: var(--accent); margin-left: .4rem; padding: .55rem 1rem; }
.main-nav .nav-cta:hover { color: #fff; background: var(--accent-dark); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 340px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem; display: none; }
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu { display: block; }
.dropdown-menu::before { content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px; }
.dropdown-menu a { display: flex; gap: .7rem; align-items: center; padding: .55rem .6rem; border-radius: 10px; color: var(--text); text-decoration: none; }
.dropdown-menu a:hover { background: var(--bg-alt); }
.dropdown-menu img { object-fit: contain; }
.dropdown-menu span { display: flex; flex-direction: column; }
.dropdown-menu small { color: var(--muted); font-size: .8rem; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: .75rem 16px 1.25rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; max-height: calc(100vh - 74px); overflow-y: auto; }
  .main-nav.open { display: flex; }
  .main-nav .dropdown > button { width: 100%; text-align: left; }
  .dropdown-menu { position: static; display: block; box-shadow: none; border: 0; min-width: 0; padding: 0 0 0 .5rem; }
  .main-nav .nav-cta { margin: .5rem 0 0; }
}

/* Hero */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--primary-dark); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(14,61,30,.95) 0%, rgba(20,90,42,.78) 55%, rgba(194,65,12,.55) 100%); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; }
.lead { font-size: 1.12rem; opacity: .92; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; align-items: center; }
.hero-card { background: rgba(255,255,255,.95); color: var(--text); border-radius: 24px; padding: 2rem; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.hero-card p { font-weight: 700; color: var(--accent-dark); margin: .5rem 0 0; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-card { display: none; } }

.stats { background: #fff; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 1.5rem 0; gap: 1rem; }
.stats strong { display: block; font-size: 1.6rem; color: var(--primary); font-weight: 800; }
.stats span { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 2rem; }
.section-head.row-between { max-width: none; align-items: flex-end; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.photo-stack { position: relative; padding: 0 0 3rem 3rem; }
.photo-stack img { border-radius: 18px; box-shadow: var(--shadow); display: block; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.photo-stack img + img { position: absolute; left: 0; bottom: 0; width: 46%; border: 6px solid #fff; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.ticks li { position: relative; padding-left: 1.7rem; margin-bottom: .45rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 800; }

/* Cartes écoles */
.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.25rem; }
.school-card { --c: var(--primary); background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; color: var(--text); text-decoration: none !important; }
.school-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(16,40,24,.12); }
.school-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.school-card-top img { object-fit: contain; }
.school-card h3 { color: var(--c); margin-bottom: .25rem; font-size: 1.3rem; }
.school-name { font-weight: 600; font-size: .92rem; margin-bottom: .5rem; }
.school-card .muted { font-size: .9rem; flex: 1; }
.school-card-actions { display: flex; gap: .5rem; margin-top: 1rem; }
.school-card.pick .pick-cta { font-weight: 700; color: var(--c); margin-top: .5rem; }
.school-card.disabled { opacity: .55; pointer-events: none; }

/* Badges */
.badge { display: inline-block; padding: .22rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge-green { background: #dcf3e2; color: #11622c; }
.badge-gray { background: #eceff1; color: #4b5563; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-teal { background: #ccfbf1; color: #115e59; }

/* Étapes */
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: how; }
.how li { counter-increment: how; background: var(--bg-alt); border-radius: var(--radius); padding: 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.how li::before { content: counter(how); width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: .5rem; }
.how span { color: var(--muted); font-size: .92rem; }
@media (max-width: 860px) { .how { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .how { grid-template-columns: 1fr; } }

/* Actualités */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.news-img { display: block; aspect-ratio: 16/9; background-size: cover; background-position: center; }
.news-body { padding: 1.1rem 1.2rem 1.3rem; }
.news-body h3 { margin: .3rem 0 .4rem; }
.news-body h3 a { color: var(--text); }
.article-img { border-radius: var(--radius); margin: 1rem 0 1.5rem; width: 100%; max-height: 440px; object-fit: cover; display: block; }
.pager { display: flex; gap: .4rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--text); padding: 0 .6rem; }
.pager a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Bandeau d'appel */
.cta-band { background: linear-gradient(110deg, var(--primary-dark), var(--primary)); color: #fff; padding: 3rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3rem; }
.cta-band p { margin: 0; opacity: .9; }

/* En-tête de page */
.page-hero { --c: var(--primary); background: linear-gradient(120deg, color-mix(in srgb, var(--c) 92%, #000) 0%, var(--c) 100%); background-color: var(--c); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page-hero.compact { padding: 2.2rem 0; }
.page-hero h1 { color: #fff; }
.page-hero .eyebrow { color: #ffe3a3; }
.page-hero a { color: #fff; text-decoration: underline; }
.page-hero .btn { text-decoration: none; }
.page-hero-inner { display: flex; gap: 1.75rem; align-items: center; }
.page-hero-logo { background: #fff; border-radius: 20px; padding: .6rem; object-fit: contain; flex-shrink: 0; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
@media (max-width: 640px) { .page-hero-inner { flex-direction: column; align-items: flex-start; } .page-hero-logo { width: 80px; height: 80px; } }

.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.aside { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 92px; }
@media (max-width: 920px) { .layout-aside { grid-template-columns: minmax(0, 1fr); } .aside { position: static; } }
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }

/* Cartes et tableaux */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .8rem; }
.card + .card { margin-top: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 1rem; }
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { background: var(--bg-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .group-row th { background: var(--primary-soft); color: var(--primary-dark); font-size: .9rem; }
.table tr.unread td { font-weight: 700; }
.table a.rowlink { color: var(--text); font-weight: 600; }

/* Tableau des frais en « cartes » sur téléphone */
@media (max-width: 640px) {
  .table.fees thead { display: none; }
  .table.fees, .table.fees tbody { display: block; }
  .table.fees tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .35rem .75rem; padding: .8rem .9rem; border-bottom: 1px solid var(--line); }
  .table.fees td { border: 0; padding: 0; text-align: left; font-size: .9rem; }
  .table.fees td:first-child { grid-column: 1 / -1; font-weight: 600; font-size: .95rem; }
  .table.fees td[data-label]::before { content: attr(data-label); display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
  .table.fees tr.group-row { display: block; padding: 0; }
  .table.fees .group-row th { display: block; }
}
.tab-list { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tab-list button { --c: var(--primary); display: flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; font-weight: 700; }
.tab-list button.active { background: var(--c); border-color: var(--c); color: #fff; }
.tab-list img { background: #fff; border-radius: 50%; object-fit: contain; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gap-lg { gap: 1.25rem; }
.span-2 { grid-column: span 2; }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

/* Formulaires */
.form fieldset { border: 0; padding: 0; margin: 0 0 1.75rem; }
.form legend { font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; padding: 0; }
.form legend { flex-wrap: wrap; }
.form legend > small { font-weight: 500; font-size: .82rem; }
@media (max-width: 640px) { .form legend > small { flex-basis: 100%; padding-left: calc(30px + .6rem); margin-top: -.3rem; } }
.form legend > span { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.form h2 { font-size: 1.2rem; margin-top: 1.5rem; }
.form h2:first-child { margin-top: 0; }
.form label, .form .label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .92rem; margin-bottom: .9rem; }
.form .grid-2 > label, .form .grid-3 > label, .form .grid-2 > .label { margin-bottom: 0; }
.form .grid-2, .form .grid-3 { margin-bottom: .9rem; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); width: 100%; max-width: 100%; min-width: 0; padding: .7rem .85rem; border: 1px solid #cfd8d3; border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,122,58,.15); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=file] { padding: .5rem; background: var(--bg-alt); }
input[type=color] { padding: .2rem; height: 44px; }
.form label.check { flex-direction: row; align-items: flex-start; gap: .55rem; font-weight: 500; }
.form label.check input { margin-top: .3rem; }
.radios { display: flex; gap: 1.25rem; padding-top: .45rem; }
.radios label { margin: 0; }
.field-error { color: #b3261e; font-size: .84rem; font-weight: 600; }
.fee-hint { background: var(--primary-soft); color: var(--primary-dark); padding: .7rem .9rem; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.inline-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.inline-form label { margin: 0; }
@media (max-width: 640px) { .inline-form { grid-template-columns: 1fr; } }

/* Alertes */
.alert { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid; font-size: .95rem; }
.alert-success { background: #ecfdf3; border-color: #a6e3bb; color: #14532d; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }

/* Confirmation / suivi */
.confirm { text-align: center; padding: 2.5rem 2rem; }
.confirm-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 2.2rem; display: grid; place-items: center; margin: 0 auto 1.25rem; }
.ref-box { display: inline-flex; flex-direction: column; gap: .2rem; padding: 1.2rem 2rem; border: 2px dashed var(--primary); border-radius: var(--radius); margin: 1rem 0 1.5rem; background: var(--primary-soft); }
.ref-box strong { font-size: clamp(1.35rem, 7vw, 2rem); white-space: nowrap; letter-spacing: .06em; color: var(--primary-dark); font-family: ui-monospace, Consolas, monospace; }
.recap { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; text-align: left; max-width: 520px; margin: 0 auto 1.5rem; }
.recap dt { color: var(--muted); font-size: .9rem; }
.recap dd { margin: 0; font-weight: 600; }
.progress-steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 1.5rem 0; counter-reset: s; }
.progress-steps li { counter-increment: s; text-align: center; font-size: .85rem; color: var(--muted); position: relative; padding-top: 2.6rem; }
.progress-steps li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 32px; height: 32px; border-radius: 50%; background: #e5e7eb; display: grid; place-items: center; font-weight: 800; color: #6b7280; z-index: 1; }
.progress-steps li::after { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: #e5e7eb; }
.progress-steps li:first-child::after { display: none; }
.progress-steps li.done { color: var(--text); font-weight: 700; }
.progress-steps li.done::before { background: var(--primary); color: #fff; content: "✓"; }
.progress-steps li.done::after { background: var(--primary); }
.progress-steps li.refused::before { background: #b3261e; content: "✕"; }

.mini-school { --c: var(--primary); display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-left: 4px solid var(--c); }
.mini-school img { object-fit: contain; }
.mini-school div { display: flex; flex-direction: column; }
.mini-school small { color: var(--muted); }
.narrow-wide { width: min(960px, 100% - 32px); }
.center-head { text-align: center; margin-inline: auto; }
.video-wrap { border-radius: 18px; overflow: hidden; box-shadow: 0 20px 50px rgba(16,40,24,.18); background: #0f2a19; aspect-ratio: 16 / 9; }
.video-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.social { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff !important; text-decoration: none !important; transition: background .15s; }
.social:hover { background: var(--accent); }
.card .social { background: var(--primary-soft); color: var(--primary) !important; }
.card .social:hover { background: var(--primary); color: #fff !important; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--line); aspect-ratio: 16 / 7; }
.map-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 640px) { .map-wrap { aspect-ratio: 4 / 5; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }

/* Pied de page */
.site-footer { background: #0f2a19; color: #c7d6cc; padding-top: 3.5rem; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; padding-bottom: 2.5rem; }
.site-footer h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .45rem; }
.site-footer a { color: #c7d6cc; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { margin-bottom: 1rem; }
.site-footer .brand img { background: #fff; border-radius: 12px; padding: 2px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.2rem 0; font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); z-index: 60; }

/* ------------------------------------------------ Installation & connexion */
.auth-body { background: var(--bg-alt); min-height: 100vh; }
.installer { width: min(860px, 100% - 32px); margin: 2.5rem auto; }
.installer-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.installer-head h1 { font-size: 1.8rem; margin: 0; }
.installer-head p { margin: 0; }
.installer .card { margin-bottom: 1.25rem; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.checklist .ok { color: #14532d; }
.checklist .ko { color: #b3261e; font-weight: 700; }
.steps li { margin-bottom: .5rem; }
.login-box { width: min(420px, 100% - 32px); margin: 8vh auto 2rem; }
.login-box .brand { justify-content: center; margin-bottom: 1.5rem; }

/* ------------------------------------------------ Administration */
.admin-body { background: var(--bg-alt); }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { background: #0f2a19; color: #c7d6cc; padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.25rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { padding: 0 .4rem; }
.admin-side .brand img { background: #fff; border-radius: 10px; padding: 2px; }
.admin-side .who { background: rgba(255,255,255,.06); border-radius: 10px; padding: .75rem; font-size: .85rem; }
.admin-side .who strong { color: #fff; display: block; }
.admin-nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; color: #c7d6cc; padding: .6rem .75rem; border-radius: 8px; font-weight: 600; font-size: .93rem; text-decoration: none; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-nav .count { background: var(--accent); color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .5rem; }
.admin-nav .sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .55; margin: .9rem .75rem .3rem; }
.admin-main { padding: 1.75rem clamp(1rem, 3vw, 2.25rem) 3rem; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.admin-top h1 { font-size: 1.6rem; margin: 0; }
.admin-burger { display: none; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 80; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .admin-burger { display: inline-flex; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none !important; color: var(--text); }
.kpi strong { display: block; font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.kpi span { color: var(--muted); font-size: .86rem; }
.kpi.k-blue strong { color: #1e40af; } .kpi.k-amber strong { color: #b45309; } .kpi.k-green strong { color: #15803d; } .kpi.k-red strong { color: #b91c1c; } .kpi.k-teal strong { color: #0f766e; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filters input, .filters select { width: auto; min-width: 160px; padding: .55rem .75rem; }
.filters input[type=search] { flex: 1; min-width: 200px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: minmax(0, 1fr); } }
/* Tableaux de l'administration en « fiches » sur téléphone */
@media (max-width: 640px) {
  .admin-main .table thead { display: none; }
  .admin-main .table, .admin-main .table tbody { display: block; }
  .admin-main .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; padding: .8rem .9rem; border-bottom: 1px solid var(--line); }
  .admin-main .table tbody tr:last-child { border-bottom: 0; }
  .admin-main .table td { border: 0; padding: 0; text-align: left !important; white-space: normal; }
  .admin-main .table td:first-child { flex-basis: 100%; }
  .admin-main .table td:has(> .thumb):first-child { flex-basis: auto; }
  .admin-main .table td:has(> .thumb):first-child + td { flex: 1 1 calc(100% - 4.5rem); min-width: 0; }
  .admin-main .table td[data-label]::before { content: attr(data-label) " : "; color: var(--muted); font-weight: 500; font-size: .82rem; }
  .admin-main .table td.bar-cell { flex-basis: 100%; width: auto !important; }
  .admin-main .table tr.group-row { display: block; padding: 0; }
  .admin-main .table tr.group-row th { display: block; }
  .admin-main .row-between > h3 { margin-bottom: .4rem; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .filters > * { width: 100%; min-width: 0 !important; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .filters > .muted, .filters > select:only-of-type { grid-column: 1 / -1; }
  .kpis { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .kpi { padding: .8rem .9rem; }
  .kpi strong { font-size: 1.5rem; }
  .admin-main { padding-top: 1rem; }
}
.dl { display: grid; grid-template-columns: 180px 1fr; gap: .5rem 1rem; margin: 0; font-size: .94rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (max-width: 560px) { .dl { grid-template-columns: 110px minmax(0, 1fr); gap: .45rem .75rem; font-size: .9rem; } .dl dt { font-size: .82rem; } .admin-top h1 { font-size: 1.3rem; } }
.ident { display: flex; gap: 1rem; align-items: center; }
.ident-main { min-width: 0; }
.ident-photo { width: 96px; height: 120px; flex-shrink: 0; border-radius: 12px; overflow: hidden; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 1.9rem; border: 1px solid var(--line); text-align: center; }
.ident-photo a, .ident-photo img { display: block; width: 100%; height: 100%; }
.ident-photo img { object-fit: cover; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--primary-soft); color: var(--primary); display: inline-grid; place-items: center; font-weight: 800; font-size: .8rem; border: 1px solid var(--line); }
.cand { display: flex; gap: .65rem; align-items: center; }
@media (max-width: 560px) { .ident-photo { width: 76px; height: 96px; font-size: 1.5rem; } }
.files { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.files a { display: flex; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text); }
.files a:hover { background: var(--bg-alt); text-decoration: none; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.timeline li { padding: .45rem 0 .45rem 1rem; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .85rem; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.nowrap { white-space: nowrap; }
.form fieldset.card { margin: 0; padding: 1.25rem 1.4rem; }
.form .settings-legend { float: left; width: 100%; font-size: 1.05rem; font-weight: 800; color: var(--primary-dark); padding: 0 0 .5rem; margin-bottom: .9rem; border-bottom: 1px solid var(--line); }
.form .settings-legend + * { clear: both; }
.mobile-only { display: none !important; }
@media (max-width: 920px) { .mobile-only { display: inline-flex !important; } }
.rank-row { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .25rem; }
.rank-row > span:first-child { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.inline { display: inline; }
.thumb { width: 44px; height: 44px; min-width: 44px; max-width: none; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); padding: 2px; display: block; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar span { display: block; height: 100%; background: var(--primary); }

.print-only { display: none; }
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  .site-header, .site-footer, .promo-bar, .wa-float, .hero-actions, .admin-side, .admin-top, .admin-burger, .alert-success, .no-print { display: none !important; }
  .print-only { display: block; }
  .detail-grid > .stack > .card:first-child { position: relative; }
  .ident { display: block; margin-bottom: .4rem; }
  .ident-photo { position: absolute; top: 0; right: 0; width: 3.5cm; height: 4.5cm; border: 1px solid #999; border-radius: 4px; background: #fff; color: #888; font-size: 9pt; font-weight: 500; }
  .detail-grid > .stack > .card:first-child .dl, .detail-grid > .stack > .card:first-child .alert { margin-right: 3.9cm !important; }
  .admin-shell { display: block; }
  .admin-main { padding: 0; }
  body, .admin-body { background: #fff; font-size: 11pt; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .detail-grid { display: block; }
  .stack { gap: .8rem; }
  .print-head { display: flex; align-items: center; gap: 1rem; border-bottom: 3px solid var(--primary); padding-bottom: .6rem; margin-bottom: .8rem; }
  .print-head img { object-fit: contain; width: 64px; height: 64px; }
  .print-head div { flex: 1; text-align: center; display: flex; flex-direction: column; }
  .print-head strong { font-size: 15pt; color: var(--accent-dark); letter-spacing: .03em; text-transform: uppercase; }
  .print-head span { font-weight: 700; color: var(--primary-dark); }
  .print-head small { color: var(--muted); font-size: 8.5pt; }
  .print-title { text-align: center; margin-bottom: 1rem; }
  .print-title h2 { font-size: 14pt; margin: 0 0 .2rem; }
  .print-title p { margin: 0; font-size: 9.5pt; }
  .dl { grid-template-columns: 170px 1fr !important; gap: .15rem 1rem !important; font-size: 10pt; }
  .dl dt { font-size: 9.5pt; }
  .card h2 { font-size: 15pt; margin: 0 0 .4rem; }
  .card .alert { padding: .4rem .7rem; margin: .5rem 0 0 !important; font-size: 9.5pt; }
  .files { gap: 0; }
  .files a { border: 0; padding: 0; font-size: 9.5pt; }
  .print-head { margin-bottom: .5rem; }
  .print-title { margin-bottom: .6rem !important; }
  .print-checklist h3, .card h3 { font-size: 11.5pt; margin: .6rem 0 .4rem; }
  .print-checklist ul { list-style: none; padding: 0; margin: 0; font-size: 9.5pt; line-height: 1.6; }
  .print-signatures { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: .9rem; break-inside: avoid; }
  .print-signatures div { border: 1px solid #999; border-radius: 6px; height: 80px; padding: .4rem .5rem; font-size: 9pt; color: #444; }
  a { color: inherit; text-decoration: none; }
  .badge { border: 1px solid currentColor; }
}
