@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ══════════════════════════════════════════════════════════════════════════
   APCEN — Association pour la Protection du CyberEspace National
   « Pour une saine transformation digitale »

   Palette derivee du logo officiel : carte du Burkina et circuits en cyan,
   lettrage APCEN en orange. Les deux teintes sont reprises telles quelles,
   l'orange etant eclairci pour le texte (l'orange brut #C06018 plafonne a
   4,49:1 sur le fond sombre : suffisant en aplat, pas en texte).
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Fonds ── */
  --bg-primary: #0A0E17;
  --bg-secondary: #10151F;
  --bg-elevated: #161C28;
  --bg-card: rgba(255,255,255,0.035);

  /* ── Marque ── */
  --orange: #E8873C;        /* accent principal — 7,26:1 sur le fond      */
  --orange-deep: #C06018;   /* teinte exacte du logo — aplats, bordures   */
  --orange-soft: rgba(232,135,60,.12);
  --cyan: #60CCE4;          /* teinte exacte du logo — 10,26:1            */
  --cyan-bright: #8BDCF0;
  --cyan-soft: rgba(96,204,228,.12);

  /* ── Etats ── */
  --green: #34D399;
  --amber: #FBBF24;
  --red: #F87171;
  --purple: #A78BFA;

  /* ── Texte ── */
  --text: #E6EDF5;
  --text-muted: #94A3B8;    /* releve de #64748B (4,02:1) a 7,47:1        */
  --text-dim: #64748B;      /* mentions secondaires uniquement            */

  /* ── Surfaces ── */
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --glass: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.09);

  --radius: 14px;
  --radius-sm: 9px;
  --nav-h: 76px;
  --admin-nav-w: 244px;

  --shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.75);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; }

::selection { background: var(--orange); color: #0A0E17; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #2A3444; border-radius: 5px; border: 2px solid var(--bg-secondary); }
::-webkit-scrollbar-thumb:hover { background: var(--orange-deep); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

/* ── Typographie ────────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; line-height: 1.15; letter-spacing: -.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { color: var(--text-muted); }

.mono { font-family: 'JetBrains Mono', monospace; }

.gradient-text {
  background: linear-gradient(120deg, var(--orange) 0%, #F2A85E 45%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.gradient-text-purple {
  background: linear-gradient(120deg, var(--cyan) 0%, var(--cyan-bright) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ── Trame cyber de fond ────────────────────────────────────────────────────
   Peinte en background plutot qu'en pseudo-element : un ::before en z-index:-1
   passerait derriere le fond de <body>, qui ne cree pas de contexte d'empilement. */
.cyber-grid {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(232,135,60,.07), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(96,204,228,.05), transparent 70%),
    linear-gradient(rgba(96,204,228,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96,204,228,.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 64px 64px, 64px 64px;
  background-attachment: fixed;
}

/* ── Conteneur & utilitaires ────────────────────────────────────────────── */
/* Le decalage sous la navbar fixe est porte une seule fois par <main> ;
   le hero l'annule pour occuper toute la hauteur sous la barre translucide. */
main { padding-top: var(--nav-h); }
.hero { margin-top: calc(-1 * var(--nav-h)); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 1.5rem; }
.text-center { text-align: center; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Cartes ─────────────────────────────────────────────────────────────── */
.glass-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.glass-card:hover {
  border-color: rgba(232,135,60,.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
/* Filet d'accent en haut de carte, revele au survol */
.glass-card::after {
  content: ''; position: absolute; top: -1px; left: 1.5rem; right: 1.5rem; height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0; transition: opacity .25s;
}
.glass-card:hover::after { opacity: 1; }

/* ── Boutons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.6rem;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: .95rem;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: #12100C;
  box-shadow: 0 6px 20px -6px rgba(232,135,60,.55);
}
.btn-primary:hover { box-shadow: 0 10px 28px -6px rgba(232,135,60,.75); transform: translateY(-2px); }

.btn-secondary {
  background: rgba(96,204,228,.06);
  border-color: rgba(96,204,228,.35);
  color: var(--cyan);
}
.btn-secondary:hover { background: rgba(96,204,228,.14); border-color: var(--cyan); transform: translateY(-2px); }

.btn-danger  { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.4); color: var(--red); }
.btn-danger:hover  { background: rgba(248,113,113,.22); border-color: var(--red); }
.btn-success { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.4); color: var(--green); }
.btn-success:hover { background: rgba(52,211,153,.22); border-color: var(--green); }
.btn-sm { padding: .48rem 1rem; font-size: .85rem; }

.glow-box { transition: box-shadow .3s, transform .3s; }
.glow-box:hover { box-shadow: 0 0 26px rgba(232,135,60,.3); }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,14,23,.78);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}
.navbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 0 1.5rem; height: var(--nav-h); max-width: 1200px; margin: 0 auto;
}
.navbar-logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex-shrink: 0; }
.navbar-logo img { height: 42px; width: auto; }
.navbar-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800;
  font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); line-height: 1.15;
}
.navbar-logo-text span {
  display: block; font-family: 'Inter', sans-serif; font-size: .62rem; font-weight: 500;
  letter-spacing: .03em; color: var(--text-muted);
}
.navbar-nav { display: flex; align-items: center; gap: 1.75rem; list-style: none; }
.navbar-nav a {
  position: relative; color: var(--text-muted); text-decoration: none;
  font-weight: 500; font-size: .93rem; padding: .4rem 0; transition: color .2s;
}
.navbar-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--orange); border-radius: 2px; transform: scaleX(0); transition: transform .25s;
}
.navbar-nav a:hover { color: var(--text); }
.navbar-nav a.active { color: var(--orange); }
.navbar-nav a.active::after, .navbar-nav a:hover::after { transform: scaleX(1); }
.navbar-actions { display: flex; align-items: center; gap: .75rem; }
.navbar-actions a::after { display: none; }

.badge-live {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.3);
  color: var(--green); border-radius: 20px; padding: .25rem .75rem; font-size: .74rem; font-weight: 600;
}
.badge-live::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--green); animation: pulse-dot 1.8s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(1.35)} }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 5rem) 0 5rem;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 55% at 22% 0%, rgba(232,135,60,.16) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 85% 25%, rgba(96,204,228,.12) 0%, transparent 65%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(96,204,228,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(96,204,228,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 78%);
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--orange-soft); border: 1px solid rgba(232,135,60,.3);
  color: var(--orange); border-radius: 30px; padding: .4rem 1rem;
  font-size: .78rem; font-weight: 600; margin-bottom: 1.75rem; letter-spacing: .03em;
}
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4rem); margin-bottom: 1.4rem; }
.hero p  { font-size: 1.12rem; max-width: 640px; margin-bottom: 2.25rem; line-height: 1.8; }
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

/* Bandeau de reperes sous le hero */
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 2.75rem;
  padding-top: 2rem; margin-top: 3rem; border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
.trust-item { display: flex; flex-direction: column; gap: .1rem; }
.trust-value { font-family: 'JetBrains Mono', monospace; font-size: 1.55rem; font-weight: 600; color: var(--cyan); line-height: 1.2; }
.trust-label { font-size: .82rem; color: var(--text-muted); }

/* ── Statistiques ───────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1.25rem; }
.stat-card {
  padding: 1.75rem; background: var(--bg-card);
  border: 1px solid var(--border); border-left: 3px solid var(--orange-deep);
  border-radius: var(--radius);
}
.stat-value {
  font-family: 'JetBrains Mono', monospace; font-size: 2.4rem; font-weight: 600;
  color: var(--orange); line-height: 1; letter-spacing: -.03em;
}
.stat-label  { color: var(--text-muted); font-size: .88rem; margin-top: .55rem; }
.stat-source { color: var(--text-dim); font-size: .72rem; margin-top: .5rem; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.section { padding: 5.5rem 0; }
.section-header { margin-bottom: 3rem; max-width: 720px; }
.section-header.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-header h2 { margin-bottom: .9rem; }
.section-header p { font-size: 1.03rem; line-height: 1.75; }
.section-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .8rem; background: var(--cyan-soft);
  border: 1px solid rgba(96,204,228,.25); color: var(--cyan); border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .09em;
  margin-bottom: 1rem;
}

/* ── Grilles de cartes ──────────────────────────────────────────────────── */
.cards-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.5rem; }
.cards-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }

/* ── Axes d'intervention ────────────────────────────────────────────────── */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1.25rem; }
.pillar {
  padding: 1.6rem 1.4rem; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: border-color .25s, transform .25s;
}
.pillar:hover { border-color: rgba(232,135,60,.4); transform: translateY(-3px); }
.pillar-icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: var(--orange-soft); border: 1px solid rgba(232,135,60,.25);
  font-size: 1.2rem; margin-bottom: 1rem;
}
.pillar h3 { font-size: 1.02rem; margin-bottom: .45rem; }
.pillar p  { font-size: .88rem; line-height: 1.65; }

/* ── Programmes phares ──────────────────────────────────────────────────── */
.program {
  display: flex; flex-direction: column; gap: .8rem;
  padding: 1.9rem; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  border: 1px solid var(--border); position: relative; overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.program:hover { border-color: rgba(96,204,228,.4); transform: translateY(-3px); }
.program::before {
  content: ''; position: absolute; top: 0; right: 0; width: 130px; height: 130px;
  background: radial-gradient(circle at 100% 0%, rgba(96,204,228,.14), transparent 70%);
  pointer-events: none;
}
.program-kicker {
  font-family: 'JetBrains Mono', monospace; font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--cyan);
}
.program h3 { font-size: 1.3rem; }
.program p { font-size: .93rem; line-height: 1.7; flex: 1; }

/* ── Carte evenement ────────────────────────────────────────────────────── */
.event-card { display: flex; flex-direction: column; }
.event-type-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--cyan-soft); border: 1px solid rgba(96,204,228,.28);
  color: var(--cyan); padding: .28rem .75rem; border-radius: 20px;
  font-size: .76rem; font-weight: 600; margin-bottom: 1rem; width: fit-content;
}
.event-card h3 { font-size: 1.12rem; margin-bottom: .7rem; }
.event-card p { font-size: .9rem; flex: 1; }
.event-meta { display: flex; gap: 1.1rem; margin-top: 1rem; flex-wrap: wrap; }
.event-meta-item { display: flex; align-items: center; gap: .35rem; color: var(--text-muted); font-size: .82rem; }

/* ── Partenaires ────────────────────────────────────────────────────────────
   Les logos partenaires ont des fonds heterogenes (transparents, blancs,
   colores) : un cartouche clair les restitue sans alterer leurs couleurs. */
.partner-grid { display: flex; flex-wrap: wrap; gap: 1rem; }
.partner-chip {
  flex: 1 1 190px; min-height: 96px;
  display: grid; place-items: center; padding: 1.1rem 1.5rem;
  background: #FFFFFF; border-radius: var(--radius-sm); border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
}
.partner-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.partner-chip img { max-height: 54px; width: auto; object-fit: contain; }
/* Role tenu sur un evenement precis — absent du bandeau de la page d'accueil. */
.partner-chip-role {
  margin-top: .4rem; font-size: .68rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: #5A6577;
}

/* ── Formulaires ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.35rem; }
.form-label { display: block; color: var(--text); font-weight: 500; font-size: .89rem; margin-bottom: .5rem; }
.form-control {
  width: 100%; padding: .8rem 1rem;
  background: rgba(255,255,255,.045); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s, background .2s; outline: none;
}
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,135,60,.14); background: rgba(255,255,255,.06); }
.form-control::placeholder { color: var(--text-dim); }
select.form-control option { background: var(--bg-elevated); color: var(--text); }
textarea.form-control { resize: vertical; min-height: 130px; }
.form-error { color: var(--red); font-size: .82rem; margin-top: .35rem; }
.form-hint  { color: var(--text-muted); font-size: .82rem; margin-top: .35rem; }

/* ── Alertes ────────────────────────────────────────────────────────────── */
.alert {
  padding: .95rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem;
  display: flex; align-items: flex-start; gap: .7rem; font-size: .93rem;
  border-left-width: 3px; border-left-style: solid;
}
.alert-success { background: rgba(52,211,153,.09);  border: 1px solid rgba(52,211,153,.22);  border-left-color: var(--green); color: #86EFC4; }
.alert-error   { background: rgba(248,113,113,.09); border: 1px solid rgba(248,113,113,.22); border-left-color: var(--red);   color: #FCA5A5; }
.alert-info    { background: rgba(96,204,228,.09);  border: 1px solid rgba(96,204,228,.22);  border-left-color: var(--cyan);  color: var(--cyan-bright); }
.alert-warning { background: rgba(251,191,36,.09);  border: 1px solid rgba(251,191,36,.22);  border-left-color: var(--amber); color: #FCD34D; }

/* ── Badges de statut ───────────────────────────────────────────────────── */
.badge { display: inline-block; padding: .28rem .7rem; border-radius: 20px; font-size: .74rem; font-weight: 600; }
.badge-pending  { background: rgba(251,191,36,.1);  border: 1px solid rgba(251,191,36,.3);  color: var(--amber); }
.badge-approved { background: rgba(52,211,153,.1);  border: 1px solid rgba(52,211,153,.3);  color: var(--green); }
.badge-rejected { background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3); color: var(--red); }
.badge-upcoming { background: var(--cyan-soft);     border: 1px solid rgba(96,204,228,.3);  color: var(--cyan); }

/* ── Tableaux ───────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-card); }
.table { width: 100%; border-collapse: collapse; }
.table th {
  background: rgba(255,255,255,.03); color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  padding: .9rem 1.2rem; text-align: left; border-bottom: 1px solid var(--border);
}
.table td { padding: 1rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.045); font-size: .9rem; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,.025); }

/* ── Pied de page ───────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 1.75rem; margin-top: 5rem;
}
.footer-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.3fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand { max-width: 340px; }
.footer-brand img { height: 56px; width: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: .89rem; line-height: 1.75; }
.footer-slogan { display: block; color: var(--orange); font-weight: 600; font-size: .89rem; margin: .9rem 0 .6rem; font-style: italic; }
.footer-col h4 {
  color: var(--text); font-size: .78rem; font-weight: 700; margin-bottom: 1.1rem;
  text-transform: uppercase; letter-spacing: .09em;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .6rem; }
.footer-links a, .footer-col p { color: var(--text-muted); text-decoration: none; font-size: .89rem; transition: color .2s; }
.footer-links a:hover { color: var(--orange); }
.footer-social { display: flex; gap: .6rem; margin-top: 1.1rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text-muted); text-decoration: none; transition: all .2s;
}
.footer-social a:hover { color: var(--orange); border-color: rgba(232,135,60,.45); background: var(--orange-soft); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.6rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  color: var(--text-dim); font-size: .83rem; flex-wrap: wrap;
}

/* Le back-office est defini plus bas, section « Administration ». */

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.25rem; margin-bottom: 2.5rem; }
.kpi-card { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--glass); }
.kpi-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
.kpi-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.1rem; }
.kpi-icon-cyan   { background: var(--cyan-soft);      color: var(--cyan); }
.kpi-icon-green  { background: rgba(52,211,153,.12);  color: var(--green); }
.kpi-icon-purple { background: rgba(167,139,250,.12); color: var(--purple); }
.kpi-icon-red    { background: rgba(248,113,113,.12); color: var(--red); }
.kpi-value { font-family: 'JetBrains Mono', monospace; font-size: 2rem; font-weight: 600; }
.kpi-label { color: var(--text-muted); font-size: .82rem; margin-top: .2rem; }

/* ── Etapes d'adhesion ──────────────────────────────────────────────────── */
.steps { display: flex; gap: 0; margin-bottom: 2.5rem; }
.step { flex: 1; padding: 1rem; text-align: center; border-bottom: 2px solid var(--border); color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.step.active { color: var(--orange); border-bottom-color: var(--orange); }
.step-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid currentColor; margin: 0 auto .5rem; font-size: .8rem; }

/* ── Separateur ─────────────────────────────────────────────────────────── */
.glow-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--orange), transparent); margin: 3rem 0; opacity: .35; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: .45rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; list-style: none; padding: 0; }
.pagination a, .pagination span {
  display: inline-block; padding: .5rem .85rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--text-muted);
  text-decoration: none; font-size: .89rem; transition: all .2s;
}
.pagination a:hover { border-color: var(--orange); color: var(--orange); }
.pagination .active span { background: var(--orange); border-color: var(--orange); color: #12100C; font-weight: 600; }
.pagination .disabled span { opacity: .4; }

/* ══════════════════════════════════════════════════════════════════════════
   Administration — coquille a panneau lateral

   Au-dela de 1024px le panneau est fixe et la colonne de contenu se decale
   d'autant. En deca il devient un tiroir : meme balisage, meme etat porte par
   <body>, seule l'interpretation change.
   ══════════════════════════════════════════════════════════════════════════ */
.admin-body { background: var(--bg-primary); min-height: 100vh; }

.skip-link {
  position: absolute; left: -9999px; top: 1rem; z-index: 2000;
  background: var(--orange); color: #12100C; padding: .6rem 1rem;
  border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 1rem; }

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1200;
  width: var(--admin-nav-w); flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  overflow-y: auto; overscroll-behavior: contain;
}

.admin-brand {
  display: flex; align-items: center; gap: .65rem;
  padding: 1.15rem 1.25rem; text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.admin-brand img { height: 34px; width: auto; }
.admin-brand span {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800;
  font-size: 1.05rem; color: var(--text); line-height: 1.2;
}
.admin-brand small {
  display: block; font-family: 'Inter', sans-serif; font-size: .68rem;
  font-weight: 500; letter-spacing: .04em; color: var(--orange);
}

.admin-nav { display: flex; flex-direction: column; padding: .75rem .7rem; gap: .1rem; flex: 1; }
.admin-nav-group {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); padding: 1rem .6rem .35rem;
}
.admin-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .62rem .7rem; border-radius: var(--radius-sm);
  color: var(--text-muted); text-decoration: none;
  font-size: .92rem; font-weight: 500;
  border-left: 2px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}
.admin-nav a:hover { background: rgba(255,255,255,.045); color: var(--text); }
.admin-nav a.active {
  background: var(--orange-soft); color: var(--orange);
  border-left-color: var(--orange); font-weight: 600;
}
.admin-nav-icon {
  width: 1.35rem; text-align: center; font-size: .95rem; opacity: .85; flex-shrink: 0;
}

.admin-sidebar-foot {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1rem 1.1rem 1.25rem; border-top: 1px solid var(--border);
}
.admin-sidebar-foot .btn { width: 100%; }

.admin-main { flex: 1; min-width: 0; margin-left: var(--admin-nav-w); display: flex; flex-direction: column; }

.admin-topbar {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem; height: 62px;
  background: rgba(10,14,23,.85);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.admin-topbar-title {
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700;
  font-size: 1.02rem; color: var(--text); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-topbar-user {
  margin-left: auto; color: var(--text-muted); font-size: .87rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.admin-burger { display: none; background: none; border: none; cursor: pointer; padding: .45rem; flex-shrink: 0; }
.admin-burger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4.5px 0; border-radius: 2px; }

/* Selecteur porte sur l'element : il doit l'emporter sur la regle globale
   « main { padding-top: var(--nav-h) } », qui compense la barre fixe du site
   public. Ici la barre du haut est dans le flux, il n'y a rien a compenser. */
main.admin-content { padding: 1.85rem 1.5rem 4rem; max-width: 1500px; width: 100%; }
.admin-content > .alert { margin-bottom: 1.25rem; }

.admin-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(4,7,13,.66); backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}

/* ── Tableaux d'administration ──────────────────────────────────────────────
   Un tableau de sept colonnes ne tient pas sur un telephone. Plutot que de le
   tronquer, on le fait defiler dans son propre conteneur : la page, elle, ne
   defile jamais horizontalement. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-scroll > table { width: 100%; border-collapse: collapse; text-align: left; min-width: 720px; }

/* Grille de cartes chiffrees : se replie d'elle-meme, sans point de rupture. */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat-card { padding: 1.1rem 1.25rem; }
.stat-card-label { color: var(--text-muted); font-size: .82rem; }
.stat-card-value { font-size: 1.85rem; font-weight: 700; line-height: 1.2; }

/* Barre de filtres : les champs s'empilent au lieu de deborder. */
.filter-bar { display: flex; gap: .85rem; align-items: center; flex-wrap: wrap; }
.filter-bar .form-control { flex: 1 1 200px; min-width: 0; }

/* Groupe d'actions en fin de ligne de tableau. */
.row-actions { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { display: inline-flex; }

/* ── Partenaires (administration) ───────────────────────────────────────── */
.partner-row-logo {
  width: 86px; height: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.92); border-radius: var(--radius-sm); padding: .35rem;
}
.partner-row-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.partner-picker { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.partner-pick {
  display: flex; flex-direction: column; gap: .45rem;
  padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: rgba(0,0,0,.22); transition: border-color .2s, background .2s;
}
.partner-pick:hover { border-color: var(--border-strong); }
.partner-pick:has(input[type="checkbox"]:checked) { border-color: var(--orange); background: var(--orange-soft); }
.partner-pick-head { display: flex; align-items: center; gap: .7rem; cursor: pointer; min-width: 0; }
.partner-pick-head img {
  width: 48px; height: 34px; object-fit: contain; flex-shrink: 0;
  background: rgba(255,255,255,.92); border-radius: 5px; padding: .18rem;
}
.partner-pick-name { font-size: .9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
/* Le role ne s'offre a la saisie qu'une fois le partenaire retenu. */
.partner-pick-role { width: 100%; padding: .35rem .55rem; font-size: .78rem; opacity: .45; }
.partner-pick:has(input[type="checkbox"]:checked) .partner-pick-role { opacity: 1; }

/* Apercu d'image dans les formulaires de televersement. */
.upload-preview {
  display: block; max-height: 190px; width: auto; margin-top: .8rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255,255,255,.9);
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .26s ease; box-shadow: var(--shadow-lg); }
  .admin-main { margin-left: 0; }
  .admin-burger { display: block; }
  body.admin-sidebar-open .admin-sidebar { transform: translateX(0); }
  body.admin-sidebar-open .admin-overlay { opacity: 1; pointer-events: auto; }
  body.admin-sidebar-open { overflow: hidden; }
}

@media (max-width: 900px) {
  /* Les grilles de contenu se replient. Les grilles chiffrees ont leur propre
     regle auto-fit : les exclure ici evite une colonne unique inutile. */
  .grid:not(.stat-grid) { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .navbar-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-secondary); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 1rem; gap: 0;
    /* Le menu depasse la hauteur d'un petit ecran une fois connecte : il
       defile en lui-meme plutot que de sortir de la fenetre. */
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain;
  }
  .navbar-nav.open { display: flex; }
  .navbar-nav a { padding: .8rem 0; border-bottom: 1px solid var(--border); display: block; }
  .navbar-nav a::after { display: none; }
  .navbar-actions { flex-direction: column; align-items: stretch; gap: .5rem; padding-top: .75rem; }
  .navbar-actions .btn { width: 100%; }
  .navbar-actions form { width: 100%; }
  .navbar-logo-text span { display: none; }
  .section { padding: 3.5rem 0; }
  .hero { padding: calc(var(--nav-h) + 3rem) 0 3.5rem; }
  .trust-strip { gap: 1.5rem; }
  .trust-item { flex: 1 1 40%; }
  .steps { flex-wrap: wrap; }
  .step { flex: 1 1 45%; }
  main.admin-content { padding: 1.25rem 1rem 3rem; }
  .admin-content h1 { font-size: 1.75rem !important; }
  /* Les vues d'administration portent leurs marges en style inline ; les
     ramener ici evite des cartes de 40px de padding sur un telephone. */
  .admin-content .glass-card { padding: 1.25rem !important; }
  .row-actions { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cards-grid, .cards-grid-3 { grid-template-columns: 1fr; }
  .partner-picker { grid-template-columns: 1fr; }
  .btn { padding: .7rem 1.15rem; font-size: .9rem; }
  .admin-topbar-user { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
