@font-face { font-family: "Manrope"; src: url("/statique/manrope.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
/* palette « Bleu confiance », mêmes jetons que le portail KonxPhone et le site public */
:root {
  --canvas: #F3F6FB; --panel: #ffffff; --text: #0B1F3A; --text-2: #33415C;
  --muted: #52607A; --faint: #8A97AD; --line: #E7EDF5; --line-2: #DCE4EF; --soft: #EEF3FA;
  --primary: #2563EB; --primary-text: #ffffff; --stripe: #DCE7FD; --stripe-2: #F1F5FC;
  --nuit: #0B1F3A; --nuit-text: #ffffff; --doux: #DCE7FD; --doux-text: #1D4FD0; --logo: #0B1F3A;
  --danger: #B42318; --danger-soft: #FEF3F2;
  --shadow: 0 1px 2px rgba(11, 31, 58, .05);
  --shadow-lg: 0 16px 40px -14px rgba(11, 31, 58, .3), 0 2px 6px rgba(11, 31, 58, .06);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --r-lg: 18px; --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #06111F; --panel: #0C1D35; --text: #EEF3FA; --text-2: #C9D4E5;
    --muted: #9FB1CC; --faint: #6B7D99; --line: #16294A; --line-2: #1E3558; --soft: #102540;
    --primary: #3B82F6; --primary-text: #ffffff; --stripe: #1E3558; --stripe-2: #102540;
    --nuit: #13294A; --nuit-text: #ffffff; --doux: #13294A; --doux-text: #93C5FD; --logo: #2563EB;
    --danger: #FDA29B; --danger-soft: #2A1215;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 16px 40px -14px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #06111F; --panel: #0C1D35; --text: #EEF3FA; --text-2: #C9D4E5;
  --muted: #9FB1CC; --faint: #6B7D99; --line: #16294A; --line-2: #1E3558; --soft: #102540;
  --primary: #3B82F6; --primary-text: #ffffff; --stripe: #1E3558; --stripe-2: #102540;
  --nuit: #13294A; --nuit-text: #ffffff; --doux: #13294A; --doux-text: #93C5FD; --logo: #2563EB;
  --danger: #FDA29B; --danger-soft: #2A1215;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 16px 40px -14px rgba(0, 0, 0, .8), 0 2px 6px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--text);
       font: 15px/1.5 Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
       -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--doux-text); }
code, .mono { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--soft);
       padding: 2px 6px; border-radius: 6px; color: var(--text-2); word-break: break-all; }
.logo-fond { fill: var(--logo); }
.visuel-masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pages de connexion ---------- */
.porte { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.carte { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line);
         border-radius: 22px; box-shadow: var(--shadow-lg); padding: 28px 24px 22px; position: relative;
         animation: monte 360ms var(--ease-out) both; }
@keyframes monte { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .carte { animation: none; } }
.marque { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; min-width: 0; }
.marque svg { width: 34px; height: 34px; flex-shrink: 0; }
.marque b { display: block; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; }
.marque span { font-size: 12.5px; color: var(--muted); }
.outils { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -6px 0 18px; flex-wrap: wrap; }
.langues { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 10px; }
.langues a { color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 0 10px; min-height: 36px; display: inline-flex; align-items: center;
             border-radius: 8px; text-decoration: none; }
.langues a[aria-current="true"] { background: var(--doux); color: var(--doux-text); }
.theme { border: 1px solid var(--line-2); background: none; border-radius: 10px; min-height: 40px; padding: 0 12px; font-size: 12.5px;
         color: var(--muted); cursor: pointer; }
.carte h1 { font-size: 22px; letter-spacing: -0.02em; margin: 0 0 4px; font-weight: 650; }
.carte > p, .carte .texte { margin: 0 0 18px; color: var(--muted); }
.pour { margin: -12px 0 18px; color: var(--text-2); font-weight: 600; }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.champ { width: 100%; height: 48px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px;
         background: var(--panel); font-size: 16px; min-width: 0; }
.champ:focus-visible, .btn:focus-visible, .lien:focus-visible, .langues a:focus-visible, .theme:focus-visible, .voir:focus-visible, .nav a:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; }
.mdp { position: relative; }
.mdp .champ { padding-right: 100px; }
.voir { position: absolute; right: 4px; top: 4px; height: 40px; min-width: 88px; padding: 0 12px; border: 0; border-radius: 9px;
        background: none; color: var(--doux-text); font-size: 13px; font-weight: 600; cursor: pointer; }
.voir:hover { background: var(--doux); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
       border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; text-decoration: none;
       font-size: 14px; font-weight: 650; color: var(--text); white-space: nowrap;
       transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.btn:active { transform: scale(0.97); }
.btn.principal { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }
.btn.danger { color: var(--danger); }
.btn.bloc { width: 100%; margin-top: 20px; height: 48px; }
.btn.petit { min-height: 36px; padding: 0 12px; font-size: 13px; }
.lien { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 6px; border: 0; background: none;
        color: var(--muted); font-size: 13.5px; text-decoration: underline; cursor: pointer; }
.erreur { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 13.5px; font-weight: 600; }
.succes { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--doux); color: var(--doux-text); font-size: 13.5px; font-weight: 600; }
.pied { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.regles { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.regles li { display: flex; gap: 8px; align-items: center; }
.regles li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--faint); }
.regles li.ok { color: var(--text); }
.regles li.ok::before { background: var(--primary); border-color: var(--primary); }
.portees { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.portees li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--stripe-2); }
.deux { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.deux .btn { width: 100%; }
.code-champ { letter-spacing: .3em; font-variant-numeric: tabular-nums; text-align: center; font-size: 22px; }

/* ---------- Espace connecté (Mon compte, console) ---------- */
.haut { position: sticky; top: 0; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--line); }
.haut-int { max-width: 1040px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.haut .marque { margin: 0; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--text-2);
         text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a[aria-current="page"] { background: var(--doux); color: var(--doux-text); }
.contenu { max-width: 1040px; margin: 0 auto; padding: 20px 16px 80px; }
.contenu h1 { font-size: 24px; letter-spacing: -0.02em; margin: 6px 0 4px; font-weight: 650; }
.contenu > p.intro { margin: 0 0 18px; color: var(--muted); }
.bloc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.bloc + .bloc { margin-top: 14px; }
.bloc h2 { font-size: 16px; margin: 0 0 4px; font-weight: 650; }
.bloc > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.bloc form { margin: 0; }
.ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ligne > div { flex: 1 1 220px; min-width: 0; }
.ligne label { margin-top: 8px; }
.etat { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--soft); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.etat.fort { background: var(--doux); color: var(--doux-text); }
.etat.alerte { background: var(--danger-soft); color: var(--danger); }
.tableau { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--text-2); overflow-wrap: anywhere; }
tbody tr:last-child td { border-bottom: 0; }
.muet { color: var(--muted); }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 12px; width: max-content; max-width: 100%; margin: 8px 0; }
.qr svg { width: 200px; height: 200px; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0; list-style: none; margin: 10px 0; }
.codes li { font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 6px 8px; background: var(--soft); border-radius: 8px; text-align: center; }
.secret { padding: 12px; border: 1px dashed var(--line-2); border-radius: 12px; margin-top: 10px; }
textarea.champ { height: auto; min-height: 90px; padding: 10px 14px; font-size: 14px; }
select.champ { appearance: auto; }
.case { display: flex; gap: 10px; align-items: center; min-height: 44px; color: var(--text-2); font-size: 14px; margin: 6px 0; }
.case input { width: 20px; height: 20px; }
pre.courriel { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 6px 0 0; }
@media (max-width: 520px) {
  .carte { padding: 22px 16px 18px; border-radius: 18px; }
  .deux { grid-template-columns: 1fr; }
  .nav { margin-left: 0; width: 100%; }
  .tableau.empile table, .tableau.empile tbody, .tableau.empile tr, .tableau.empile td { display: block; width: 100%; }
  .tableau.empile thead { display: none; }
  .tableau.empile tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .tableau.empile td { border: 0; padding: 3px 0; }
  .tableau.empile td[data-l]::before { content: attr(data-l) " : "; color: var(--muted); }
}
