/* ==========================================================================
   FIVS — design system v2 (charte festivalfivs.com)
   Charte noir & rouge — #d8173a sur noir · Inter (latin) / Cairo (arabe)
   Propriétés logiques : LTR + RTL sans gabarit miroir.
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Cairo';
  src: url('../fonts/cairo-var-arabic.woff2') format('woff2');
  font-weight: 200 900; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Cairo';
  src: url('../fonts/cairo-var-latin.woff2') format('woff2');
  font-weight: 200 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF;
}

:root {
  --rouge: #d8173a;
  --rouge-2: #ad0e2c;
  --rouge-soft: rgba(216, 23, 58, .08);
  --bleu: #1a1a1a;                        /* accent secondaire = noir (charte noir & rouge) */
  --bleu-soft: rgba(0, 0, 0, .07);
  --nuit: #0e0e0e;
  --nuit-2: #1c1c1c;
  --grad-rouge: linear-gradient(100deg, #d8173a, #f13d5c);
  --grad-sidebar: linear-gradient(168deg, #1e1e1e 0%, #0a0a0a 62%);
  --grad-hero: radial-gradient(900px 480px at 78% -10%, rgba(216,23,58,.5), transparent 62%),
               radial-gradient(700px 420px at 8% 110%, rgba(216,23,58,.18), transparent 60%),
               linear-gradient(160deg, #1c1c1c, #0a0a0a 70%);

  --bg: #f7f7f7;
  --panel: #ffffff;
  --panel-2: #fafafa;
  --ink: #171717;
  --muted: #767676;
  --line: #e7e7e7;
  --ok: #0e9f6e;   --ok-soft: rgba(14,159,110,.11);
  --warn: #b45309; --warn-soft: rgba(217,119,6,.12);

  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(27, 10, 16, .18);
  --t: .18s ease;
  --sidebar-w: 262px;
  --topbar-h: 62px;
  --font: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

[dir="rtl"] { --font: 'Cairo', Tahoma, 'Segoe UI', sans-serif; }

/* ==========================================================================
   MODE SOMBRE — même charte noir & rouge, fonds inversés.
   Activé via <html data-theme="dark"> (bascule topbar, mémorisée).
   ========================================================================== */
[data-theme="dark"] {
  --bg: #101010;
  --panel: #1a1a1a;
  --panel-2: #242424;
  --ink: #ededed;
  --muted: #9d9d9d;
  --line: #2d2d2d;
  --rouge-soft: rgba(241, 61, 92, .16);
  --bleu: #d6d6d6;
  --bleu-soft: rgba(255, 255, 255, .09);
  --ok-soft: rgba(14, 159, 110, .2);
  --warn-soft: rgba(217, 119, 6, .22);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .65);
}
[data-theme="dark"] .alert-success { color: #8fe6c4; }
[data-theme="dark"] .alert-danger  { color: #ff8fa3; }
[data-theme="dark"] .alert-warning { color: #f2c185; }
[data-theme="dark"] .alert-info    { color: #d6d6d6; }
[data-theme="dark"] .btn-bleu { background: linear-gradient(100deg, #3a3a3a, #222); }
[data-theme="dark"] .card, [data-theme="dark"] .stat, [data-theme="dark"] a.kpi,
[data-theme="dark"] .panel { box-shadow: 0 2px 10px -6px rgba(0, 0, 0, .5); }
[data-theme="dark"] .compet, [data-theme="dark"] .steps li { box-shadow: none; }

/* Bascule clair/sombre */
.ico-sun { display: none; }
[data-theme="dark"] .ico-sun { display: block; }
[data-theme="dark"] .ico-moon { display: none; }
.theme-pill { background: none; border: 1px solid rgba(255,255,255,.16); border-radius: 999px;
  width: 30px; height: 30px; display: grid; place-items: center; color: #c9c9c9; font-size: .85rem; }
.theme-pill:hover { color: #fff; border-color: #fff; }
.theme-pill--ink { border-color: var(--line); color: var(--muted); }
.theme-pill--ink:hover { color: var(--ink); border-color: var(--muted); }

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  line-height: 1.6; font-size: 15.5px; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }
svg { display: block; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.015em; line-height: 1.22; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; line-height: 1.55; }
h1.sect, h2.sect, h3.sect { display: flex; align-items: center; gap: 9px; }
.sect .sic { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--rouge) 11%, var(--panel)); color: var(--rouge); }
.sect .sic svg { width: 17px; height: 17px; }
[dir="rtl"] .badge, [dir="rtl"] .cpill, [dir="rtl"] .chip { line-height: 1.6; }
/* L'arabe ne se laisse jamais espacer (ligatures) — seul le numéro FIVS (latin) y échappe. */
[dir="rtl"] :is(.hero__badge, .hero__meta span, .badge, .sec-kicker, .site-footer h4,
                .nav__sec, .prize .r, table.list th, .sp-dir-sec) { letter-spacing: 0; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.mt0 { margin-block-start: 0; }

/* ==========================================================================
   BOUTONS, FORMULAIRES
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad-rouge); color: #fff !important; border: 0;
  border-radius: 999px; padding: 8px 20px; font-size: .9rem; font-weight: 700;
  transition: var(--t); box-shadow: 0 8px 20px -10px rgba(216,23,58,.65);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-sm { padding: 5px 14px; font-size: .82rem; border-radius: 999px; }
.btn-ok { background: linear-gradient(100deg, #0e9f6e, #16bd85); box-shadow: 0 8px 20px -10px rgba(14,159,110,.6); }
.btn-bleu { background: linear-gradient(100deg, #2a2a2a, #111); box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.btn-danger { background: linear-gradient(100deg, #ad0e2c, #d8173a); }
.btn-ghost { background: transparent; color: var(--rouge) !important; border: 1.5px solid var(--rouge); box-shadow: none; }
.btn-ghost:hover { background: var(--rouge-soft); }
.btn-blanc { background: #fff; color: var(--rouge) !important; box-shadow: 0 10px 26px -10px rgba(0,0,0,.5); }

label { display: block; font-weight: 600; margin-block: 15px 6px; font-size: .87rem; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=datetime-local], input[type=number], input[type=tel], input[type=url],
input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 11px;
  font-size: .95rem; font-family: inherit; background: var(--panel); color: var(--ink);
  transition: var(--t);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--rouge); box-shadow: 0 0 0 3.5px var(--rouge-soft);
}
.checkline { display: flex; gap: 10px; align-items: flex-start; margin-block: 16px; font-size: .87rem; }
.checkline input { margin-block-start: 4px; accent-color: var(--rouge); }
.form-hint { color: var(--muted); font-size: .8rem; margin-block-start: 5px; }

/* ==========================================================================
   CARTES, ALERTES, BADGES, TABLEAUX
   ========================================================================== */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; margin-block: 18px; box-shadow: 0 2px 10px -6px rgba(27,10,16,.07);
}
.card h1, .card h2 { margin-block-start: 0; }
.card-narrow { max-width: 500px; margin-inline: auto; }

.alert { padding: 13px 17px; border-radius: 12px; margin-block: 14px; font-size: .9rem; font-weight: 500; display: flex; gap: 10px; align-items: flex-start; }
.alert::before { content: ''; flex: 0 0 4px; border-radius: 4px; align-self: stretch; }
.alert-success { background: var(--ok-soft); color: #046c4e; } .alert-success::before { background: var(--ok); }
.alert-danger  { background: var(--rouge-soft); color: var(--rouge-2); } .alert-danger::before { background: var(--rouge); }
.alert-warning { background: var(--warn-soft); color: #92400e; } .alert-warning::before { background: var(--warn); }
.alert-info    { background: var(--bleu-soft); color: #2a2a2a; } .alert-info::before { background: var(--bleu); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-pending  { background: var(--warn-soft); color: var(--warn); }
.badge-ok       { background: var(--ok-soft); color: var(--ok); }
.badge-danger   { background: var(--rouge-soft); color: var(--rouge); }
.badge-bleu     { background: var(--bleu-soft); color: var(--bleu); }
.badge-muted    { background: var(--panel-2); color: var(--muted); }
.badge-numero {
  background: var(--rouge-soft); color: var(--rouge); font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  white-space: nowrap; letter-spacing: 1px; font-size: .92rem; padding: 9px 16px; border-radius: 12px;
  border: 1px solid rgba(216,23,58,.22); box-shadow: 0 6px 14px -9px rgba(216,23,58,.6);
}
.badge-numero::before {
  content: ''; width: 18px; height: 18px; border-radius: 0; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.avat {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--rouge-soft); color: var(--rouge);
  font-weight: 800; font-size: .82rem; flex: none;
}
.tcell { display: flex; align-items: center; gap: 12px; }
table.list th[data-col] { cursor: pointer; user-select: none; white-space: nowrap; }
table.list th[data-col] .sorticon { opacity: .45; vertical-align: -2px; margin-inline-start: 3px; }
table.list th[data-col]:hover .sorticon { opacity: 1; }
/* Boutons d'action — verre liquide (glossy) : reflet haut, ombre interne basse, halo coloré */
.abtn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 34px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.5); cursor: pointer; padding: 0;
  transition: filter .15s, transform .12s, box-shadow .15s;
}
.abtn::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 52%; pointer-events: none;
  border-radius: 10px 10px 40% 40% / 10px 10px 12px 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.06));
}
.abtn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.abtn:active { transform: translateY(0); filter: brightness(.96); }
.abtn svg { position: relative; z-index: 1; width: 16px; height: 16px; fill: #fff;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.abtn-view { background: linear-gradient(165deg, #4f8bff, #1d4ed8);
  box-shadow: inset 0 1.5px 1.5px rgba(255,255,255,.7), inset 0 -6px 10px rgba(255,255,255,.12), 0 8px 16px -8px rgba(37,99,235,.75); }
.abtn-edit { background: linear-gradient(165deg, #ffa451, #ea580c);
  box-shadow: inset 0 1.5px 1.5px rgba(255,255,255,.7), inset 0 -6px 10px rgba(255,255,255,.12), 0 8px 16px -8px rgba(249,115,22,.75); }
.abtn-doc  { background: linear-gradient(165deg, #35c6ee, #0284a8);
  box-shadow: inset 0 1.5px 1.5px rgba(255,255,255,.7), inset 0 -6px 10px rgba(255,255,255,.12), 0 8px 16px -8px rgba(14,165,233,.75); }
.abtn-del  { background: linear-gradient(165deg, rgba(255,255,255,.9), rgba(226,229,235,.85));
  border-color: rgba(255,255,255,.8);
  box-shadow: inset 0 1.5px 1.5px rgba(255,255,255,.9), inset 0 -5px 9px rgba(0,0,0,.05), 0 6px 14px -8px rgba(20,20,20,.45); }
.abtn-del svg { fill: #6b7280; filter: none; }
.abtn-del:hover svg { fill: #d8173a; }
[data-theme="dark"] .abtn-del { background: linear-gradient(165deg, rgba(70,70,78,.95), rgba(45,45,52,.9)); border-color: rgba(255,255,255,.18); }
[data-theme="dark"] .abtn-del svg { fill: #cfcfd6; }

/* Barre d'actions — pastilles fines et sobres, toutes à la même taille.
   La grille impose des colonnes égales ; form/details en display:contents pour
   que ce soit bien le bouton qui occupe la cellule. */
.gbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); gap: 6px;
  margin-block: 10px 14px; overflow-x: auto; padding-block-end: 2px; }   /* une seule ligne, quitte à défiler */
.gbar form { display: contents; }              /* le bouton occupe la cellule, pas le <form> */
.gbar details.rapmenu { position: relative; }  /* le <details> EST la cellule : son panneau s'y ancre */
.gbar details.rapmenu > summary { inline-size: 100%; }
.gbtn {
  position: relative; inline-size: 100%; block-size: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 11px;
  border-radius: 9px; border: 1px solid var(--gb, rgba(20,7,12,.14)); color: #fff !important;
  background-image: linear-gradient(180deg, var(--g1), var(--g2));
  font-weight: 600; font-size: .74rem; letter-spacing: .012em; text-decoration: none; cursor: pointer;
  white-space: nowrap; list-style: none; min-inline-size: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 1px 1.5px rgba(20,7,12,.12);
  transition: box-shadow .16s, transform .12s, filter .16s;
}
[dir="rtl"] .gbtn { letter-spacing: 0; }
.gbtn::-webkit-details-marker { display: none; }
.gbtn > * { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
.gbtn:hover { transform: translateY(-1px); filter: saturate(1.06) brightness(1.04); color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 5px 14px -6px var(--gs, rgba(20,7,12,.5)); }
.gbtn:active { transform: translateY(0); filter: brightness(.96);
  box-shadow: inset 0 1px 2px rgba(20,7,12,.22); }
.gbtn:focus-visible { outline: 2px solid var(--gs, var(--rouge)); outline-offset: 2px; }
.gbtn[disabled] { opacity: .45; cursor: not-allowed; transform: none; filter: grayscale(.35); box-shadow: none; }
/* Chaque teinte ne définit que ses deux arrêts de dégradé, sa bordure et sa lueur. */
.g-bleu   { --g1: #4a83e4; --g2: #2f63d4; --gb: #2a55b4; --gs: rgba(47,99,212,.75); }
.g-vert   { --g1: #33ac72; --g2: #16905a; --gb: #12784a; --gs: rgba(22,144,90,.75); }
.g-ardoise{ --g1: #6d7887; --g2: #4d5763; --gb: #3f4854; --gs: rgba(77,87,99,.75); }
.g-rouge  { --g1: #e2586f; --g2: #cb2543; --gb: #a91e38; --gs: rgba(203,37,67,.75); }
.g-or     { --g1: #e0ab48; --g2: #c58916; --gb: #a67213; --gs: rgba(197,137,22,.75); }
.g-cyan   { --g1: #3aacc6; --g2: #12849e; --gb: #0f6e85; --gs: rgba(18,132,158,.75); }
.g-violet { --g1: #9a7ae0; --g2: #7443cf; --gb: #6035ae; --gs: rgba(116,67,207,.75); }
[data-theme="dark"] .gbtn { border-color: rgba(255,255,255,.14); }
/* Résultats vus par le participant — lecture seule */
.respub { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--panel); }
.respub__t { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-weight: 700; }
.respub__t strong { font-size: 1.5rem; color: var(--rouge); }
.respub__c { display: grid; grid-template-columns: minmax(120px, 1.5fr) 2fr auto; gap: 10px; align-items: center;
  padding-block: 5px; font-size: .84rem; }
.respub__l { overflow-wrap: anywhere; }
.respub__b { background: var(--panel-2); border-radius: 999px; height: 9px; overflow: hidden; }
.respub__b i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f5133a, #ff8fa3); }
.respub__v { font-weight: 700; white-space: nowrap; }
@media (max-width: 620px) { .respub__c { grid-template-columns: 1fr auto; } .respub__b { grid-column: 1 / -1; } }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
table.list { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.list th, table.list td { padding: 13px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list th { background: var(--panel-2); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.list tr:hover td { background: var(--panel-2); }

/* ==========================================================================
   COQUILLE APPLICATIVE — sidebar professionnelle + topbar
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--panel); color: var(--ink); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 100;
  border-inline-end: 1px solid var(--line);
}
.sidebar .logo { display: flex; align-items: center; gap: 12px; padding: 16px 20px 18px; color: var(--ink); }
.logo__mark { width: 42px; height: 42px; border-radius: 11px; overflow: hidden; flex: none; box-shadow: 0 6px 16px -6px rgba(216,23,58,.7); }
.logo__mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.logo__text { font-weight: 800; font-size: 1.3rem; line-height: 1; display: flex; flex-direction: column; gap: 4px; }
.logo__text small { font-weight: 600; font-size: .58rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .logo__text small { letter-spacing: 0; font-size: .66rem; }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 10px; flex: 1; overflow-y: auto;
  scrollbar-width: none; -ms-overflow-style: none; }          /* le menu défile sans ascenseur visible */
.nav::-webkit-scrollbar { width: 0; height: 0; display: none; }
.nav__sec { font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 5px; }
[dir="rtl"] .nav__sec { letter-spacing: 0; font-size: .72rem; }
.nav__link {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 11px;
  color: var(--muted); font-weight: 600; font-size: .92rem; transition: var(--t);
}
.nav__link:hover { background: var(--panel-2); color: var(--ink); }
.nav__link.is-active { background: var(--grad-rouge); color: #fff; box-shadow: 0 8px 20px -8px rgba(216,23,58,.75); }
.nav__link svg { flex: none; }
/* Groupe repliable dans le menu latéral */
.nav__grp > summary { list-style: none; cursor: pointer; }
.nav__grp > summary::-webkit-details-marker { display: none; }
.nav__grp > summary::marker { content: ''; }
.nav__grp > summary.is-parent { color: var(--ink); }
.nav__chev { margin-inline-start: auto; font-size: .72rem; transition: transform .18s; opacity: .6; }
.nav__grp[open] .nav__chev { transform: rotate(180deg); }
.nav__grp .nav__sub { padding-inline-start: 34px; font-size: .88rem; }
.nav__grp .nav__sub svg { width: 18px; height: 18px; opacity: .8; }
.sidebar__foot { padding: 10px 12px 14px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.sidebar__foot strong { color: var(--ink); }
.sidebar__edimg { display: block; margin: 12px; width: calc(100% - 24px); border-radius: 14px; border: 1px solid var(--line); }
/* PNG détouré : on l'affiche en entier (pas de recadrage en bloc rectangulaire),
   la transparence laisse voir le fond de la barre latérale. */
.sidebar__reel { display: block; width: 100%; height: auto; object-fit: contain;
  margin-block-start: auto; margin-block-end: -2px; pointer-events: none; background: transparent; }
[dir="ltr"] .sidebar__reel { transform: scaleX(-1); }
/* Écrans peu hauts : on récupère la place de la bobine décorative et on resserre
   les intertitres, pour que le menu tienne entier sans avoir à défiler. */
@media (max-height: 900px) {
  .sidebar__reel { display: none; }
  .nav__sec { padding-block: 9px 3px; }
  .nav__link { padding-block: 9px; }
}
.sidebar__edition {
  margin: 12px; padding: 16px; border-radius: 14px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--rouge-soft), transparent 75%), var(--panel-2);
  border: 1px solid var(--line);
}
.sidebar__edition .ed-k { font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--rouge); }
.sidebar__edition .ed-a { font-size: 1.7rem; font-weight: 800; color: var(--rouge); line-height: 1.1; }
.sidebar__edition .ed-v { font-size: .72rem; color: var(--muted); }
.sidebar__edition .ed-f2 { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 120px; height: auto; pointer-events: none; }
.logo__lines { font-size: .615rem; font-weight: 600; letter-spacing: .015em; line-height: 1.6; color: var(--ink); }
.logo__lines span, .logo__lines b { display: block; font-weight: 600; white-space: nowrap; }
[dir="rtl"] .logo__lines { letter-spacing: 0; font-size: .68rem; }
.sidebar .logo .logo__mark { width: 46px; height: 46px; border-radius: 12px; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding-inline: 24px;
  position: sticky; top: 0; z-index: 90;
}
.topbar__title { font-size: 1.12rem; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--ink); display: grid; place-items: center; transition: var(--t);
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line); }
.menu-toggle { display: none; }

.userchip { display: flex; align-items: center; gap: 10px; padding-block: 5px; padding-inline: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
.userchip__av { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-rouge); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .8rem; object-fit: cover; flex: none; }
.avatar-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--rouge); flex: none; }
.avatar-lg--vide { display: grid; place-items: center; background: var(--grad-rouge); color: #fff; font-weight: 800; font-size: 1.5rem; }
input[type=file] { font-size: .84rem; color: var(--muted); }
.userchip__name { font-size: .84rem; font-weight: 700; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dd { position: relative; }
.dd__menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 150px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: none; z-index: 120;
}
.dd.open .dd__menu { display: block; }
.dd__menu a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: .88rem; }
.dd__menu a:hover { background: var(--panel-2); }
.dd__menu a.is-active { color: var(--rouge); }

.content { padding: 26px 26px 48px; display: flex; flex-direction: column; gap: 4px; }
.content > h1 { font-size: 1.45rem; margin-block-end: 8px; }

/* ==========================================================================
   COMPOSANTS APP — stats, graphique, stepper, notifications
   ========================================================================== */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }

.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; display: flex; align-items: center; gap: 16px;
  box-shadow: 0 2px 10px -6px rgba(27,10,16,.07);
}
.stat__ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat__ic--rouge { background: var(--rouge-soft); color: var(--rouge); }
.stat__ic--bleu { background: var(--bleu-soft); color: var(--bleu); }
.stat__ic--ok { background: var(--ok-soft); color: var(--ok); }
.stat__ic--warn { background: var(--warn-soft); color: var(--warn); }
.stat .n { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .8rem; font-weight: 600; }

/* Axe chronologique toujours gauche→droite, même en interface arabe. */
.chartbars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-block-start: 10px; direction: ltr; }
.chartbars .cb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.chartbars .cb i {
  display: block; width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #34d399, #10b981); min-height: 4px;
  box-shadow: 0 6px 14px -6px rgba(16,185,129,.5);
}
.chartbars .cb b { font-size: .74rem; }
.chartbars .cb span { font-size: .64rem; color: var(--muted); white-space: nowrap; }

/* Parcours du dossier (machine à états §4) */
.stepper { display: flex; flex-direction: column; gap: 0; padding-block: 6px; }
.step { display: flex; gap: 14px; position: relative; padding-block-end: 22px; }
.step::before {
  content: ''; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0;
  width: 2px; background: var(--line);
}
.step:last-child { padding-block-end: 0; }
.step:last-child::before { display: none; }
.step__dot {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--panel-2); border: 2px solid var(--line); color: var(--muted);
  font-size: .72rem; font-weight: 800; z-index: 1;
}
.step.done .step__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.now .step__dot { background: var(--grad-rouge); border-color: var(--rouge); color: #fff; box-shadow: 0 0 0 4px var(--rouge-soft); }
.step.ko .step__dot { background: var(--rouge-2); border-color: var(--rouge-2); color: #fff; }
.step__txt strong { display: block; font-size: .92rem; }
.step__txt small { color: var(--muted); font-size: .78rem; }
.step.now .step__txt strong { color: var(--rouge); }

.notif { border: 1px solid var(--line); border-inline-start: 4px solid var(--bleu); background: var(--panel); border-radius: 11px; padding: 12px 16px; margin-block: 8px; font-size: .88rem; }
.notif.unread { border-inline-start-color: var(--rouge); background: color-mix(in srgb, var(--rouge) 6%, var(--panel)); }
.notif .when { color: var(--muted); font-size: .74rem; margin-block-start: 2px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { margin-inline: auto; margin-block-end: 12px; opacity: .4; }

.actions-inline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-block: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 15px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--panel); color: var(--muted);
  font-size: .8rem; font-weight: 700; transition: var(--t);
}
.chip:hover { border-color: var(--rouge); color: var(--rouge); }
.chip.is-on { background: var(--grad-rouge); border-color: var(--rouge); color: #fff; box-shadow: 0 6px 14px -7px rgba(216,23,58,.6); }
.chip__n { display: inline-block; min-width: 20px; padding: 1px 6px; margin-inline-start: 6px; border-radius: 999px; font-size: .68rem; font-weight: 800; text-align: center; background: color-mix(in srgb, var(--rouge) 10%, transparent); color: var(--rouge); }
.chip.is-on .chip__n { background: rgba(255,255,255,.22); color: #fff; }

/* ==========================================================================
   TABLEAU DE BORD v2 — KPI, graphiques SVG, files d'action
   ========================================================================== */
.dash-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-block-end: 16px; }
.dash-toolbar .title { font-size: 1.15rem; font-weight: 800; margin-inline-end: auto; }
.dash-toolbar .title small { display: block; font-size: .76rem; color: var(--muted); font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
a.kpi { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; transition: var(--t); position: relative; overflow: hidden; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; border-color: rgba(216,23,58,.35); }
.kpi::before { content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--kc, var(--rouge)); }
.kpi .k-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kpi .k-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--kc, var(--rouge)) 12%, transparent); color: var(--kc, var(--rouge)); }
.kpi .k-n { font-size: 1.65rem; font-weight: 800; line-height: 1.15; margin-block-start: 8px; }
.kpi .k-l { color: var(--muted); font-size: .78rem; font-weight: 600; }
.kpi .k-delta { font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.kpi .k-delta.up { background: var(--ok-soft); color: var(--ok); }
.kpi .k-delta.warn { background: var(--warn-soft); color: var(--warn); }
.kpi .k-delta.rouge { background: var(--rouge-soft); color: #f5133a; }
.badge-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: var(--rouge-soft); color: #f5133a; }

.dashgrid { display: grid; grid-template-columns: 1.9fr 1.1fr; gap: 16px; align-items: stretch; margin-block-start: 16px; }
.dashgrid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; margin-block-start: 16px; }
@media (max-width: 1100px) { .dashgrid, .dashgrid2 { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 2px 10px -6px rgba(27,10,16,.07); display: flex; flex-direction: column; }
.panel > h2 { font-size: .95rem; margin: 0 0 4px; }
.panel > .sub { color: var(--muted); font-size: .76rem; margin-block-end: 12px; }
.panel svg.chart { width: 100%; height: auto; display: block; direction: ltr; }

.legend { display: flex; flex-direction: column; gap: 8px; margin-block-start: 10px; }
.legend .lg { display: flex; align-items: center; gap: 9px; font-size: .84rem; }
.legend .lg i { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.legend .lg b { margin-inline-start: auto; }

.actionlist { display: flex; flex-direction: column; }
.actionlist a.al {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px;
  border-bottom: 1px solid var(--line); font-size: .86rem; transition: var(--t);
}
.actionlist a.al:last-child { border-bottom: 0; }
.actionlist a.al:hover { background: var(--panel-2); text-decoration: none; }
.al .al-ic { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: .8rem; color: #fff; }
.al .al-tx { min-width: 0; flex: 1; }
.al .al-tx strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al .al-tx small { color: var(--muted); font-size: .72rem; }
.al .al-go { color: var(--muted); flex: none; }
.panel .more {
  margin-block-start: auto; margin-block-end: 0; padding: 9px 14px; text-align: center;
  font-size: .82rem; font-weight: 700; color: var(--rouge); background: var(--rouge-soft);
  border-radius: 10px; display: block; transition: var(--t);
}
.panel .more:hover { background: var(--rouge); color: #fff; text-decoration: none; }
.al .al-ic { border-radius: 10px; }
.shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
a.shortcut {
  border: 1px solid var(--line); border-radius: 13px; padding: 16px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; color: var(--ink); transition: var(--t);
}
a.shortcut:hover { border-color: var(--rouge); color: var(--rouge); text-decoration: none; transform: translateY(-2px); }
a.shortcut svg { color: var(--rouge); }
.dashgrid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: stretch; margin-block-start: 16px; }
@media (max-width: 1200px) { .dashgrid3 { grid-template-columns: 1fr; } }
.chip-select { border: 1px solid var(--line); border-radius: 9px; padding: 5px 12px; font-size: .74rem; font-weight: 600; color: var(--muted); margin-inline-start: auto; }

.progress { background: var(--panel-2); border-radius: 999px; height: 12px; overflow: hidden; display: flex; }
.progress i { display: block; height: 100%; }
.progress-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-block-start: 10px; font-size: .76rem; color: var(--muted); }
.progress-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; }

/* ==========================================================================
   SITE PUBLIC — header sombre, héros cinéma, sections
   ========================================================================== */
.site { background: var(--bg); }
.site-header { background: var(--nuit); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(255,255,255,.06); }
.site-header__in { display: flex; align-items: center; gap: 18px; padding-block: 13px; }
.site-brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.site-brand img.mark { width: 42px; height: 42px; border-radius: 10px; }
.site-brand .wordmark { height: 30px; width: auto; }
.site-brand img.mark { width: 46px; height: 46px; border-radius: 13px; box-shadow: 0 8px 18px -8px rgba(216,23,58,.6); object-fit: cover; }
.site-brand__lines { font-weight: 800; font-size: .82rem; line-height: 1.3; letter-spacing: .02em; color: #fff; }
.site-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 20px; }
.site-nav > a { color: #d0d0d0; font-weight: 600; font-size: .92rem; transition: var(--t); }
.site-nav > a:hover { color: #fff; }
.site-nav .btn { padding: 9px 20px; }

.langpills { display: inline-flex; gap: 3px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 3px; }
.langpills a { padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 800; color: #a6a6a6; }
.langpills a.active { background: var(--grad-rouge); color: #fff; }
.langpills--ink { border-color: var(--line); }
.langpills--ink a { color: var(--muted); }
.langpills--ink a.active { color: #fff; }

.hero { background: var(--grad-hero); color: #fff; padding-block: clamp(56px, 9vw, 110px); position: relative; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 7px 16px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: #ffd9e0; margin-block-end: 22px;
}
.hero__badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--rouge); box-shadow: 0 0 0 4px rgba(216,23,58,.3); }
.hero h1 { font-size: clamp(30px, 4.6vw, 52px); margin-block-end: 18px; color: #fff; }
.hero p.lead { color: #d6d6d6; font-size: 1.08rem; max-width: 560px; margin-block-end: 10px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-block-start: 30px; }
.hero__visual { position: relative; display: grid; place-items: center; }
.hero__visual img.clap { width: min(380px, 90%); filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); transform: rotate(-6deg); }
.hero__meta { display: flex; gap: 26px; flex-wrap: wrap; margin-block-start: 34px; }
.hero__meta div { display: flex; flex-direction: column; gap: 2px; }
.hero__meta b { font-size: 1.02rem; }
.hero__meta span { font-size: .76rem; color: #a6a6a6; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
[dir="rtl"] .hero__meta span { letter-spacing: 0; }

.section { padding-block: clamp(44px, 7vw, 72px); }
.section--alt { background: var(--panel); border-block: 1px solid var(--line); }
.section h2 { font-size: clamp(22px, 3vw, 30px); margin-block-end: 8px; }
.section .sub { color: var(--muted); max-width: 640px; margin-block-end: 30px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; }
.sec-kicker { color: var(--rouge); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-block-end: 8px; }
[dir="rtl"] .sec-kicker { letter-spacing: 0; }

.compet { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--panel); transition: var(--t); box-shadow: 0 2px 10px -6px rgba(27,10,16,.07); }
.compet:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.compet__band { height: 6px; background: var(--grad-rouge); }
.compet__affiche { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.compet--bleu .compet__band { background: linear-gradient(100deg, #2a2a2a, #111); }
.compet__body { padding: 26px; }
.compet__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--rouge-soft); color: var(--rouge); margin-block-end: 16px; }
.compet--bleu .compet__ic { background: var(--bleu-soft); color: var(--bleu); }
.compet h3 { font-size: 1.15rem; margin-block-end: 8px; }
.compet p { color: var(--muted); font-size: .9rem; }
.compet__deadline { margin-block-start: 18px; padding-block-start: 16px; border-top: 1px dashed var(--line); font-size: .84rem; color: var(--muted); }
.compet__deadline b { color: var(--ink); }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps li {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  position: relative; box-shadow: 0 2px 10px -6px rgba(27,10,16,.07);
}
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: 1.6rem; font-weight: 800; margin-block-end: 10px;
  background: var(--grad-rouge); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.steps li strong { display: block; margin-block-end: 4px; }
.steps li span { color: var(--muted); font-size: .86rem; }

.prizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.prize { background: var(--nuit); color: #fff; border-radius: 16px; padding: 24px; text-align: center; position: relative; overflow: hidden; }
.prize::after { content: ''; position: absolute; inset-inline-start: 0; top: 0; inline-size: 100%; block-size: 4px; background: var(--grad-rouge); }
.prize .r { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #a6a6a6; }
[dir="rtl"] .prize .r { letter-spacing: 0; }
.prize .m { font-size: 1.8rem; font-weight: 800; margin-block: 6px; }
.prize .d { font-size: .8rem; color: #9a9a9a; }

.cta-band { background: var(--grad-hero); color: #fff; border-radius: 22px; padding: clamp(34px, 5vw, 58px); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; font-size: clamp(22px, 3.4vw, 34px); margin-block-end: 10px; }
.cta-band p { color: #d6d6d6; margin-block-end: 24px; }

.site-footer { background: var(--nuit); color: #9a9a9a; margin-block-start: 60px; padding-block: 40px 26px; font-size: .86rem; }
.site-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; padding-block-end: 26px; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-block-end: 12px; }
[dir="rtl"] .site-footer h4 { letter-spacing: 0; }
.site-footer a:hover { color: #fff; }
.site-footer .fine { padding-block-start: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .78rem; }
.site-footer .wordmark { height: 48px; width: auto; margin-block-end: 14px; }

/* ==========================================================================
   AUTH — écran scindé (panneau marque + formulaire)
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }
.auth__brand { background: var(--grad-hero); color: #fff; padding: clamp(30px, 5vw, 60px); display: flex; flex-direction: column; }
.auth__brand--img { padding: 0; background: #fff; }
.auth__brand--img a { display: block; width: 100%; height: 100%; }
.auth__brand--img .brandart { width: 100%; height: 100%; object-fit: cover; object-position: left center; display: block; }
.auth__brand .wordmark { height: 40px; width: auto; align-self: flex-start; }
.auth__brand-mid { margin-block: auto; padding-block: 40px; }
.auth__brand h2 { font-size: clamp(24px, 2.6vw, 34px); color: #fff; margin-block-end: 14px; max-width: 420px; }
.auth__brand p { color: #d6d6d6; max-width: 400px; }
.auth__brand .clapwrap img { width: min(230px, 60%); transform: rotate(-6deg); filter: drop-shadow(0 24px 40px rgba(0,0,0,.5)); margin-block-start: 34px; }
.auth__brand .fine { font-size: .78rem; color: #9a9a9a; }
.auth__form { display: grid; place-items: center; padding: clamp(24px, 4vw, 60px); }
.auth__card { width: min(460px, 100%); }
.auth__card h1 { font-size: 1.55rem; margin-block-end: 6px; }
.auth__card .sub { color: var(--muted); font-size: .92rem; margin-block-end: 10px; }
.auth__top { display: flex; justify-content: space-between; align-items: center; margin-block-end: 26px; }
.auth__top a.back { color: var(--muted); font-size: .84rem; font-weight: 600; }
.auth__top a.back:hover { color: var(--rouge); }

/* ==========================================================================
   RESPONSIVE + RTL
   ========================================================================== */
@media (max-width: 1080px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth__brand { display: none; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w);
    transform: translateX(-100%); transition: transform var(--t);
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(20,7,12,.55); z-index: 95; }
  .menu-toggle { display: grid; }
  .userchip__name { display: none; }
}
/* Mobile : jamais de défilement horizontal de la page entière */
@media (max-width: 1024px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  .content { padding-inline: 14px; }
  .panel, .card { max-width: 100%; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 640px) {
  .site-nav > a:not(.btn) { display: none; }
  .site-header__in { flex-wrap: wrap; row-gap: 8px; }
  .site-brand .wordmark { height: 24px; }
  .content { padding: 18px 14px 40px; }
  .card { padding: 18px; }
  .chartbars .cb:nth-child(even) span { visibility: hidden; }
}

/* Icônes directionnelles miroitées en RTL (flèche de déconnexion). */
[dir="rtl"] .icon-flip svg { transform: scaleX(-1); }

/* ===== Effet « liquid glass » (boutons translucides, reflet, halo) ========== */
.btn, .abtn, .chip, .badge-numero { position: relative; overflow: hidden; }
.btn::after, .abtn::after, .chip::after, .badge-numero::after {
  content: ''; position: absolute; pointer-events: none;
  left: 7%; right: 7%; top: 2px; height: 38%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.38), rgba(255,255,255,0));
}
.btn {
  background: linear-gradient(180deg, rgba(245,19,58,.98), rgba(199,10,45,.96));
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -6px 12px rgba(120,0,20,.25),
              0 12px 26px -10px rgba(245,19,58,.65);
}
.btn-ok {
  background: linear-gradient(180deg, rgba(22,189,133,.98), rgba(9,124,85,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -6px 12px rgba(0,70,45,.25),
              0 12px 26px -10px rgba(14,159,110,.65);
}
.btn-danger {
  background: linear-gradient(180deg, rgba(244,63,94,.98), rgba(178,12,40,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -6px 12px rgba(120,0,20,.25),
              0 12px 26px -10px rgba(220,38,38,.65);
}
.btn-bleu {
  background: linear-gradient(160deg, rgba(58,58,58,.92), rgba(12,12,12,.88));
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 12px 26px -12px rgba(0,0,0,.6);
}
.btn-ghost {
  background: rgba(255,255,255,.45); border: 1.5px solid rgba(216,23,58,.5);
  backdrop-filter: blur(10px) saturate(1.5); -webkit-backdrop-filter: blur(10px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 8px 18px -12px rgba(0,0,0,.25);
}
.btn-ghost::after { background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0)); }
.btn-ghost:hover { background: rgba(216,23,58,.1); }
.btn-blanc {
  background: linear-gradient(180deg, rgba(245,19,58,.98), rgba(199,10,45,.96));
  color: #fff !important; border: 1px solid rgba(255,255,255,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -6px 12px rgba(120,0,20,.25),
              0 12px 26px -10px rgba(245,19,58,.65);
}
/* boutons d'action : style plat (identique à la page Certificats) */
.chip {
  background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.65); color: var(--ink);
  backdrop-filter: blur(10px) saturate(1.5); -webkit-backdrop-filter: blur(10px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 8px 18px -12px rgba(0,0,0,.3);
}
.chip::after { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); }
.chip.is-on {
  background: linear-gradient(180deg, rgba(245,19,58,.98), rgba(199,10,45,.96));
  border-color: rgba(255,255,255,.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -5px 10px rgba(120,0,20,.22),
              0 10px 22px -10px rgba(245,19,58,.7);
}
.badge-numero {
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(253,223,230,.55));
  border: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(8px) saturate(1.4); -webkit-backdrop-filter: blur(8px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 20px -10px rgba(216,23,58,.55);
}
.badge-numero::after { background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0)); }
[data-theme="dark"] .chip { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); color: var(--ink); }
[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(241,61,92,.55); }
[data-theme="dark"] .badge-numero { background: rgba(241,61,92,.14); border-color: rgba(255,255,255,.18); }
/* Fiche de consultation participant */
.infogrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin: 0; }
.infogrid > div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--panel-2); }
.infogrid dt { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.infogrid dd { margin: 0; font-weight: 650; font-size: .92rem; overflow-wrap: anywhere; }
@media (max-width: 700px) { .infogrid { grid-template-columns: 1fr; } }

/* ===== Connexion v2 (panneau marque + champs à icônes) ====================== */
.auth { background: #eceef1; }
[data-theme="dark"] .auth { background: #0c0c0e; }
.auth__form { padding: clamp(14px, 2vw, 26px); }
.auth__form > .auth__card {
  width: 100%; max-width: 600px; background: var(--panel); border-radius: 26px;
  padding: clamp(26px, 3.4vw, 52px) clamp(26px, 4vw, 64px);
  box-shadow: 0 30px 70px -40px rgba(20, 10, 14, .35);
  min-height: calc(100vh - clamp(28px, 4vw, 52px)); display: flex; flex-direction: column; justify-content: center;
}
.auth__card h1 { font-size: 1.9rem; }

.auth__brand--panel {
  background: url('../img/auth-bg-2026.jpg') center / cover no-repeat, #8f0c25;
  color: #fff; padding: clamp(30px, 4vw, 56px); display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.bp-logo { width: clamp(210px, 24vw, 360px); height: auto; position: relative; z-index: 1;
  filter: drop-shadow(0 10px 26px rgba(0,0,0,.35)); }
.bp-dash { width: 40px; height: 4px; border-radius: 2px; background: #fff; margin-block: clamp(24px, 4vh, 48px) 18px; position: relative; z-index: 1; }
.auth__brand--panel h2.bp-slogan { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.35; font-weight: 800; color: #fff; margin: 0; position: relative; z-index: 1; max-width: none; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.bp-slogan span { color: #fff; }
.bp-reel { display: none; }
[dir="rtl"] .bp-reel { transform: scaleX(-1); object-position: bottom right; }

.fld { position: relative; }
.fld input { padding-inline-start: 58px !important; margin-block-end: 0 !important; }
.fld input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--panel) inset; -webkit-text-fill-color: var(--ink); }
.fld__ic {
  position: absolute; inset-inline-start: 8px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center;
  justify-content: center; background: var(--rouge-soft); flex: none;
}
.fld__ic svg { width: 18px; height: 18px; fill: var(--rouge); }
.fld__eye {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: 6px; display: inline-flex;
}
.fld__eye svg { width: 19px; height: 19px; fill: var(--muted); }
.fld__eye.on svg, .fld__eye:hover svg { fill: var(--rouge); }
.btn-cta { width: 100%; display: flex; align-items: center; gap: 8px; margin-block-start: 14px;
  padding: 11px 22px; font-size: .98rem; border-radius: 999px; }
.btn-cta::after { left: 6px; right: 6px; top: 2px; height: 46%; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0)); }
.ordiv { display: flex; align-items: center; gap: 0; margin-block: 18px; color: var(--muted); }
.ordiv::before, .ordiv::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.ordiv span {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 700;
  background: var(--panel); margin-inline: -1px; z-index: 1;
}
.btn-magic {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid rgba(216,23,58,.45);
  background: rgba(255,255,255,.4); color: var(--rouge); font-weight: 700; font-size: .92rem;
  cursor: pointer; transition: var(--t);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn-magic:hover { background: var(--rouge-soft); }
.btn-magic .fld__ic { position: static; transform: none; width: 34px; height: 34px; }
[data-theme="dark"] .btn-magic { background: rgba(255,255,255,.05); border-color: rgba(241,61,92,.5); }
.securenote {
  display: flex; gap: 12px; align-items: flex-start; margin-block-start: 22px;
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px;
  background: var(--panel-2); font-size: .85rem;
}
.securenote .sn-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--rouge-soft);
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.securenote .sn-ic svg { width: 19px; height: 19px; fill: var(--rouge); }
/* Statistiques v2 : deux volets + grilles de donuts */
.statsec {
  font-size: 1.18rem; font-weight: 800; margin: 26px 0 14px;
  padding-inline-start: 14px; border-inline-start: 5px solid var(--rouge);
}
.statsec:first-of-type { margin-block-start: 6px; }
.dgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; margin-block-end: 16px; }

/* Frise d'avancement d'une œuvre */
.ostepper {
  display: flex; align-items: flex-start; gap: 4px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 14px 6px; margin-block-end: 10px;
}
.ostep { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; text-align: center; }
.ostep__dot {
  width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: .78rem;
  background: var(--panel-2); color: var(--muted); border: 2px solid var(--line);
}
.ostep__lb { font-size: .72rem; font-weight: 700; color: var(--muted); line-height: 1.25; }
.ostep__lb small { display: block; font-weight: 600; font-size: .66rem; color: var(--rouge); }
.ostep__bar { flex: none; width: 46px; height: 3px; border-radius: 2px; margin-block-start: 13px; background: transparent; }
.ostep__bar--on { background: #0e9f6e; }
.ostep--done .ostep__dot { background: #0e9f6e; border-color: #0e9f6e; color: #fff; }
.ostep--done .ostep__lb { color: var(--ink); }
.ostep--curr .ostep__dot {
  background: var(--grad-rouge); border-color: var(--rouge); color: #fff;
  box-shadow: 0 0 0 4px var(--rouge-soft);
}
.ostep--curr .ostep__lb { color: var(--rouge); }
.ostep--warn .ostep__dot { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ostep--warn .ostep__lb { color: #b45309; }
.ostep--fail .ostep__dot { background: #555; border-color: #555; color: #fff; }
.ostep--fail .ostep__lb { color: var(--ink); }
.ostep--fail .ostep__lb small { color: #d8173a; }

/* Drapeaux agrandis à côté des noms de pays */
.flg { font-size: 1.35em; line-height: 1; vertical-align: -0.14em; display: inline-block; }
