/* =============================================================================
 *  BIOGLOW — thème du panel FLL · REFONTE "sticker" 2026
 *  -----------------------------------------------------------------------------
 *  Identité assumée tirée du logo : bordures ink épaisses, ombres dures
 *  décalées (effet autocollant), vert lime vif, vert forêt foncé pour les barres.
 *  Surcouche Bootstrap 5.3 — LIER CE FICHIER APRÈS le CSS Bootstrap.
 *  100 % offline : aucune dépendance externe (pas de Google Fonts).
 *  Tablette / jour J : thème CLAIR, contraste AA, cibles tactiles >= 44px.
 *  Drop-in : remplace assets/themes/bioglow.css à l'identique.
 * ========================================================================== */
:root {
  --bg:            #edf3e3;   /* fond vert très clair */
  --bg-2:          #e6efd5;
  --surface:       #ffffff;   /* cartes */
  --surface-tint:  #f6faee;
  --ink:           #15210c;   /* texte / bordures "sticker" (vert quasi-noir) */
  --ink-muted:     #5d7440;   /* texte secondaire (>= AA sur clair) */
  --brand:         #8ec63f;   /* vert lime — marque */
  --brand-bright:  #b6ea5e;   /* lime clair — dégradés / hover */
  --brand-dark:    #19260f;   /* vert forêt — header / barres */
  --brand-dark-2:  #23341a;
  --on-brand:      #15210c;   /* texte sur lime */
  --border:        #cdddb0;   /* bordure verte douce (séparateurs internes) */
  --border-strong: #a9c97f;
  --shadow-mint:   #c3dd95;   /* ombre dure douce (cartes) */
  --info:          #1f8a7e;
  --warning:       #e0962e;
  --danger:        #cf473d;
  --radius:        16px;
  --tap:           44px;
  --sticker:       4px 4px 0 var(--ink);          /* ombre dure d'élément */
  --sticker-soft:  6px 6px 0 var(--shadow-mint);  /* ombre dure de carte */
}

/* ---- Base ---------------------------------------------------------------- */
body {
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1100px 520px at 102% -8%, rgba(168,226,78,0.35), transparent 58%),
    radial-gradient(900px 480px at -6% 108%, rgba(142,198,63,0.22), transparent 60%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.bg-light { background: var(--bg) !important; color: var(--ink); }
.bg-white { background: var(--surface) !important; color: var(--ink); }
.text-muted { color: var(--ink-muted) !important; }
.text-dark  { color: var(--ink) !important; }
h1, h2, h3, h4, h5, h6, .navbar-brand, .btn { letter-spacing: -0.1px; }
h1, h2, h3 { font-weight: 800; }
a { color: #4d7d18; text-decoration-color: var(--border-strong); font-weight: 600; }
a:hover { color: var(--brand-dark); }
hr { border-color: var(--border); opacity: 1; }
.container, .container-fluid { padding-top: 2px; }

/* ---- Navbar / barres (vert forêt + liseré lime) -------------------------- */
.navbar, .navbar.bg-dark, .navbar-dark {
  background: linear-gradient(180deg, var(--brand-dark-2), var(--brand-dark)) !important;
  border-bottom: 3px solid var(--brand-bright);
}
.navbar-brand, .navbar .navbar-text, .navbar a, .navbar .text-light { color: #f1f7e6 !important; }
.navbar-brand { font-weight: 900; letter-spacing: .3px; }
.navbar-brand img { border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--brand-bright); border-radius: 10px; }

/* ---- Cartes ("sticker" : bordure ink + ombre dure) ----------------------- */
.card {
  background: var(--surface);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 20px;
  box-shadow: var(--sticker-soft);
}
.card-body { color: var(--ink); }
.shadow-sm, .shadow { box-shadow: var(--sticker-soft) !important; }

/* "Tuiles" du menu d'accueil (gros boutons .py-4) : effet sticker au survol. */
.btn.w-100.py-4 {
  border-width: 2.5px;
  box-shadow: var(--sticker);
}
.btn.w-100.py-4:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

/* ---- Boutons (>= 44px, lime + ombre dure) -------------------------------- */
.btn {
  min-height: var(--tap);
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  font-weight: 800;
  box-shadow: var(--sticker);
  transition: transform .12s ease, box-shadow .12s ease, filter .15s ease, background .15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(0, 0); box-shadow: 2px 2px 0 var(--ink); }
.btn-sm { box-shadow: 3px 3px 0 var(--ink); }
.btn-primary, .btn-success {
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  color: var(--on-brand);
}
.btn-primary:hover, .btn-success:hover { filter: brightness(1.04); color: var(--on-brand); }
.btn-info    { background: var(--info);    color: #eafff9; }
.btn-warning { background: var(--warning); color: #2b1c00; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-secondary, .btn-dark { background: var(--brand-dark-2); color: #eef4e1; }
.btn-outline-primary, .btn-outline-success {
  color: var(--ink); border: 2.5px solid var(--ink); background: var(--surface);
}
.btn-outline-primary:hover, .btn-outline-success:hover { background: var(--surface-tint); color: var(--ink); }
.btn-outline-secondary, .btn-outline-dark {
  color: var(--ink); border: 2.5px solid var(--ink); background: var(--surface);
}
.btn-outline-secondary:hover, .btn-outline-dark:hover { background: var(--surface-tint); color: var(--ink); }
.btn-link { color: #4d7d18; font-weight: 700; border: 0; box-shadow: none; }
.btn-link:hover { transform: none; box-shadow: none; }

/* ---- Formulaires --------------------------------------------------------- */
.form-control, .form-select, textarea {
  min-height: var(--tap);
  background: var(--surface-tint);
  border: 2.5px solid var(--ink);
  color: var(--ink);
  border-radius: 12px;
  font-weight: 600;
}
.form-control::placeholder { color: #8aa06a; }
.form-control:focus, .form-select:focus, textarea:focus {
  background: #fff;
  border-color: var(--brand-dark);
  box-shadow: 0 0 0 4px rgba(127,181,57,.32);
  color: var(--ink);
}
.form-label { color: var(--ink); font-weight: 800; font-size: .9rem; }
.form-check-input { border: 2px solid var(--ink); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--ink); }
.input-group-text { background: var(--surface-tint); border: 2.5px solid var(--ink); color: var(--ink); }

/* ---- Tableaux ("sticker") ------------------------------------------------ */
.table {
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--sticker-soft);
  background: var(--surface);
  border-collapse: separate;
  border-spacing: 0;
}
.table > :not(caption) > * > * { background: transparent; color: var(--ink); border-color: var(--border); }
.table thead th {
  background: var(--ink);
  color: #cfe0b0;
  border-bottom: 0;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .5px;
  font-weight: 800;
  padding: .85rem 1rem;
}
.table-striped > tbody > tr:nth-of-type(odd) > * { background: var(--surface-tint); }
.table-hover > tbody > tr:hover > * { background: rgba(127,181,57,0.14); }
.table td, .table th { font-variant-numeric: tabular-nums; }

/* ---- Alerts / badges ----------------------------------------------------- */
.alert {
  border-radius: 12px;
  border: 2px solid var(--ink);
  border-left-width: 6px;
  background: var(--surface-tint);
  color: var(--ink);
  font-weight: 600;
}
.alert-success { border-left-color: var(--brand); }
.alert-danger  { border-left-color: var(--danger);  background: #fdecea; }
.alert-warning { border-left-color: var(--warning); background: #fffaf0; }
.alert-info    { border-left-color: var(--info); }
.badge {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .4px;
}
.badge.bg-success, .badge.text-bg-success { background: var(--brand) !important; color: var(--on-brand) !important; }
.badge.bg-secondary, .badge.text-bg-secondary { background: var(--brand-dark-2) !important; color: #eef4e1 !important; }
.badge.bg-dark, .badge.text-bg-dark { background: var(--brand-dark-2) !important; }
.badge.text-bg-warning { background: var(--warning) !important; color: #2b1c00 !important; }
.badge.text-bg-danger  { background: var(--danger) !important; color: #fff !important; }
.badge.text-bg-info    { background: var(--info) !important; color: #eafff9 !important; }
.badge.text-bg-primary { background: var(--info) !important; color: #eafff9 !important; }

/* ---- Titres de section --------------------------------------------------- */
.text-uppercase.text-muted { color: #2c3d1c !important; opacity: 1; font-weight: 800; letter-spacing: 1px; }

/* ---- Accessibilité : focus visible --------------------------------------- */
a:focus-visible, .btn:focus-visible, .form-control:focus-visible,
.form-select:focus-visible, button:focus-visible {
  outline: 3px solid var(--brand-dark); outline-offset: 2px;
}

/* ---- Réduction du mouvement ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, .btn { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .btn:hover, .btn.w-100.py-4:hover { transform: none; }
}

/* =============================================================================
 *  PANEL FLL v2 — compléments au thème BioGlow (gabarits, composants, écrans)
 * ========================================================================== */
:root {
  --mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --screen-bg: #0c1407;
  --screen-ink: #eaf5d8;
  --screen-muted: #9fb983;
  --cyan: #46e0d0;
  --glow: 0 0 26px rgba(168,226,78,.25);
}
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.btn-close { min-height: 0; box-shadow: none; border: 0; }
.btn-close:hover { transform: none; box-shadow: none; }

/* ---- Barre staff ------------------------------------------------------------ */
.app-nav { padding: .45rem .75rem; }
.app-nav .brand-logo { background: #fff; padding: 2px; }
.comp-chip { display: inline-flex; align-items: center; gap: .45rem; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: .3rem .75rem; border-radius: 999px; border: 2px solid var(--brand-bright); color: #f1f7e6 !important; text-decoration: none; font-weight: 800; font-size: .9rem; }
.comp-chip .dot { width: .6rem; height: .6rem; border-radius: 50%; background: #6b7f55; flex: none; }
.comp-chip .dot.on { background: var(--brand-bright); box-shadow: 0 0 8px var(--brand-bright); }
.role-chip { padding: .3rem .7rem; border-radius: 999px; background: var(--brand-bright); color: var(--ink); font-weight: 800; font-size: .82rem; white-space: nowrap; }
.role-chip.role-dev { background: var(--danger); color: #fff; }
.role-chip.role-admin { background: var(--warning); color: #2b1c00; }
.role-chip.role-jury, .role-chip.role-regie { background: var(--info); color: #eafff9; }
.lang-toggle { display: inline-grid; place-items: center; min-width: 2.6rem; height: 2.2rem; border-radius: 10px; border: 2px solid currentColor; font-weight: 900; text-decoration: none; font-size: .8rem; }
.crumbs { padding-top: .6rem; font-size: .9rem; }
.crumbs a { text-decoration: none; }
.app-foot { color: var(--ink-muted); font-size: .8rem; padding: 2rem 1rem 1.5rem; text-align: center; }

/* ---- Accueil : groupes + tuiles ------------------------------------------- */
.hub-group { margin-bottom: 1.6rem; }
.hub-group-title { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 900; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: .6rem; }
.hub-group-title .sq { width: .75rem; height: .75rem; border: 2px solid var(--ink); border-radius: 3px; background: var(--brand); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; background: var(--surface); color: var(--ink); text-decoration: none;
  border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: var(--sticker-soft); transition: transform .12s, box-shadow .12s; min-height: 92px; }
.tile:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shadow-mint); color: var(--ink); }
.tile .ico { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.35rem; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--surface-tint); }
.tile .ttl { font-weight: 800; font-size: 1rem; line-height: 1.2; }
.tile .dsc { font-size: .82rem; color: var(--ink-muted); margin-top: .2rem; font-weight: 600; }
.tile.primary { background: linear-gradient(180deg, var(--brand-bright), var(--brand)); }
.tile.primary .dsc { color: #2c3d1c; }
.tile.primary .ico { background: #fff; }
.tile .ext { margin-left: auto; font-size: .8rem; opacity: .6; }

/* ---- Composants ------------------------------------------------------------- */
.page-head h1 { font-weight: 900; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 1rem; }
.stat-tile { background: var(--surface); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--sticker-soft); padding: .8rem 1rem; }
.stat-tile .stat-value { font-family: var(--mono); font-size: clamp(1.3rem, 2.2vw, 1.9rem); font-weight: 700; line-height: 1.1; white-space: nowrap; }
.stat-tile .stat-label { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-muted); }
.stat-tile .stat-hint { font-size: .78rem; color: var(--ink-muted); }
.stat-tile.ok { background: #eef8dc; } .stat-tile.warn { background: #fff4e0; } .stat-tile.bad { background: #fdecea; }
.empty-state { text-align: center; padding: 2.5rem 1rem; background: var(--surface); border: 2.5px dashed var(--border-strong); border-radius: 20px; }
.empty-state .empty-icon { font-size: 2.4rem; line-height: 1; margin-bottom: .6rem; }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; border: 1.5px solid var(--ink); font-weight: 800; font-size: .78rem; background: var(--surface-tint); }
.pill.ok { background: var(--brand); } .pill.warn { background: var(--warning); } .pill.bad { background: var(--danger); color: #fff; } .pill.info { background: var(--info); color: #eafff9; }
.pill.muted { background: #e5ecd9; color: var(--ink-muted); border-color: var(--border-strong); }
.card-sticker { background: var(--surface); border: 2.5px solid var(--ink); border-radius: 20px; box-shadow: var(--sticker-soft); padding: 1rem 1.1rem; }
.card-ink { background: var(--ink); color: #eaf5d8; border-radius: 20px; padding: 1rem 1.2rem; box-shadow: 6px 6px 0 var(--brand); }
.card-ink .big { font-family: var(--mono); font-size: 3.2rem; font-weight: 700; color: var(--brand-bright); line-height: 1; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 8px 10px 0; }
.table .sticky-col { position: sticky; left: 0; background: var(--surface) !important; z-index: 1; }
.table tr.is-best > *, .table td.is-best { background: rgba(142,198,63,.28) !important; font-weight: 800; }
.seg { display: inline-flex; border: 2.5px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 3px 3px 0 var(--ink); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: .55rem .9rem; font-weight: 800; cursor: pointer; background: var(--surface); min-height: var(--tap); display: grid; place-items: center; border-right: 2px solid var(--ink); }
.seg label:last-of-type { border-right: 0; }
.seg input:checked + label { background: var(--brand); }
.seg input:focus-visible + label { outline: 3px solid var(--brand-dark); outline-offset: -4px; }
details.help { background: var(--surface-tint); border: 2px solid var(--border-strong); border-radius: 12px; padding: .6rem .9rem; margin-bottom: 1rem; }
details.help summary { font-weight: 800; cursor: pointer; }
.kbd { font-family: var(--mono); font-size: .8rem; padding: .05rem .35rem; border: 1.5px solid var(--ink); border-radius: 6px; background: #fff; }
.sticky-bar { position: sticky; bottom: 0; z-index: 20; background: rgba(237,243,227,.94); backdrop-filter: blur(6px); border-top: 2.5px solid var(--ink); padding: .7rem 0; margin-top: 1.5rem; }

/* ---- Toasts, dialogue, bandeau réseau ---------------------------------------- */
.toasts { position: fixed; right: 12px; bottom: 12px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: min(92vw, 380px); }
.toast-msg { background: var(--ink); color: #eaf5d8; border-radius: 12px; padding: .7rem 1rem; font-weight: 700; box-shadow: 4px 4px 0 var(--brand); animation: toastIn .18s ease-out; }
.toast-msg.danger { box-shadow: 4px 4px 0 var(--danger); } .toast-msg.warning { box-shadow: 4px 4px 0 var(--warning); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.fll-dialog { border: 2.5px solid var(--ink); border-radius: 20px; box-shadow: var(--sticker-soft); padding: 1.3rem; max-width: min(92vw, 440px); color: var(--ink); }
dialog.fll-dialog::backdrop { background: rgba(21,33,12,.45); }
.net-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 3000; text-align: center; background: var(--warning); color: #2b1c00; font-weight: 800; padding: .3rem; font-size: .85rem; display: none; }
.net-banner.show { display: block; }
.layout-screen .net-banner, .layout-screen .net-banner.show { display: none !important; }

/* ---- Gabarit PUBLIC (mobile, clair) ------------------------------------------ */
.layout-public { background: var(--bg); }
.public-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem; background: var(--brand-dark); border-bottom: 3px solid var(--brand-bright); color: #f1f7e6; }
.public-top .brand { display: flex; align-items: center; gap: .5rem; color: #f1f7e6; text-decoration: none; font-weight: 900; }
.public-top .brand img { background: #fff; border-radius: 8px; padding: 2px; }
.public-top .lang-toggle { color: #f1f7e6; }
.public-main { max-width: 560px; margin: 0 auto; padding: 1rem; }
.layout-public.wide .public-main { max-width: 1100px; }

/* ---- Gabarit SCREEN (salle / stream, sombre) --------------------------------- */
.layout-screen { background: var(--screen-bg); color: var(--screen-ink); min-height: 100vh; overflow-x: hidden; }
.layout-screen a { color: var(--brand-bright); }
.screen-main { min-height: 100vh; padding: 2vh 2.5vw; display: flex; flex-direction: column; gap: 1.6vh; }
.screen-title { color: var(--brand-bright); font-weight: 900; font-size: clamp(1.4rem, 3.4vw, 3rem); text-shadow: 0 0 40px rgba(182,234,94,.45); margin: 0; letter-spacing: -.5px; }
.screen-sub { color: var(--screen-muted); font-weight: 700; font-size: clamp(.9rem, 1.4vw, 1.3rem); }
.screen-card { border: 2.5px solid var(--brand); border-radius: 18px; background: rgba(255,255,255,.03); box-shadow: var(--glow); padding: 1.2vh 1.2vw; }
.screen-table { width: 100%; border-collapse: collapse; font-size: clamp(.9rem, 1.55vw, 1.6rem); }
.screen-table th { color: var(--screen-muted); text-transform: uppercase; font-size: .7em; letter-spacing: 1px; text-align: left; padding: .35em .5em; border-bottom: 2px solid rgba(142,198,63,.5); }
.screen-table td { padding: .32em .5em; border-bottom: 1px solid rgba(142,198,63,.15); }
.screen-table td.num, .screen-table th.num { text-align: right; font-family: var(--mono); }
.screen-table tr.top td { color: var(--brand-bright); text-shadow: 0 0 18px rgba(182,234,94,.55); font-weight: 800; }
.screen-hud { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-family: var(--mono); color: var(--cyan); font-size: clamp(.9rem, 1.6vw, 1.5rem); }
.live-badge { display: inline-flex; align-items: center; gap: .4em; padding: .15em .7em; border-radius: 999px; background: #c21f1f; color: #fff; font-weight: 800; font-family: "Hanken Grotesk", sans-serif; letter-spacing: 1px; }
.live-badge::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.ticker { overflow: hidden; white-space: nowrap; border-top: 2px solid var(--brand); border-bottom: 2px solid var(--brand); background: rgba(0,0,0,.25); display: flex; align-items: center; }
.ticker .lbl { flex: none; background: var(--brand); color: var(--ink); font-weight: 900; padding: .4em 1.2em .4em .8em; clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%); text-transform: uppercase; font-size: .85rem; position: relative; z-index: 1; }
.ticker .track { display: inline-flex; gap: 3rem; padding-left: 2rem; animation: ticker 45s linear infinite; align-items: center; }
.ticker .track img { height: 4.2vh; max-height: 54px; background: #fff; border-radius: 8px; padding: 3px 8px; }
.ticker .track span { font-weight: 700; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 50% { opacity: .2; } }
.announce-bar { background: var(--brand); color: var(--ink); font-weight: 800; border-radius: 12px; padding: .5em 1em; font-size: clamp(.9rem, 1.6vw, 1.5rem); }
.announce-bar.important { background: var(--warning); }
.layout-screen.transparent { background: transparent; }

/* ---- Impression (secours papier) --------------------------------------------- */
@media print {
  .app-nav, .crumbs, .app-foot, .no-print, .btn, .toasts, .sticky-bar, .lang-toggle, .net-banner { display: none !important; }
  body { background: #fff !important; }
  .card, .table, .card-sticker, .stat-tile, .tile { box-shadow: none !important; }
  .table thead th { background: #ddd !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  main { padding: 0 !important; }
  .page-break { page-break-before: always; }
  a { text-decoration: none; color: #000; }
}
