:root {
  --encre: #10171a;
  --encre-2: #394246;
  --doux: #687076;
  --pale: #979ea2;
  --fond: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --survol: #f1f1ee;
  --trait: #e3e2de;
  --trait-fort: #cfcec9;
  --jaune: #fdb619;
  --jaune-fort: #e8a200;
  --jaune-doux: #fff5d9;
  --sur-jaune: #10171a;
  --bleu: #0a66c2;
  --bleu-doux: #e8f1fb;
  --vert: #0f7a4a;
  --vert-doux: #e5f4ec;
  --rouge: #c42b1c;
  --rouge-doux: #fdecea;
  --orange: #b85300;
  --orange-doux: #fdf0e3;
  --violet: #6b30c9;
  --violet-doux: #f1eafc;
  --barre: #10171a;
  --barre-2: #232c31;
  --barre-texte: #e8eaeb;
  --barre-doux: #9aa3a8;
  --ombre-flottant: 0 12px 32px -8px rgba(16, 23, 26, .22), 0 2px 6px rgba(16, 23, 26, .08);
  --rayon: 8px;
  --rayon-petit: 6px;
  --police: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

:root[data-theme="sombre"] {
  --encre: #eceeef;
  --encre-2: #c7cbcd;
  --doux: #9aa2a6;
  --pale: #6f777b;
  --fond: #0c1113;
  --surface: #151c1f;
  --surface-2: #1a2226;
  --survol: #1f282c;
  --trait: #263034;
  --trait-fort: #34403f;
  --jaune-doux: #3a2f12;
  --bleu: #5aa2f0;
  --bleu-doux: #13263b;
  --vert: #43b97f;
  --vert-doux: #11291d;
  --rouge: #f0705f;
  --rouge-doux: #34171300;
  --orange: #f0a35e;
  --orange-doux: #33220f;
  --violet: #b394f3;
  --violet-doux: #251a3a;
  --barre: #0a0e10;
  --barre-2: #1b2327;
  --ombre-flottant: 0 12px 32px -8px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --encre: #eceeef;
    --encre-2: #c7cbcd;
    --doux: #9aa2a6;
    --pale: #6f777b;
    --fond: #0c1113;
    --surface: #151c1f;
    --surface-2: #1a2226;
    --survol: #1f282c;
    --trait: #263034;
    --trait-fort: #34403f;
    --jaune-doux: #3a2f12;
    --bleu: #5aa2f0;
    --bleu-doux: #13263b;
    --vert: #43b97f;
    --vert-doux: #11291d;
    --rouge: #f0705f;
    --rouge-doux: #341713;
    --orange: #f0a35e;
    --orange-doux: #33220f;
    --violet: #b394f3;
    --violet-doux: #251a3a;
    --barre: #0a0e10;
    --barre-2: #1b2327;
    --ombre-flottant: 0 12px 32px -8px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="sombre"] { --rouge-doux: #341713; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 14px/1.5 var(--police);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" off;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.012em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
small, .petit { font-size: 12.5px; color: var(--doux); }
.doux { color: var(--doux); }
.pale { color: var(--pale); }
.fort { font-weight: 600; }
.chiffre-tab, .num { font-variant-numeric: tabular-nums; }
.rouge { color: var(--rouge); }
.vert { color: var(--vert); }
.droite { text-align: right; }
.centre { text-align: center; }
.tronque { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.coupe { overflow-wrap: anywhere; }
.icone { flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--jaune); color: var(--sur-jaune); }
hr { border: 0; border-top: 1px solid var(--trait); margin: 16px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--rayon-petit);
  background: var(--encre); color: var(--surface);
  font-weight: 600; font-size: 13.5px; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none !important;
  transition: background-color .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { background: var(--encre-2); }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-jaune { background: var(--jaune); color: var(--sur-jaune); }
.btn-jaune:hover { background: var(--jaune-fort); }
.btn-second { background: var(--surface); color: var(--encre); border-color: var(--trait-fort); }
.btn-second:hover { background: var(--survol); }
.btn-fantome { background: transparent; color: var(--encre-2); }
.btn-fantome:hover { background: var(--survol); color: var(--encre); }
.btn-danger { background: var(--rouge); color: #fff; }
.btn-danger:hover { background: #a3220f; }
.btn-lien { background: none; border: 0; padding: 0; height: auto; color: var(--bleu); font-weight: 600; }
.btn-lien:hover { background: none; text-decoration: underline !important; }
.btn-petit { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-grand { height: 42px; padding: 0 20px; font-size: 15px; }
.btn-icone { width: 34px; padding: 0; }
.btn-icone.btn-petit { width: 28px; }
.btn-bloc { width: 100%; }
.groupe-btn { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.groupe-btn form { display: contents; }

input, select, textarea {
  width: 100%; min-width: 0;
  font: inherit; font-size: 14px; color: var(--encre);
  background: var(--surface);
  border: 1px solid var(--trait-fort); border-radius: var(--rayon-petit);
  padding: 7px 10px; min-height: 36px;
  transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; line-height: 1.5; min-height: 80px; }
select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23687076' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
input:hover, select:hover, textarea:hover { border-color: var(--pale); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bleu) 18%, transparent); }
input::placeholder, textarea::placeholder { color: var(--pale); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--encre); flex: none; }
input[type="file"] { padding: 6px; min-height: 0; font-size: 13px; }
input[type="color"] { padding: 2px; height: 36px; }

.formulaire { display: grid; gap: 16px; align-content: start; }
.champ { display: grid; gap: 6px; align-content: start; }
.champ > label, .champ > .etiquette-champ { font-weight: 600; font-size: 13px; }
.champ .aide { font-size: 12.5px; color: var(--doux); font-weight: 400; }
.champ-ligne { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.champs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.champs-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.formulaire-pied { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding-top: 4px; }
.formulaire-pied.gauche { justify-content: flex-start; }
.choix-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.choix-carte { position: relative; display: grid; gap: 2px; padding: 12px 12px 12px 38px; border: 1px solid var(--trait-fort); border-radius: var(--rayon); cursor: pointer; background: var(--surface); }
.choix-carte input { position: absolute; left: 12px; top: 14px; }
.choix-carte strong { font-size: 13.5px; }
.choix-carte small { font-size: 12px; }
.choix-carte:has(input:checked) { border-color: var(--encre); box-shadow: inset 0 0 0 1px var(--encre); }

.panneau { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); min-width: 0; }
.panneau-corps { padding: 16px; }
.panneau-corps + .panneau-corps { border-top: 1px solid var(--trait); }
.panneau-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 0; }
.panneau-tete h2 { font-size: 15px; }
.panneau-tete a, .panneau-tete .lien-tete { font-size: 13px; font-weight: 600; color: var(--bleu); }
.panneau-tete + .panneau-corps { padding-top: 10px; }
.panneau-pied { padding: 10px 16px; border-top: 1px solid var(--trait); font-size: 13px; }
.panneau-pied a { color: var(--bleu); font-weight: 600; }
.pile { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pile-large { display: grid; gap: 20px; align-content: start; min-width: 0; }

.entete-page { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.entete-page h1 { font-size: 22px; }
.entete-page p { margin: 4px 0 0; color: var(--doux); }
.fil-ariane { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--doux); margin-bottom: 6px; }
.fil-ariane a { color: var(--doux); }
.fil-ariane a:hover { color: var(--encre); }

.colonnes { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.colonnes-gauche { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.colonnes-egales { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grille-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grille-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grille-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.collant { position: sticky; top: 72px; }

.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--trait); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.onglets::-webkit-scrollbar { display: none; }
.onglets a, .onglets button { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; color: var(--doux); font-weight: 600; font-size: 13.5px; background: none; border: 0; cursor: pointer; white-space: nowrap; text-decoration: none; }
.onglets a:hover, .onglets button:hover { color: var(--encre); }
.onglets [aria-current="page"], .onglets [aria-selected="true"] { color: var(--encre); }
.onglets [aria-current="page"]::after, .onglets [aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--encre); border-radius: 2px; }
.onglets .compte { font-size: 11.5px; font-weight: 600; color: var(--doux); background: var(--survol); border-radius: 999px; padding: 1px 7px; }
.segments { display: inline-flex; padding: 2px; border-radius: var(--rayon-petit); background: var(--survol); gap: 2px; }
.segments a, .segments button { padding: 5px 12px; border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--doux); background: none; border: 0; cursor: pointer; text-decoration: none; }
.segments [aria-current="page"], .segments [aria-pressed="true"] { background: var(--surface); color: var(--encre); box-shadow: 0 1px 2px rgba(16, 23, 26, .1); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; font-weight: 600; background: var(--survol); color: var(--encre-2); white-space: nowrap; vertical-align: middle; }
.badge-jaune { background: var(--jaune); color: var(--sur-jaune); }
.badge-bleu { background: var(--bleu-doux); color: var(--bleu); }
.badge-vert { background: var(--vert-doux); color: var(--vert); }
.badge-rouge { background: var(--rouge-doux); color: var(--rouge); }
.badge-orange { background: var(--orange-doux); color: var(--orange); }
.badge-violet { background: var(--violet-doux); color: var(--violet); }
.badge-encre { background: var(--encre); color: var(--surface); }
.statut { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--encre-2); white-space: nowrap; }
.statut::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pale); }
.statut-vert::before { background: var(--vert); }
.statut-jaune::before { background: var(--jaune-fort); }
.statut-rouge::before { background: var(--rouge); }
.statut-bleu::before { background: var(--bleu); }
.compteur { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5372a; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; font-style: normal; }

.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--survol); display: inline-block; }
.avatar-lettres { display: inline-grid; place-items: center; color: #fff; font-weight: 650; line-height: 1; letter-spacing: .01em; }
.avatar-carre { border-radius: 8px; }
.avatars { display: flex; }
.avatars .avatar { box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar + .avatar { margin-left: -8px; }
.en-ligne { position: relative; }
.en-ligne::after { content: ""; position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: #31a24c; box-shadow: 0 0 0 2px var(--surface); }

.personne { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none !important; color: inherit; }
.personne-texte { display: grid; min-width: 0; line-height: 1.3; }
.personne-texte strong { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.personne-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.personne:hover strong { text-decoration: underline; text-underline-offset: 2px; }
.verifie { color: var(--bleu); display: inline-block; vertical-align: -3px; }

.lignes { list-style: none; margin: 0; padding: 0; }
.lignes > li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--trait); min-width: 0; }
.lignes > li:first-child { border-top: 0; }
.lignes > li > a.ligne-lien, .lignes > li > .ligne-texte { flex: 1; min-width: 0; display: grid; gap: 1px; color: inherit; text-decoration: none; }
.lignes > li > a.ligne-lien:hover strong { text-decoration: underline; text-underline-offset: 2px; }
.lignes strong { font-weight: 600; overflow-wrap: anywhere; }
.lignes .ligne-meta { margin-left: auto; text-align: right; color: var(--doux); font-size: 12.5px; white-space: nowrap; display: grid; justify-items: end; gap: 2px; }
.lignes.compactes > li { padding: 8px 16px; }
.lignes.cliquables > li:hover { background: var(--surface-2); }
.lignes .non-lu { background: color-mix(in srgb, var(--jaune) 8%, var(--surface)); }
.puce-icone { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; flex: none; background: var(--survol); color: var(--encre-2); }

.table-defile { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--doux); padding: 9px 16px; border-bottom: 1px solid var(--trait); white-space: nowrap; background: var(--surface-2); }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr[data-lien] { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num, .table .droite { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td a { font-weight: 600; }
.table tfoot td, .table tfoot th { padding: 10px 16px; font-weight: 650; border-top: 1px solid var(--trait); background: none; color: var(--encre); font-size: 13.5px; }

.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.chiffre { display: grid; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon); color: inherit; text-decoration: none !important; min-width: 0; }
a.chiffre:hover { border-color: var(--trait-fort); }
.chiffre small { font-size: 12.5px; font-weight: 500; color: var(--doux); display: flex; align-items: center; gap: 6px; }
.chiffre strong { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chiffre .evolution { font-size: 12px; font-weight: 600; }

.vide { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; color: var(--doux); }
.vide .icone { color: var(--pale); margin-bottom: 4px; }
.vide strong { color: var(--encre); font-size: 15px; font-weight: 600; }
.vide p { max-width: 380px; margin: 0; }
.vide .btn { margin-top: 10px; }
.vide-petit { padding: 18px 16px; color: var(--doux); font-size: 13.5px; }

.alerte { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--rayon); border: 1px solid; font-size: 13.5px; }
.alerte .icone { margin-top: 1px; }
.alerte-info { background: var(--bleu-doux); border-color: color-mix(in srgb, var(--bleu) 25%, transparent); color: var(--encre); }
.alerte-info .icone { color: var(--bleu); }
.alerte-ok { background: var(--vert-doux); border-color: color-mix(in srgb, var(--vert) 25%, transparent); }
.alerte-ok .icone { color: var(--vert); }
.alerte-erreur { background: var(--rouge-doux); border-color: color-mix(in srgb, var(--rouge) 30%, transparent); }
.alerte-erreur .icone { color: var(--rouge); }
.alerte-jaune { background: var(--jaune-doux); border-color: color-mix(in srgb, var(--jaune-fort) 40%, transparent); }
.alerte-jaune .icone { color: var(--jaune-fort); }

.deroulant { position: relative; }
.menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); right: 0;
  min-width: 220px; padding: 6px;
  background: var(--surface); color: var(--encre);
  border: 1px solid var(--trait); border-radius: 10px; box-shadow: var(--ombre-flottant);
  display: none;
}
.menu.gauche { left: 0; right: auto; }
.deroulant.ouvert > .menu { display: grid; }
.menu-item, .menu a, .menu button.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 6px; border: 0; background: none;
  color: var(--encre); font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none !important;
}
.menu-item:hover, .menu a:hover { background: var(--survol); }
.menu-item .icone { color: var(--doux); }
.menu-item.danger, .menu .danger { color: var(--rouge); }
.menu-item.danger .icone { color: var(--rouge); }
.menu-separateur { height: 1px; background: var(--trait); margin: 6px 4px; }
.menu-titre { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--doux); }
.menu form { display: contents; }

.dialogue { border: 0; padding: 0; border-radius: 12px; background: var(--surface); color: var(--encre); box-shadow: var(--ombre-flottant); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 64px); }
.dialogue::backdrop { background: rgba(10, 14, 16, .55); }
.dialogue-tete { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--trait); }
.dialogue-tete h2 { font-size: 16px; }
.dialogue-corps { padding: 18px; display: grid; gap: 14px; }
.dialogue-pied { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--trait); background: var(--surface-2); border-radius: 0 0 12px 12px; }

.toasts { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px; background: #10171a; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--ombre-flottant); pointer-events: auto; animation: toast-entree .18s ease-out; }
.toast .icone { color: var(--jaune); }
.toast-erreur .icone { color: #ff8a7a; }
@keyframes toast-entree { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.galerie { display: grid; gap: 2px; border-radius: var(--rayon); overflow: hidden; background: var(--trait); }
.galerie img { width: 100%; height: 100%; object-fit: cover; background: var(--survol); cursor: zoom-in; }
.galerie-1 { grid-template-columns: 1fr; }
.galerie-1 img { max-height: 520px; height: auto; }
.galerie-2 { grid-template-columns: 1fr 1fr; aspect-ratio: 2 / 1.1; }
.galerie-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 16 / 10; }
.galerie-3 img:first-child { grid-row: span 2; }
.galerie-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.apercus { display: flex; flex-wrap: wrap; gap: 8px; }
.apercus:empty { display: none; }
.apercu { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--survol); border: 1px solid var(--trait); }
.apercu img { width: 100%; height: 100%; object-fit: cover; }
.apercu button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(16, 23, 26, .75); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.visionneuse { position: fixed; inset: 0; z-index: 120; background: rgba(5, 8, 9, .92); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.visionneuse img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }

.etoiles { display: inline-flex; gap: 1px; vertical-align: -2px; }
.etoiles svg { fill: var(--trait-fort); }
.etoiles .pleine { fill: #f5a300; }
.etoiles .demi { fill: url(#demi-etoile); fill: #f5c55a; }

.barre {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 56px;
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: var(--barre); color: var(--barre-texte);
}
.barre-logo { display: flex; align-items: center; gap: 9px; width: 208px; flex: none; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none !important; }
.barre-logo img { width: 26px; height: 29px; }
.barre-recherche { position: relative; flex: 1; max-width: 560px; }
.barre-recherche .icone { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--barre-doux); pointer-events: none; }
.barre-recherche input { height: 36px; min-height: 0; padding-left: 36px; background: var(--barre-2); border-color: transparent; color: #fff; border-radius: 6px; }
.barre-recherche input::placeholder { color: var(--barre-doux); }
.barre-recherche input:focus { background: #fff; color: #10171a; border-color: #fff; box-shadow: 0 0 0 3px rgba(253, 182, 25, .45); }
.barre-recherche input:focus::placeholder { color: #8a9296; }
.suggestions { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); color: var(--encre); border: 1px solid var(--trait); border-radius: 10px; box-shadow: var(--ombre-flottant); padding: 6px; z-index: 70; max-height: 70vh; overflow-y: auto; }
.suggestions .menu-titre:first-child { padding-top: 4px; }
.suggestions a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: inherit; }
.suggestions a:hover, .suggestions a[aria-selected="true"] { background: var(--survol); }
.suggestions a small { display: block; }
.barre-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.barre-icone { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--barre-texte); background: none; border: 0; cursor: pointer; text-decoration: none !important; }
.barre-icone:hover { background: var(--barre-2); color: #fff; }
.barre-icone .compteur { position: absolute; top: 3px; right: 2px; box-shadow: 0 0 0 2px var(--barre); }
.barre .btn-creer { height: 34px; margin-right: 6px; }
.barre-avatar { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.barre-avatar:hover .avatar { box-shadow: 0 0 0 2px var(--barre-2), 0 0 0 4px var(--barre-doux); }
.barre .menu { top: calc(100% + 8px); }
.menu-profil { min-width: 260px; }
.menu-profil-tete { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.menu-notifs { width: 380px; max-width: calc(100vw - 24px); padding: 0; max-height: min(560px, calc(100vh - 80px)); overflow-y: auto; }
.menu-notifs .menu-notifs-tete { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 8px; position: sticky; top: 0; background: var(--surface); }
.menu-notifs .menu-notifs-tete a { font-size: 13px; color: var(--bleu); font-weight: 600; }
.notif { display: flex; gap: 10px; padding: 10px 14px; text-decoration: none !important; color: inherit; border-top: 1px solid var(--trait); }
.notif:hover { background: var(--surface-2); }
.notif-texte { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.4; }
.notif-texte small { display: block; margin-top: 2px; }
.notif.non-lue .notif-texte::before { content: ""; float: right; width: 8px; height: 8px; border-radius: 50%; background: var(--bleu); margin: 6px 0 0 8px; }
.notif.non-lue { background: color-mix(in srgb, var(--bleu) 5%, var(--surface)); }

.nav-laterale {
  position: fixed; z-index: 40; top: 56px; bottom: 0; left: 0; width: 240px;
  overflow-y: auto; padding: 12px 10px 24px;
  background: var(--surface); border-right: 1px solid var(--trait);
  scrollbar-width: thin;
}
.nav-groupe { display: grid; gap: 1px; margin-bottom: 14px; }
.nav-groupe-titre { padding: 6px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--pale); letter-spacing: .01em; }
.nav-lien { position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 6px; color: var(--encre-2); font-weight: 500; font-size: 14px; text-decoration: none !important; }
.nav-lien .icone { color: var(--doux); }
.nav-lien:hover { background: var(--survol); color: var(--encre); }
.nav-lien:hover .icone { color: var(--encre); }
.nav-lien[aria-current="page"] { background: var(--survol); color: var(--encre); font-weight: 650; }
.nav-lien[aria-current="page"] .icone { color: var(--encre); }
.nav-lien[aria-current="page"]::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--jaune); }
.nav-lien .compteur { margin-left: auto; }
.nav-lien .nav-plus { margin-left: auto; font-size: 12px; color: var(--pale); font-weight: 500; }
.nav-pied { margin-top: 8px; padding: 12px 10px 0; border-top: 1px solid var(--trait); font-size: 12px; color: var(--pale); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.nav-pied a { color: var(--pale); }

.contenu { margin-left: 240px; padding: 80px 28px 48px; min-height: 100vh; }
.contenu-cadre { max-width: 1180px; margin: 0 auto; }
.contenu-etroit .contenu-cadre { max-width: 760px; }
.contenu-plein { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.contenu-plein .contenu-cadre { max-width: none; }
.flash { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.onglets-bas { display: none; }
.barre-mobile-seul { display: none; }

@media (max-width: 1180px) {
  .colonnes { grid-template-columns: minmax(0, 1fr) 280px; }
  .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .nav-laterale { width: 72px; padding: 12px 8px; }
  .nav-lien { justify-content: center; padding: 0; height: 44px; }
  .nav-lien span, .nav-groupe-titre, .nav-pied, .nav-lien .nav-plus { display: none; }
  .nav-lien .compteur { position: absolute; top: 4px; right: 8px; margin: 0; }
  .nav-lien[aria-current="page"]::before { left: -8px; }
  .contenu { margin-left: 72px; padding-left: 20px; padding-right: 20px; }
  .barre-logo { width: auto; }
  .colonnes, .colonnes-gauche, .colonnes-egales { grid-template-columns: minmax(0, 1fr); }
  .collant { position: static; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  input, select, textarea { font-size: 16px; }
  .barre { padding: 0 6px 0 14px; gap: 6px; height: 52px; }
  .barre-logo span { font-size: 16px; }
  .barre-recherche, .barre .btn-creer, .barre .deroulant-creer, .barre-bureau-seul { display: none; }
  .barre-mobile-seul { display: grid; }
  .barre-avatar { display: none; }
  .menu-notifs { position: fixed; top: 52px; left: 8px; right: 8px; width: auto; }
  .nav-laterale { display: none; }
  .contenu { margin-left: 0; padding: 64px 14px calc(84px + env(safe-area-inset-bottom)); }
  .contenu-plein { padding: 52px 0 calc(64px + env(safe-area-inset-bottom)); }
  .entete-page { align-items: flex-start; }
  .entete-page h1 { font-size: 20px; }
  .champs-2, .champs-3, .grille-2, .grille-3 { grid-template-columns: minmax(0, 1fr); }
  .grille-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .chiffre { padding: 12px; }
  .chiffre strong { font-size: 18px; }
  .lignes > li { padding: 10px 14px; }
  .panneau-corps { padding: 14px; }
  .panneau-tete { padding: 12px 14px 0; }
  .table th, .table td { padding: 9px 12px; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .onglets-bas {
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--trait);
  }
  .onglets-bas a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 0 7px; color: var(--doux); font-size: 10.5px; font-weight: 600; text-decoration: none !important; }
  .onglets-bas a[aria-current="page"] { color: var(--encre); }
  .onglets-bas .compteur { position: absolute; top: 3px; left: calc(50% + 4px); }
  .onglets-bas .onglet-creer { align-self: center; }
  .onglets-bas .onglet-creer span.rond { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--jaune); color: var(--sur-jaune); box-shadow: 0 4px 12px rgba(232, 162, 0, .35); }
  .dialogue { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 14px 14px 0 0; }
}

.contenu-public { min-height: 100vh; }

.menu-item-riche { align-items: flex-start; }
.menu-item-riche .puce-icone { width: 34px; height: 34px; }
.menu-item-riche span:last-child { display: grid; gap: 1px; }
.menu-item-riche strong { font-weight: 600; font-size: 13.5px; }
.menu-item-riche small { font-size: 12px; font-weight: 400; }
.deroulant-creer .menu { width: 340px; }
.menu-theme { padding: 2px 10px 6px; }
.menu-theme .segments { display: flex; }
.menu-theme .segments button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.page-erreur { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 80px 16px; max-width: 520px; margin: 0 auto; }
.page-erreur-code { font-size: 13px; font-weight: 700; color: var(--doux); }
.page-erreur p { color: var(--doux); }
