
    :root {
      --bg-page: #f5f3ee;
      --bg-page-2: #ece8df;
      --bg-header: rgba(250, 249, 246, 0.91);
      --bg-card: #ffffff;
      --bg-card-2: #faf8f4;
      --bg-elevated: #ffffff;

      --accent: #f8b858;
      --accent-dark: #b96b08;
      --accent-2: #17243e;
      --accent-danger: #d84d58;

      --text-main: #111d35;
      --text-muted: #626773;
      --text-dim: #8a8e97;
      --border: rgba(248, 184, 88, 0.42);
      --border-soft: #dedad1;
      --shadow-soft: 0 14px 36px rgba(32, 29, 24, 0.08);
      --ring: 0 0 0 3px rgba(248, 184, 88, 0.24);

      --grad-accent: linear-gradient(135deg, #17243e 0%, #26395d 100%);
      --grad-panel: linear-gradient(145deg, #ffffff 0%, #fbfaf7 100%);
      --link: #a85f06;
      --link-hover: #704005;
    }

    * { box-sizing: border-box; }

    body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background:
      radial-gradient(circle at top left, rgba(248, 184, 88, 0.10), transparent 28%),
      radial-gradient(circle at top right, rgba(23, 36, 62, 0.08), transparent 22%),
      linear-gradient(180deg, #faf9f6 0%, #f5f3ee 100%);
    background-color: var(--bg-page);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    }

    h1, h2, h3, h4 {
      color:var(--text-main);
      font-weight:700;
      letter-spacing:.01em;
      text-shadow:none;
    }
    h1, h2 { font-family:"Manrope", system-ui, sans-serif; letter-spacing:-.025em; }
    strong { color:var(--text-main); font-weight:700; }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
      background-size: 32px 32px;
      mask-image: linear-gradient(180deg, rgba(0,0,0,0.20), transparent 95%);
      opacity: 0.32;
      z-index: -1;
    }

    a {
      color: var(--link);
      text-decoration: none;
      transition: color .15s ease, opacity .15s ease;
    }
    a:hover { color: var(--link-hover); }

    /* ===== Header ===== */
    body > header {
      background: var(--bg-header);
      border-bottom: 1px solid var(--border);
      padding: 14px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky; top: 0; z-index: 1000;
      backdrop-filter: saturate(1.1) blur(16px);
      box-shadow: 0 4px 18px rgba(32, 29, 24, 0.06);
    }

    .brand {
      display: flex; align-items: center; gap: 10px;
      font-weight: 600; font-size: 0.95rem; letter-spacing: .08em;
      color: var(--text-main);
      text-transform: uppercase;
    }
    .brand a { display:flex; align-items:center; gap:10px; color:inherit; text-decoration:none; }

    .brand-mark {
      width: 34px; height: 34px; border-radius: 10px;
      display:block; object-fit:contain;
      box-shadow: 0 0 0 1px rgba(248, 184, 88, 0.28), 0 4px 12px rgba(20, 31, 52, 0.16);
    }
    .brand-text { font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing:.025em; text-transform:none; }
    .brand-home { display:none; font-size:1.3rem; }

    nav { display: flex; align-items: center; gap: 6px; font-size: .95rem; }
    nav a {
      color: var(--text-muted);
      padding: 8px;
      position: relative;
      border-radius: 12px;
      border: 1px solid transparent;
      background: transparent;
      transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
    }
    nav a::after {
      content:""; position:absolute; inset:auto 8px 3px 8px; height:2px; width:auto;
      background: var(--grad-accent); transition: opacity .18s ease, transform .18s ease;
      border-radius: 999px;
      opacity: 0;
      transform: scaleX(.3);
    }
    nav a:hover { color: var(--text-main); border-color: var(--border); background: rgba(248, 184, 88, 0.10); transform: translateY(-1px); }
    nav a:hover::after { opacity: 1; transform: scaleX(1); }

    .nav-link {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: .88rem;
      font-weight: 700;
    }
    .header-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .primary-nav {
      display:flex;
      align-items:center;
      gap:3px;
      padding:4px;
      border:1px solid var(--border-soft);
      border-radius:14px;
      background:rgba(255,255,255,.78);
      box-shadow:0 6px 18px rgba(32,29,24,.05);
    }
    .primary-nav .nav-link {
      min-height:38px;
      padding:9px 13px;
      border:0;
      border-radius:10px;
      color:var(--text-muted);
      font-size:.77rem;
      letter-spacing:.01em;
    }
    .primary-nav .nav-link::after { display:none; }
    .primary-nav .nav-link:hover { border:0; background:#f5f1e9; transform:none; }
    .primary-nav .nav-link.is-active { background:var(--grad-accent); color:#fff; box-shadow:0 5px 13px rgba(23,36,62,.20); }
    .header-logout { min-height:38px; padding:9px 12px!important; border:1px solid var(--border-soft)!important; border-radius:10px!important; background:#fff!important; color:var(--text-muted)!important; font-size:.75rem!important; }
    .header-logout::after { display:none; }.header-logout:hover { color:var(--text-main)!important; background:#fff8ea!important; transform:none!important; }

    .nav-label { display: inline; }
    .logout-link {
      color: var(--text-main);
      font-weight: 600;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      border-radius: 12px;
      border: 1px solid transparent;
      transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    }
    .logout-link:hover { color: var(--text-main); background: rgba(248, 184, 88, 0.10); border-color: var(--border); }

    @media (max-width: 640px) {
      body > header {
        padding: 10px 16px;
        flex-wrap: nowrap;
        gap: 10px;
      }
      .brand {
        min-width: 0;
        flex: 1 1 auto;
      }
      .brand-mark {
        display:inline-flex;
        width: 30px;
        height: 30px;
        font-size: 0.74rem;
      }
      .brand-text {
        display:inline-flex;
        font-size:0.8rem;
        white-space: nowrap;
      }
      .brand-home { display:none; }
      .header-actions {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
        justify-content: flex-end;
        align-items: center;
        align-self: center;
      }
      .header-actions .nav-link {
        padding: 0;
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
      }
      .nav-link.home-link { display:none; }
      .header-actions .nav-label { display:none; }
      nav { display: none; }
      .header-logout { display:inline-flex!important; min-height:34px; padding:7px 10px!important; }
      .header-logout .nav-label { display:inline!important; }
    }
  
    /* ===== Layout ===== */
    .container {
      width: min(1080px, 100%);
      margin: 0 auto;
      padding: 18px 16px 28px;
      box-sizing: border-box;
    }

    /* ===== Cards ===== */
    .card {
      background: var(--grad-panel);
      border-radius: 18px;
      border: 1px solid var(--border-soft);
      padding: 18px;
      margin-bottom: 16px;
      box-shadow: var(--shadow-soft);
      position: relative;
      overflow: hidden;
      isolation: isolate;
      transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
    }
    .card::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: linear-gradient(135deg, rgba(248, 184, 88, 0.07), transparent 32%);
      opacity: 1;
    }
    .card::after {
      content:"";
      position:absolute;
      left:18px;
      right:18px;
      top:0;
      height:2px;
      border-radius:0 0 999px 999px;
      background:linear-gradient(90deg, transparent, rgba(248,184,88,.64), transparent);
      opacity:.45;
      pointer-events:none;
    }
    .card > * { position:relative; z-index:1; }
    @media (hover:hover) {
      .card:hover { transform:translateY(-2px); border-color:rgba(248,184,88,.48); box-shadow:0 18px 42px rgba(32,29,24,.12); }
    }
    .card h1, .card h2, .card h3, .card h4 { margin-top: 0; color: var(--text-main); }
    .section-title {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: .78rem;
      font-weight: 700;
      margin-bottom: 10px;
      color: var(--text-main);
      font-family: "DM Mono", monospace;
      letter-spacing: .12em;
      text-transform: uppercase;
    }
    .section-subtitle {
      margin: 0 0 14px;
      color: var(--text-muted);
      font-size: 0.9rem;
      line-height: 1.5;
    }
    .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 12px 18px;
      border-radius: 12px;
      font-weight: 700;
      font-size: 0.95rem;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      text-decoration: none;
      transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
    }
    .button-primary {
      background: var(--grad-accent);
      color: #fff;
      border: 1px solid rgba(255, 255, 255, 0.20);
      box-shadow: none;
    }
    .button-primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
    .button-secondary {
      background: #fff;
      color: var(--text-main);
      border: 1px solid var(--border);
      box-shadow: none;
    }
    .button-secondary:hover { background: #fff3ef; }
    .dashboard-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
      gap: 16px;
    }
    .card-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 16px;
    }
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 12px;
      margin-bottom: 16px;
    }
    .stat-card {
      border-radius: 16px;
      padding: 16px;
      background: #fff;
      border: 1px solid var(--border-soft);
      position:relative;
      overflow:hidden;
    }
    .stat-card::after { content:""; position:absolute; inset:auto 0 0; height:4px; background:linear-gradient(90deg, var(--accent), transparent); }
    .stat-card:nth-child(2n) { background:#fff; border-color:var(--border-soft); }
    .stat-card:nth-child(2n)::after { background:linear-gradient(90deg, var(--accent-2), transparent); }
    .stat-card:nth-child(3n) { background:#fff; border-color:var(--border-soft); }
    .stat-card:nth-child(3n)::after { background:linear-gradient(90deg, #fb923c, transparent); }
    .stat-card h3 {
      margin: 0 0 6px;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: .04em;
      color: var(--text-dim);
      text-transform: uppercase;
      opacity: .95;
    }
    .stat-card p {
      margin: 0;
      font-size: 1.45rem;
      font-weight: 700;
      color: var(--text-main);
      line-height: 1.1;
      font-family: "DM Mono", monospace;
    }
    .table-responsive {
      overflow-x: auto;
      margin: -8px 0 0;
      padding: 8px 0 0;
    }
    table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.95rem;
      min-width: 450px;
    }
    table th, table td {
      padding: 10px 12px;
      border-bottom: 1px solid rgba(108, 135, 175, 0.18);
      text-align: left;
    }
    table thead th {
      color: var(--text-main);
      text-transform: uppercase;
      letter-spacing: .08em;
      font-size: 0.78rem;
      font-family: "Orbitron", sans-serif;
      background:#f5f2ec;
    }
    table tbody tr { transition:background-color .14s ease; }
    table tbody tr:hover { background:#fff7f3; }
    .compact-table tbody tr:last-child td { border-bottom: none; }
    .muted { color: var(--text-muted); }

    @media (min-width: 641px) and (max-width: 860px) {
      .container {
        padding: 0 16px 20px;
      }
      .dashboard-grid,
      .card-grid {
        grid-template-columns: 1fr;
      }
      .card {
        padding: 16px;
      }
      body > header {
        flex-wrap: wrap;
        gap: 12px;
      }
      .header-actions {
        width: 100%;
        justify-content: flex-end;
      }
      nav { display: none; }
      .mobile-bottom-nav { display: flex; }
      .table-responsive { margin: 0; padding: 0; }
      table { min-width: auto; font-size: 0.9rem; }
      table th, table td { padding: 10px 8px; }
    }

    /* ===== Form ===== */
    label {
      display:block; font-size:.72rem; color:var(--text-muted); margin-bottom:6px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; font-family:"DM Mono", monospace;
    }

    input[type="text"], input[type="email"], input[type="password"],
    input[type="number"], input[type="date"], select, textarea {
      box-sizing:border-box; min-width:0; max-width:100%; width:100%; padding:10px 12px; font-size:.95rem;
      border-radius:12px; border:1px solid var(--border-soft); background:#fff; color:var(--text-main);
      transition: box-shadow .15s ease, border-color .15s ease, transform .02s, background-color .15s ease;
      font-family: inherit;
    }
    input[type="date"] { box-sizing:border-box !important; min-width:0 !important; max-width:100% !important; width:100% !important; }
    label:has(> input[type="date"]) { min-width:0; max-width:100%; }
    input::placeholder, textarea::placeholder {
      color: var(--text-dim);
    }
    input:focus, select:focus, textarea:focus {
      outline:none; border-color: var(--accent);
      box-shadow: var(--ring);
      background: #fff;
    }

    /* ===== Buttons ===== */
    button {
      cursor:pointer; padding:11px 16px; border-radius:12px;
      border:1px solid rgba(255,255,255,0.20); font-size:.95rem; font-weight:700;
      background: var(--grad-accent); color:#fff;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
      box-shadow: none;
    }
    button:hover { filter: brightness(1.03); transform: translateY(-1px); }
    button:active { transform: translateY(1px); }

    .btn-secondary {
      background:#fff; color:var(--text-main); border-color:var(--border-soft);
      box-shadow:none;
    }
    .btn-secondary:hover { background:#fff3ef; }

    .password-toggle {
      display:flex; align-items:center; gap:8px;
      font-size:0.85rem; color:var(--text-muted);
      margin-top:6px;
    }

    /* ===== Pied de page et pages d'information ===== */
    .site-footer {
      width: min(1080px, 100%);
      margin: 10px auto 0;
      padding: 18px 16px 30px;
      color: var(--text-muted);
      font-size: .82rem;
    }
    .site-footer-inner {
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:16px;
      padding-top:18px;
      border-top:1px solid var(--border-soft);
    }
    .site-footer-brand { color:var(--text-main); font-weight:700; }
    .site-footer-links { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px 18px; }
    .site-footer-links a { color:var(--text-muted); font-weight:600; }
    .site-footer-links a:hover { color:var(--accent-dark); }

    .info-page { max-width: 920px; margin: 8px auto 20px; }
    .info-hero { padding: 18px 2px 22px; }
    .info-eyebrow { margin:0 0 8px; color:var(--accent-dark); font:700 .74rem/1.35 "DM Mono", monospace; letter-spacing:.1em; text-transform:uppercase; }
    .info-hero h1 { margin:0; font-size:clamp(2rem, 5vw, 3.2rem); line-height:1.08; }
    .info-hero p:last-child { max-width:720px; margin:14px 0 0; color:var(--text-muted); font-size:1rem; line-height:1.7; }
    .info-card { background:var(--bg-card); border:1px solid var(--border-soft); border-radius:18px; padding:24px; margin-bottom:14px; }
    .info-card h2 { margin:0 0 12px; font-size:1.2rem; }
    .info-card h3 { margin:20px 0 8px; font-size:1rem; }
    .info-card p, .info-card li { color:var(--text-muted); line-height:1.7; }
    .info-card p:last-child { margin-bottom:0; }
    .info-card ul { margin:10px 0 0; padding-left:20px; }
    .info-card li + li { margin-top:7px; }
    .info-notice { padding:15px 17px; border-radius:14px; border:1px solid #efc8ba; background:#fff5f1; color:#733522; line-height:1.55; }
    .info-notice strong { color:#733522; }
    .glucose-discovery { margin:16px 0; padding:20px; border:1px solid #d9dfd2; border-radius:18px; background:linear-gradient(135deg,#fff 0%,#f2f7ef 100%); }
    .glucose-discovery h2,.glucose-discovery h3 { margin:0 0 7px; font-size:1.08rem; }
    .glucose-discovery p { margin:0; color:var(--text-muted); font-size:.82rem; line-height:1.6; }
    .glucose-discovery a { display:inline-block; margin-top:12px; padding:9px 12px; border-radius:10px; background:#54784f; color:#fff!important; font-size:.78rem; font-weight:800; }
    .info-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
    .info-grid .info-card { margin:0; }
    .help-step { display:flex; align-items:flex-start; gap:13px; }
    .help-step + .help-step { margin-top:18px; }
    .help-step-index { flex:0 0 29px; height:29px; display:grid; place-items:center; border-radius:50%; background:#fff0ea; color:var(--accent-dark); font:700 .76rem "DM Mono", monospace; }
    .help-step p { margin:2px 0 0; }
    .faq details { border-top:1px solid var(--border-soft); padding:2px 0; }
    .faq details:last-child { border-bottom:1px solid var(--border-soft); }
    .faq summary { padding:15px 0; cursor:pointer; color:var(--text-main); font-weight:700; }
    .faq details p { margin:0 0 15px; }
    .support-form { display:grid; gap:14px; }
    .support-form label { display:grid; gap:7px; color:var(--text-main); font-size:.88rem; font-weight:700; }
    .support-form input, .support-form select, .support-form textarea { width:100%; }
    .support-form textarea { min-height:155px; resize:vertical; }
    .support-form .form-row { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:14px; }
    .support-form button { justify-self:start; }
    .support-honeypot { position:absolute; left:-10000px; width:1px; height:1px; overflow:hidden; }

    @media (max-width: 640px) {
      .site-footer { padding-bottom:22px; }
      .site-footer-inner { align-items:flex-start; flex-direction:column; }
      .site-footer-links { justify-content:flex-start; gap:9px 16px; }
      .info-card { padding:19px; border-radius:15px; }
      .info-grid, .support-form .form-row { grid-template-columns:1fr; }
      .support-form button { width:100%; }
    }

    /* Petits badges/info chips (optionnel) */
    .chip {
      display:inline-flex; align-items:center; gap:8px;
      padding:6px 10px; border-radius:999px;
      background:#f1ede5; color:var(--text-main); font-weight:700; font-size:.72rem;
      border:1px solid #e0dbd1; letter-spacing:.08em; text-transform:uppercase; font-family:"DM Mono", monospace;
    }

    /* Accessibilité focus sur les liens et éléments cliquables */
    a:focus-visible, button:focus-visible, .chip:focus-visible {
      outline:none; box-shadow: var(--ring);
      border-radius: 10px;
    }

    /* ===== Navigation mobile bas de page ===== */
    .mobile-bottom-nav {
      display: none;
    }

    @media (max-width: 860px) {
      body { padding-top:calc(70px + env(safe-area-inset-top)); padding-bottom:0; }
      body > header.is-authenticated { display:none; }

      .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        top:max(8px, env(safe-area-inset-top));
        bottom:auto;
        display: flex;
        justify-content: stretch;
        align-items: center;
        gap:2px;
        padding:5px;
        background:rgba(255,255,255,.94);
        border:1px solid #ded8cd;
        border-radius:16px;
        box-shadow:0 10px 30px rgba(32,29,24,.15);
        backdrop-filter:blur(18px) saturate(1.15);
        z-index: 1001;
      }

      .mobile-bottom-nav a {
        color: var(--text-muted);
        text-decoration: none;
        display: inline-flex;
        flex:1 1 0;
        flex-direction:row;
        justify-content:center;
        align-items: center;
        min-width:0;
        min-height:48px;
        padding:9px 3px 7px;
        border-radius:11px;
        position:relative;
        transition:background-color .15s ease,color .15s ease;
      }

      .mobile-bottom-nav a::after { content:""; position:absolute; top:3px; left:50%; width:16px; height:3px; border-radius:999px; background:var(--accent); opacity:0; transform:translateX(-50%) scaleX(.4); transition:.16s ease; }
      .mobile-bottom-nav a:hover { color:var(--text-main); background:#faf6ef; }
      .mobile-bottom-nav a.is-active { background:#fff1eb; color:var(--accent-dark); }
      .mobile-bottom-nav a.is-active::after { opacity:1; transform:translateX(-50%) scaleX(1); }
      .mobile-bottom-nav .label { display:block; min-width:0; overflow:hidden; font-size:clamp(.57rem,2.6vw,.68rem); font-weight:800; letter-spacing:-.02em; text-overflow:ellipsis; white-space:nowrap; }
    }
  
    .leaflet-control-container,
    .leaflet-top,
    .leaflet-bottom,
    .leaflet-left,
    .leaflet-right,
    .leaflet-control {
      z-index: 0 !important;
    }
  