

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      /* Ocean palette — sécurité, confiance, voyage */
      --brand: #00B4D8;
      --brand-dark: #0096C7;
      --brand-light: #E0F7FC;
      --bg: #0A1628;
      --bg2: #0D1F3C;
      --surface: #112240;
      --surface2: #1A3050;
      --border: #1E3A5F;
      --border2: #274d7a;
      --text: #E8F4FD;
      --text2: #B8D4E8;
      --text3: #7A9CBD;
      --text4: #4A6A8A;
      --radius: 16px;
      --radius-sm: 10px;
      --radius-xs: 8px;
      --shadow: 0 2px 16px rgba(0,0,0,0.3);
      --shadow-md: 0 4px 24px rgba(0,0,0,0.4);
      --green: #00B4D8;
      --green-dark: #0096C7;
      --green-light: #0A2540;
      --green-text: #48CAE4;
      --red: #EF4444;
      --red-light: #1F1020;
      --red-text: #FCA5A5;
    }

    html, body { height: 100%; overflow: hidden; }

    body {
      font-family: -apple-system, 'SF Pro Display', BlinkMacSystemFont, 'Segoe UI', sans-serif;
      background: var(--bg2);
      color: var(--text);
      display: flex;
      flex-direction: column;
      max-width: 480px;
      margin: 0 auto;
      height: 100dvh;
    }

    /* ── SCREENS ── */
    .screen { display:none; position:fixed; inset:0; z-index:500; max-width:480px; margin:0 auto; background:var(--bg); flex-direction:column; overflow-y:auto; }
    #screen-pin { z-index:9999; display:none !important; }
    #screen-pin.pin-visible { display:flex !important; }
    .screen.active { display:flex; }

    /* ── AUTH ── */
    .auth-wrap { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2rem 1.5rem; background:var(--bg); }
    .auth-logo { font-size:32px; font-weight:800; color:var(--brand); letter-spacing:-1px; margin-bottom:8px; }
    .auth-tagline { font-size:15px; color:var(--text3); margin-bottom:2.5rem; text-align:center; font-weight:400; }
    .auth-card { width:100%; max-width:360px; }
    .auth-tabs { display:flex; gap:0; border-bottom:1.5px solid var(--border); margin-bottom:1.5rem; }
    .auth-tab { flex:1; text-align:center; padding:12px; font-size:14px; font-weight:600; color:var(--text3); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1.5px; transition:all .2s; }
    .auth-tab.active { color:var(--text); border-bottom-color:var(--text); }
    .field-label { font-size:12px; font-weight:600; color:var(--text3); margin-bottom:6px; letter-spacing:.02em; text-transform:uppercase; }
    .field-input { width:100%; padding:14px 16px; background:var(--bg); border:1.5px solid var(--border2); border-radius:var(--radius-sm); font-size:15px; color:var(--text); outline:none; margin-bottom:14px; transition:border-color .2s; }
    .field-input:focus { border-color:var(--text); }
    .btn-main { width:100%; padding:15px; background:var(--brand); color:white; border:none; border-radius:var(--radius-sm); font-size:16px; font-weight:600; cursor:pointer; margin-bottom:14px; transition:background .2s, transform .1s; letter-spacing:.01em; }
    .btn-main:hover { background:var(--brand-dark); }
    .btn-main:active { transform:scale(.98); }
    .btn-main:disabled { background:var(--border2); color:var(--text4); cursor:not-allowed; }
    .divider { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
    .divider-line { flex:1; height:1px; background:var(--border); }
    .divider-text { font-size:13px; color:var(--text3); font-weight:500; }
    .btn-google { width:100%; padding:14px; background:var(--bg); border:1.5px solid var(--border2); border-radius:var(--radius-sm); font-size:15px; font-weight:500; color:var(--text); cursor:pointer; display:flex; align-items:center; justify-content:center; gap:10px; transition:border-color .2s; }
    .btn-google:hover { border-color:var(--text3); }
    .google-icon { width:20px; height:20px; flex-shrink:0; }
    .auth-error { background:var(--red-light); color:var(--red-text); padding:12px 14px; border-radius:var(--radius-xs); font-size:13px; margin-bottom:14px; display:none; }
    .auth-error.show { display:block; }
    .auth-loading { text-align:center; color:var(--text3); font-size:14px; padding:1rem; }

    /* ── LOCK SCREEN ── */
    .lock-wrap { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2rem; background:var(--bg); }
    .lock-logo { font-size:24px; font-weight:800; color:var(--brand); margin-bottom:2rem; letter-spacing:-0.5px; }
    .lock-avatar { width:72px; height:72px; border-radius:50%; background:var(--brand-light); display:flex; align-items:center; justify-content:center; font-size:28px; font-weight:700; color:var(--brand); margin-bottom:12px; }
    .lock-user { font-size:16px; font-weight:600; color:var(--text); margin-bottom:4px; }
    .lock-sub { font-size:14px; color:var(--text3); margin-bottom:2.5rem; text-align:center; }
    .lock-icon-wrap { width:80px; height:80px; border-radius:50%; background:var(--brand-light); display:flex; align-items:center; justify-content:center; margin-bottom:1.5rem; }
    .lock-icon { width:40px; height:40px; color:var(--brand); }
    .btn-biometric { width:100%; max-width:300px; padding:15px; background:var(--brand); color:white; border:none; border-radius:var(--radius-sm); font-size:16px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:12px; transition:background .2s; }
    .btn-biometric:hover { background:var(--brand-dark); }
    .btn-pin { width:100%; max-width:300px; padding:13px; background:transparent; border:1.5px solid var(--border2); border-radius:var(--radius-sm); color:var(--text2); font-size:14px; font-weight:500; cursor:pointer; margin-bottom:12px; transition:border-color .2s; }
    .btn-pin:hover { border-color:var(--text3); }
    .btn-logout { background:none; border:none; color:var(--text3); font-size:13px; cursor:pointer; padding:6px; }
    .lock-error { margin-top:12px; padding:10px 16px; background:var(--red-light); color:var(--red-text); border-radius:var(--radius-xs); font-size:13px; text-align:center; display:none; max-width:300px; }
    .lock-error.show { display:block; }

    /* ── PIN ── */
    .pin-wrap { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:2rem; background:var(--bg); }
    .pin-title { font-size:20px; font-weight:700; margin-bottom:1.5rem; text-align:center; color:var(--text); }
    .pin-dots { display:flex; gap:14px; margin-bottom:2rem; }
    .pin-dot { width:14px; height:14px; border-radius:50%; border:2px solid var(--border2); background:transparent; transition:all .15s; }
    .pin-dot.filled { background:var(--brand); border-color:var(--brand); }
    .pin-pad { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; width:100%; max-width:260px; }
    .pin-key { aspect-ratio:1; background:var(--surface2); border:none; border-radius:50%; font-size:22px; font-weight:500; color:var(--text); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .1s; }
    .pin-key:active { background:var(--border2); }
    .pin-key.empty { background:transparent; cursor:default; }
    .pin-error { font-size:13px; color:var(--red); margin-top:12px; min-height:20px; text-align:center; }
    .btn-back { margin-top:16px; background:none; border:none; color:var(--text3); font-size:14px; cursor:pointer; font-weight:500; }

    /* ── HEADER ── */
    .header { position:fixed; top:0; left:0; right:0; max-width:480px; margin:0 auto; background:var(--bg); padding:env(safe-area-inset-top,12px) 20px 12px; border-bottom:1px solid var(--border); z-index:700; }
    .header-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:0; }
    .header--with-tabs .header-row { margin-bottom:14px; }
    .logo { font-size:22px; font-weight:800; color:var(--brand); letter-spacing:-0.5px; }
    .header-right { display:flex; align-items:center; gap:10px; }
    .badge-status { font-size:11px; padding:4px 10px; border-radius:99px; background:var(--brand-light); color:var(--brand); font-weight:600; }
    /* Pastille "en attente de synchro" sur le badge offline quand des données attendent */
    body.has-pending-sync #online-badge::after { content:'⟳'; margin-left:4px; font-size:10px; animation:spin .8s linear infinite; display:inline-block; }
    @keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
    .search-wrap { position:relative; }
    .search-wrap svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:16px; height:16px; color:var(--text3); }
    .search { width:100%; padding:11px 14px 11px 40px; background:var(--surface2); border:1px solid var(--border); border-radius:99px; font-size:15px; color:var(--text); outline:none; }
    .search::placeholder { color:var(--text4); }
    .search:focus { border-color:var(--text3); background:var(--bg); }

    /* ── DOC TABS ── */
    .doc-tabs { display:flex; background:var(--bg); border-bottom:1px solid var(--border); overflow-x:auto; scrollbar-width:none; flex-shrink:0; padding:0 8px; }
    .doc-tabs::-webkit-scrollbar { display:none; }
    .doc-tab { flex-shrink:0; padding:12px 14px; font-size:13px; font-weight:500; color:var(--text3); cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; transition:all .2s; }
    .doc-tab.active { color:var(--text); border-bottom-color:var(--text); font-weight:600; }

    /* ── SECURITY BADGE ── */
    .security-badge { display:inline-flex; align-items:center; gap:6px; font-size:11px; color:var(--text3); background:var(--surface2); padding:6px 14px; border-radius:99px; margin:12px 20px 0; flex-shrink:0; align-self:flex-start; cursor:pointer; border:1px solid var(--border); font-weight:500; }

    /* ── STATS BAR (supprimée) ── */
    .stats-bar { display:none; }
    .stat-card, .stat-num, .stat-label { display:none; }

    /* Badge compteur dans les onglets */
    .doc-tab-count { display:none; align-items:center; justify-content:center; min-width:16px; height:16px; padding:0 4px; background:var(--surface2); border-radius:99px; font-size:10px; font-weight:700; color:var(--text3); margin-left:5px; transition:all .2s; }
    .doc-tab-count:not(:empty) { display:inline-flex; }
    .doc-tab.active .doc-tab-count { background:var(--text); color:var(--bg); }

    /* ── CONTENT ── */
    .content { flex:1; overflow-y:auto; padding:0 20px 160px; -webkit-overflow-scrolling:touch; background:var(--bg); }
    .section-label { font-size:11px; font-weight:700; color:var(--text3); text-transform:uppercase; letter-spacing:.08em; padding:20px 0 10px; }

    /* ── DOC CARDS ── */
    .doc-card { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:16px; display:flex; align-items:center; gap:14px; margin-bottom:10px; cursor:pointer; transition:box-shadow .2s, transform .1s; }
    .doc-card:hover { box-shadow:var(--shadow); }
    .doc-card:active { transform:scale(.99); }
    .doc-icon { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; flex-shrink:0; }
    .doc-info { flex:1; min-width:0; }
    .doc-name { font-size:15px; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .doc-meta { font-size:12px; color:var(--text3); margin-top:3px; font-weight:400; }
    .doc-actions { display:flex; flex-direction:column; gap:5px; align-items:flex-end; }
    .doc-status { font-size:11px; padding:3px 9px; border-radius:99px; font-weight:600; white-space:nowrap; }
    .s-local { background:var(--brand-light); color:var(--brand); }
    .s-cloud { background:#EFF6FF; color:#1D4ED8; }
    .delete-btn { background:none; border:none; color:var(--text4); cursor:pointer; font-size:16px; padding:2px; transition:color .15s; }
    .delete-btn:hover { color:var(--red); }

    /* ── EMPTY STATE ── */
    .empty-state { text-align:center; padding:4rem 1rem; color:var(--text3); }
    .empty-icon { font-size:52px; margin-bottom:14px; }
    .empty-title { font-size:18px; font-weight:600; color:var(--text2); margin-bottom:8px; }
    .empty-sub { font-size:14px; line-height:1.6; }

    /* ── FAB ── */
    .fab { position:fixed; bottom:calc(env(safe-area-inset-bottom,0px) + 76px); right:50%; transform:translateX(50%); max-width:440px; width:calc(100% - 40px); padding:16px; background:var(--brand); color:white; border:none; border-radius:var(--radius); font-size:16px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:8px; box-shadow:0 4px 20px rgba(255,56,92,.35); transition:background .2s, transform .1s; }
    .fab:hover { background:var(--brand-dark); }
    .fab:active { transform:translateX(50%) scale(.98); }

    /* ── BOTTOM NAV ── */
    .bottom-nav { position:fixed; bottom:0; left:0; right:0; width:100%; max-width:480px; margin:0 auto; background:var(--bg); border-top:1px solid var(--border); display:none; z-index:700; padding-bottom:env(safe-area-inset-bottom,0px); }
    .nav-item { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:10px 6px 8px; cursor:pointer; color:var(--text4); font-size:10px; font-weight:600; gap:4px; letter-spacing:.03em; text-transform:uppercase; transition:color .15s; }
    .nav-item.active { color:var(--brand); }
    .nav-item svg { transition:stroke .15s; }
    .nav-item.active svg { stroke:var(--brand); }

    /* New-content badge dot on nav items */
    .nav-badge { position:absolute; top:6px; right:calc(50% - 14px); width:8px; height:8px; background:#ef4444; border-radius:50%; border:1.5px solid var(--bg); display:none; }
    .nav-item { position:relative; }
    .nav-item.has-badge .nav-badge { display:block; }

    /* ── MODALS ── */
    .modal-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:600; align-items:flex-end; max-width:480px; margin:0 auto; backdrop-filter:blur(4px); }
    .modal-backdrop.open { display:flex; animation:fadeIn .2s; }
    @keyframes fadeIn { from{opacity:0} to{opacity:1} }
    .modal { background:var(--bg); border-radius:24px 24px 0 0; padding:12px 20px calc(env(safe-area-inset-bottom,0px) + 90px); width:100%; animation:slideUp .25s cubic-bezier(.32,.72,0,1); max-height:90vh; overflow-y:auto; position:relative; }
    body.has-guest-banner .modal { padding-bottom:calc(env(safe-area-inset-bottom,0px) + 140px); }
    body.has-guest-banner .sante-modal { padding-bottom:calc(env(safe-area-inset-bottom,0px) + 140px) !important; }
    body.has-guest-banner .content { padding-bottom:204px; }
    body.has-guest-banner .fab { bottom:calc(env(safe-area-inset-bottom,0px) + 140px); }
    body.has-guest-banner #section-travel { bottom:100px; }
    body.has-guest-banner #travel-content { padding-bottom:20px; }
    body.has-guest-banner #modal-etape-detail > div > div:last-child { padding-bottom:calc(env(safe-area-inset-bottom,0px) + 130px) !important; }
    body.has-guest-banner #modal-etape-edit > div { padding-bottom:calc(env(safe-area-inset-bottom,0px) + 80px) !important; }
    body.has-guest-banner [id^="modal-"] > div[style*="safe-area"] { padding-bottom:calc(env(safe-area-inset-bottom,0px) + 80px) !important; }
    body.has-guest-banner #add-etape-modal > div { padding-bottom:calc(env(safe-area-inset-bottom,0px) + 80px) !important; }
    body.has-guest-banner #country-content { padding-bottom:70px; }
    .modal-close-btn { position:absolute; top:16px; right:16px; width:28px; height:28px; background:var(--surface2); border:none; border-radius:50%; font-size:14px; color:var(--text3); cursor:pointer; display:flex; align-items:center; justify-content:center; z-index:10; line-height:1; }
    @keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
    .modal-handle { width:40px; height:4px; background:var(--border2); border-radius:2px; margin:0 auto 18px; }
    .modal-title { font-size:20px; font-weight:700; margin-bottom:20px; color:var(--text); }
    .cat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-bottom:16px; }
    .cat-btn { padding:10px 6px; background:var(--surface2); border:1.5px solid var(--border); border-radius:var(--radius-sm); text-align:center; cursor:pointer; font-size:11px; font-weight:500; color:var(--text2); transition:all .15s; }
    .cat-btn:hover { border-color:var(--text3); }
    .cat-btn.selected { background:var(--brand-light); border-color:var(--brand); color:var(--brand); font-weight:600; }
    .cat-icon { font-size:20px; display:block; margin-bottom:4px; }
    .upload-zone { border:1.5px dashed var(--border2); border-radius:var(--radius-sm); padding:22px; text-align:center; cursor:pointer; color:var(--text3); font-size:14px; margin-bottom:16px; transition:all .15s; }
    .upload-zone:hover { border-color:var(--brand); color:var(--brand); background:var(--brand-light); }
    .upload-zone.has-file { border-color:var(--brand); color:var(--brand); background:var(--brand-light); }
    .upload-icon { font-size:28px; margin-bottom:8px; }
    .upload-hint { font-size:11px; color:var(--text4); margin-top:5px; }
    .btn-cancel { width:100%; padding:14px; background:transparent; border:1.5px solid var(--border); border-radius:var(--radius-sm); color:var(--text2); font-size:15px; font-weight:500; cursor:pointer; transition:border-color .15s; }
    .btn-cancel:hover { border-color:var(--text3); }

    /* ── VIEWER ── */
    .viewer { display:none; position:fixed; inset:0; background:rgba(0,0,0,.95); z-index:800; flex-direction:column; max-width:480px; margin:0 auto; }
    .viewer.open { display:flex; }
    .viewer-header { display:flex; align-items:center; gap:12px; padding:16px 20px; color:white; }
    .viewer-title { font-size:16px; font-weight:600; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .viewer-close { background:rgba(255,255,255,.15); border:none; color:white; font-size:18px; cursor:pointer; padding:8px; border-radius:50%; width:36px; height:36px; display:flex; align-items:center; justify-content:center; }
    .viewer-body { flex:1; display:flex; align-items:center; justify-content:center; padding:20px; }
    .viewer-img { max-width:100%; max-height:100%; border-radius:12px; object-fit:contain; }

    /* ── SECTIONS (travel/sante/country) ── */
    #section-travel, #section-sante, #section-country { z-index:600 !important; }

    /* ── TRAVEL TABS ── */
    .travel-tabs { display:flex; background:var(--bg); border-bottom:1px solid var(--border); overflow-x:auto; scrollbar-width:none; flex-shrink:0; padding:0 8px; }
    .travel-tabs::-webkit-scrollbar { display:none; }
    .travel-tab { flex-shrink:0; padding:12px 16px; font-size:13px; font-weight:500; color:var(--text3); cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; transition:all .2s; }
    .travel-tab.active { color:var(--text); border-bottom-color:var(--text); font-weight:600; }

    /* ── SANTÉ ── */
    .sante-wrap { padding:16px 0 100px; }
    .sante-section { margin-bottom:24px; }
    .sante-section-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
    .sante-section-title { font-size:11px; font-weight:700; color:var(--text3); text-transform:uppercase; letter-spacing:.08em; }
    .btn-add-small { background:var(--brand); color:white; border:none; border-radius:99px; padding:6px 14px; font-size:12px; font-weight:600; cursor:pointer; }
    .sante-card { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:14px 16px; margin-bottom:8px; }
    .sante-card-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:6px; }
    .sante-card-title { font-size:15px; font-weight:600; color:var(--text); }
    .sante-card-delete { background:none; border:none; color:var(--text4); cursor:pointer; font-size:16px; }
    .btn-icon { background:none; border:none; cursor:pointer; color:var(--text4); padding:6px; border-radius:8px; display:flex; align-items:center; justify-content:center; transition:background .15s, color .15s; flex-shrink:0; }
    .btn-icon:hover { background:var(--surface2); color:var(--text2); }
    .btn-icon.edit:hover { color:var(--brand); }
    .btn-icon.del:hover { background:var(--red-light); color:var(--red-text); }
    .autre-ass-type-btn { padding:12px 8px; background:var(--surface2); border:1.5px solid var(--border); border-radius:var(--radius-sm); cursor:pointer; color:var(--text2); text-align:center; transition:all .15s; }
    .autre-ass-type-btn:hover { border-color:var(--text3); }
    .autre-ass-type-btn.selected { background:var(--brand-light); border-color:var(--brand); color:var(--brand); }
    .sante-card-row { font-size:12px; color:var(--text3); margin-bottom:3px; display:flex; gap:6px; }
    .sante-card-row span { color:var(--text2); }
    .rappel-badge { font-size:11px; padding:3px 9px; border-radius:99px; font-weight:600; margin-top:6px; display:inline-block; }
    .rappel-urgent { background:var(--red-light); color:var(--red-text); }
    .rappel-soon { background:#FFF7ED; color:#92400E; }
    .rappel-ok { background:var(--brand-light); color:var(--brand); }
    .urgence-card { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:16px; margin-bottom:8px; }
    .urgence-pays { font-size:16px; font-weight:700; color:var(--text); margin-bottom:10px; }
    .urgence-nums { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
    .urgence-num { background:var(--surface2); border-radius:var(--radius-xs); padding:10px 12px; }
    .urgence-label { font-size:11px; color:var(--text3); font-weight:500; }
    .urgence-val { font-size:18px; font-weight:800; color:var(--red); margin-top:2px; }
    .profil-sante { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:16px; }
    .profil-row { display:flex; gap:12px; margin-bottom:12px; }
    .profil-field { flex:1; }
    .profil-label { font-size:11px; font-weight:600; color:var(--text3); margin-bottom:5px; text-transform:uppercase; letter-spacing:.05em; }
    .profil-input { width:100%; padding:10px 12px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-xs); font-size:14px; color:var(--text); outline:none; transition:border-color .2s; }
    .profil-input:focus { border-color:var(--text3); }
    .profil-save { background:var(--brand); color:white; border:none; border-radius:var(--radius-xs); padding:11px 20px; font-size:14px; font-weight:600; cursor:pointer; margin-top:10px; }
    .alert-rappel { background:#FFF7ED; border:1px solid #FED7AA; border-radius:var(--radius); padding:14px 16px; margin-bottom:12px; font-size:13px; color:#92400E; line-height:1.5; }
    .sante-modal { background:var(--bg); border-radius:24px 24px 0 0; padding:12px 20px calc(env(safe-area-inset-bottom,0px) + 28px); width:100%; animation:slideUp .25s cubic-bezier(.32,.72,0,1); max-height:90vh; overflow-y:auto; }
    .sante-field-group { margin-bottom:14px; }
    .dates-list { display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
    .date-item { display:flex; align-items:center; gap:8px; }
    .date-item input { flex:1; padding:9px 12px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-xs); font-size:14px; color:var(--text); outline:none; }
    .date-item button { background:none; border:none; color:var(--text3); cursor:pointer; font-size:18px; }
    .btn-add-date { background:none; border:1px dashed var(--border2); border-radius:var(--radius-xs); padding:8px; font-size:13px; color:var(--text3); cursor:pointer; width:100%; margin-bottom:8px; }

    /* ── ITINÉRAIRE ── */
    .etape-card { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:16px; margin-bottom:10px; transition:box-shadow .2s; }
    .etape-card:hover { box-shadow:var(--shadow); }
    .etape-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
    .etape-ville { font-size:17px; font-weight:700; color:var(--text); }
    .etape-dates { font-size:12px; color:var(--text3); margin-top:2px; }
    .etape-detail { font-size:13px; color:var(--text2); margin-bottom:4px; }
    .etape-delete { background:none; border:none; color:var(--text4); cursor:pointer; font-size:16px; }

    /* ── CHECKLIST ── */
    .check-category { margin-bottom:20px; }
    .check-category-title { font-size:11px; font-weight:700; color:var(--text3); text-transform:uppercase; letter-spacing:.08em; margin-bottom:10px; }
    .check-item { display:flex; align-items:center; gap:14px; padding:12px 16px; background:var(--surface); border-radius:var(--radius-sm); border:1px solid var(--border); margin-bottom:6px; cursor:pointer; transition:all .15s; }
    .check-item:hover { border-color:var(--text3); }
    .check-item.done .check-label { text-decoration:line-through; color:var(--text4); }
    .check-box { width:22px; height:22px; border-radius:6px; border:1.5px solid var(--border2); display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:all .15s; }
    .check-box.checked { background:var(--brand); border-color:var(--brand); }
    .check-label { font-size:14px; color:var(--text); flex:1; font-weight:500; }
    .check-add { display:flex; gap:8px; margin-top:10px; }
    .check-add input { flex:1; padding:10px 14px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-sm); font-size:14px; color:var(--text); outline:none; }
    .check-add button { padding:10px 16px; background:var(--brand); color:white; border:none; border-radius:var(--radius-sm); font-size:13px; font-weight:600; cursor:pointer; }

    /* ── BUDGET ── */
    .budget-total { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:20px; margin-bottom:16px; text-align:center; }
    .budget-bar { height:6px; background:var(--surface2); border-radius:3px; margin-top:12px; overflow:hidden; }
    .budget-bar-fill { height:100%; background:var(--brand); border-radius:3px; transition:width .3s; }
    .budget-bar-fill.over { background:var(--red); }
    .depense-card { background:var(--surface); border-radius:var(--radius-sm); border:1px solid var(--border); padding:14px 16px; display:flex; align-items:center; gap:12px; margin-bottom:8px; transition:box-shadow .2s; }
    .depense-card:hover { box-shadow:var(--shadow); }
    .depense-cat { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
    .depense-info { flex:1; }
    .depense-nom { font-size:14px; font-weight:600; color:var(--text); }
    .depense-date { font-size:11px; color:var(--text3); margin-top:2px; }
    .depense-montant { font-size:16px; font-weight:700; color:var(--text); }
    .depense-delete { background:none; border:none; color:var(--text4); cursor:pointer; font-size:16px; }

    /* ── CALENDRIER ── */
    .cal-wrap { padding:0; }
    .cal-toggle { display:flex; gap:8px; margin-bottom:16px; }
    .cal-toggle-btn { flex:1; padding:10px; border:1.5px solid var(--border); border-radius:var(--radius-sm); background:var(--surface2); color:var(--text2); font-size:13px; font-weight:600; cursor:pointer; transition:all .15s; }
    .cal-toggle-btn.active { background:var(--text); color:var(--bg); border-color:var(--text); }
    .cal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
    .cal-nav { background:none; border:1px solid var(--border); border-radius:50%; width:32px; height:32px; font-size:16px; color:var(--text2); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:border-color .15s; }
    .cal-nav:hover { border-color:var(--text3); }
    .cal-month { font-size:17px; font-weight:700; color:var(--text); }
    .cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
    .cal-day-name { font-size:11px; font-weight:600; color:var(--text3); text-align:center; padding:4px 0; }
    .cal-day { min-height:36px; border-radius:8px; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:4px 2px; }
    .cal-day.today .cal-day-num { background:var(--brand); color:white; border-radius:50%; width:26px; height:26px; display:flex; align-items:center; justify-content:center; }
    .cal-day.has-event { background: none; }
    .cal-day.in-range { background: none; }
    .cal-day-num { font-size:13px; color:var(--text); width:26px; height:26px; display:flex; align-items:center; justify-content:center; }
    .cal-day.other-month .cal-day-num { color:var(--text4); }
    .cal-dot { width:6px; height:6px; border-radius:50%; margin-top:2px; flex-shrink:0; }
    .cal-dot.cat-logement  { background:#378ADD; }
    .cal-dot.cat-transport { background:#7F77DD; }
    .cal-dot.cat-activite  { background:#1D9E75; }
    .cal-dot.cat-restaurant{ background:#EF9F27; }
    .cal-dot.cat-autre     { background:#D4537E; }
    .cal-dots-row { display:flex; gap:2px; justify-content:center; margin-top:2px; flex-wrap:wrap; max-width:26px; }
    .cal-legend { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }
    .cal-legend-item { display:flex; align-items:center; gap:5px; font-size:11px; color:var(--text3); font-weight:500; }
    .cal-legend-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
    .timeline { display:flex; flex-direction:column; gap:0; }
    .timeline-item { display:flex; gap:14px; padding-bottom:20px; }
    .timeline-reminder { display:flex; gap:10px; padding-bottom:10px; align-items:flex-start; }
    .timeline-reminder-dot { width:22px; height:22px; border-radius:50%; background:var(--surface2); border:1.5px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:11px; flex-shrink:0; }
    .timeline-reminder-label { font-size:12px; font-weight:600; color:var(--text3); }
    .timeline-reminder-date { font-size:11px; color:var(--text4); }
    .timeline-reminder-details { display:none; font-size:11px; color:var(--text4); margin-top:4px; line-height:1.5; background:var(--surface2); border-radius:6px; padding:6px 8px; }
    .timeline-item:last-child { padding-bottom:0; }
    .timeline-left { display:flex; flex-direction:column; align-items:center; width:36px; flex-shrink:0; }
    .timeline-dot { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
    .timeline-line { flex:1; width:2px; background:var(--border); margin-top:4px; }
    .timeline-content { flex:1; padding-top:6px; }
    .timeline-date { font-size:11px; font-weight:600; color:var(--text3); text-transform:uppercase; letter-spacing:.05em; margin-bottom:4px; }
    .timeline-title { font-size:16px; font-weight:700; color:var(--text); margin-bottom:2px; }
    .timeline-sub { font-size:13px; color:var(--text2); }

    /* ── CARTE ── */
    #travel-map { width:100%; height:320px; border-radius:var(--radius); overflow:hidden; border:1px solid var(--border); }
    .map-etape-list { display:flex; flex-direction:column; margin-top:8px; position:relative; }
    .map-etape-item { display:flex; align-items:center; gap:12px; background:var(--surface); border-radius:var(--radius-sm); border:1px solid var(--border); padding:12px 14px; }
    .map-etape-num { width:28px; height:28px; border-radius:50%; background:var(--brand); color:white; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
    .map-etape-info { flex:1; }
    .map-etape-ville { font-size:14px; font-weight:600; color:var(--text); }
    .map-etape-dates { font-size:11px; color:var(--text3); margin-top:2px; }
    .map-empty { text-align:center; padding:3rem 1rem; color:var(--text3); font-size:14px; }

    /* ── COUNTRY INFO ── */
    .ci-selectors { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); padding:16px; margin-bottom:16px; box-shadow:var(--shadow); }
    .ci-sel-label { font-size:11px; font-weight:700; color:var(--text3); margin-bottom:6px; text-transform:uppercase; letter-spacing:.05em; }
    .ci-select { width:100%; padding:12px 14px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-xs); font-size:14px; color:var(--text); outline:none; cursor:pointer; -webkit-appearance:none; }
    .ci-select:focus { border-color:var(--text3); }
    .ci-card { background:var(--surface); border-radius:var(--radius); border:1px solid var(--border); margin-bottom:10px; overflow:hidden; }
    .ci-card-header { padding:14px 16px; display:flex; align-items:center; gap:12px; cursor:pointer; transition:background .15s; }
    .ci-card-header:hover { background:var(--surface2); }
    .ci-card-icon { font-size:20px; flex-shrink:0; }
    .ci-card-title { font-size:13px; font-weight:600; color:var(--text); flex:1; }
    .ci-card-arrow { font-size:14px; color:var(--text3); transition:transform .2s; }
    .ci-card-arrow.open { transform:rotate(90deg); }
    .ci-card-body { padding:0 16px 14px; display:none; font-size:14px; color:var(--text2); line-height:1.65; }
    .ci-card-body.open { display:block; }
    .ci-badge { display:inline-block; padding:4px 10px; border-radius:99px; font-size:11px; font-weight:600; margin-bottom:0; }
    .ci-badge.green { background:var(--brand-light); color:var(--brand); }
    .ci-badge.orange { background:#FFF7ED; color:#92400E; }
    .ci-badge.red { background:var(--red-light); color:var(--red-text); }
    .ci-badge.gray { background:var(--surface2); color:var(--text2); }
    .ci-link { display:flex; align-items:center; gap:10px; padding:11px 13px; background:var(--surface2); border-radius:var(--radius-xs); margin-bottom:6px; text-decoration:none; color:var(--text); font-size:13px; font-weight:500; transition:background .15s; }
    .ci-link:hover { background:var(--border); }
    .ci-link-icon { font-size:16px; }
    .ci-link-arrow { margin-left:auto; color:var(--text3); }
    .ci-warn { background:#FFF7ED; border:1px solid #FED7AA; border-radius:var(--radius-sm); padding:12px 14px; font-size:12px; color:#92400E; margin-bottom:14px; line-height:1.55; }
    .ci-row { display:flex; justify-content:space-between; align-items:center; padding:8px 0; border-bottom:1px solid var(--border); }
    .ci-row:last-child { border-bottom:none; }
    .ci-row-label { font-size:13px; color:var(--text3); font-weight:500; }
    .ci-row-val { font-size:13px; font-weight:600; color:var(--text); }


    /* ── CONTACTS ── */
    .contact-row { display:flex; align-items:center; gap:12px; padding:13px 16px; background:var(--surface); border-radius:var(--radius-sm); border:1px solid var(--border); margin-bottom:8px; cursor:pointer; transition:border-color .15s; }
    .contact-row:active { border-color:var(--text3); }
    .contact-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
    .contact-name { font-size:15px; font-weight:600; color:var(--text); flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .contact-quick-actions { display:flex; gap:2px; flex-shrink:0; }
    .contact-quick-btn { width:34px; height:34px; border-radius:8px; border:none; background:none; display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--text3); transition:background .15s; }
    .contact-quick-btn:hover { background:var(--surface2); }
    .contact-quick-btn:active { background:var(--border); }
    .contacts-empty { text-align:center; padding:4rem 1rem; color:var(--text3); }
    /* detail modal rows */
    .cdet-row { display:flex; align-items:flex-start; gap:12px; padding:11px 0; border-bottom:1px solid var(--border); }
    .cdet-row:last-child { border-bottom:none; }
    .cdet-icon { width:20px; text-align:center; flex-shrink:0; margin-top:1px; }
    .cdet-label { font-size:11px; color:var(--text3); font-weight:600; text-transform:uppercase; letter-spacing:.05em; margin-bottom:2px; }
    .cdet-val { font-size:14px; color:var(--text); font-weight:500; line-height:1.45; }


    /* ── ONBOARDING ── */
    /* Onboarding — bottom sheet */
    .onboarding-screen {
      position:fixed; inset:0; z-index:1000; display:none;
      align-items:flex-end; justify-content:center;
      background:rgba(0,0,0,.45); backdrop-filter:blur(4px);
    }
    .onboarding-screen.active { display:flex; animation:fadeIn .2s; }
    .ob-sheet {
      background:var(--bg); border-radius:24px 24px 0 0;
      width:100%; max-width:480px;
      max-height:88vh; overflow-y:auto;
      padding:0 20px calc(env(safe-area-inset-bottom,0px) + 24px);
      animation:slideUp .28s cubic-bezier(.32,.72,0,1);
      position:relative;
      transition:transform .25s cubic-bezier(.32,.72,0,1);
    }

    .ob-slides { overflow:hidden; position:relative; height:420px; }
    .ob-slide {
      position:absolute; inset:0;
      display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
      padding:1.5rem 0.5rem 1rem;
      opacity:0; transform:translateX(40px);
      transition:opacity .4s ease, transform .4s ease;
      pointer-events:none;
    }
    .ob-slide.active { opacity:1; transform:translateX(0); pointer-events:all; }
    .ob-slide.exit { opacity:0; transform:translateX(-40px); }

    .ob-emoji { font-size:56px; margin-bottom:1rem; line-height:1; }
    .ob-title {
      font-size:22px; font-weight:800; color:var(--text);
      text-align:center; margin-bottom:10px; letter-spacing:-0.5px; line-height:1.2;
    }
    .ob-title span { color:var(--brand); }
    .ob-desc {
      font-size:14px; color:var(--text3); text-align:center;
      line-height:1.6; max-width:300px;
    }
    .ob-features {
      margin-top:1rem; display:flex; flex-direction:column; gap:8px; width:100%;
    }
    .ob-feature {
      display:flex; align-items:center; gap:12px;
      background:var(--surface2); border-radius:var(--radius-sm);
      padding:10px 14px; border:1px solid var(--border);
    }
    .ob-feature-icon { font-size:20px; flex-shrink:0; }
    .ob-feature-text { flex:1; }
    .ob-feature-title { font-size:13px; font-weight:700; color:var(--text); }
    .ob-feature-sub { font-size:11px; color:var(--text3); margin-top:1px; }

    .ob-bottom {
      padding:0.5rem 0 0;
      display:flex; flex-direction:column; gap:10px; align-items:center;
    }
    .ob-dots { display:flex; gap:8px; }
    .ob-dot {
      width:8px; height:8px; border-radius:99px;
      background:var(--border2); transition:all .3s;
    }
    .ob-dot.active { background:var(--brand); width:24px; }

    .ob-btn-next {
      width:100%; padding:14px; background:var(--brand); color:white;
      border:none; border-radius:var(--radius); font-size:15px; font-weight:700;
      cursor:pointer; transition:background .2s, transform .1s; letter-spacing:.01em;
    }
    .ob-btn-next:hover { background:var(--brand-dark); }
    .ob-btn-next:active { transform:scale(.98); }
    .ob-btn-skip {
      background:none; border:none; color:var(--text3); font-size:14px;
      cursor:pointer; padding:4px; font-weight:500;
    }
    .ob-logo { display:none; }

    .info-btn {
      width:22px; height:22px; border-radius:50%;
      border:1.5px solid var(--border2); background:none;
      display:flex; align-items:center; justify-content:center;
      cursor:pointer; color:var(--text3); font-size:12px;
      font-weight:700; flex-shrink:0; transition:all .15s; line-height:1;
      font-style:italic;
    }
    .info-btn:hover { border-color:var(--text); color:var(--text); }

    .import-tab {
      flex:1; padding:9px 8px; border:1px solid var(--border);
      border-radius:var(--radius-sm); background:var(--surface2);
      font-size:12px; font-weight:600; color:var(--text3);
      cursor:pointer; transition:all .15s; text-align:center;
    }
    .import-tab.active { background:var(--text); color:var(--bg); border-color:var(--text); }

    /* ── PROFIL SPINNER ── */
    .profil-spinner { display:inline-block; width:14px; height:14px; border:2px solid var(--border2); border-top-color:var(--brand); border-radius:50%; animation:spin .7s linear infinite; flex-shrink:0; }
    @keyframes spin { to { transform:rotate(360deg); } }
    .travel-loader { display:inline-flex; align-items:center; gap:6px; }
    .travel-loader-emoji { font-size:20px; animation:travelbounce 2.8s ease-in-out infinite; display:inline-block; }
    .travel-loader-emoji:nth-child(1){animation-delay:0s} .travel-loader-emoji:nth-child(2){animation-delay:.4s} .travel-loader-emoji:nth-child(3){animation-delay:.8s} .travel-loader-emoji:nth-child(4){animation-delay:1.2s} .travel-loader-emoji:nth-child(5){animation-delay:1.6s}
    @keyframes travelbounce { 0%,80%,100%{transform:translateY(0) scale(1);opacity:.3} 40%{transform:translateY(-8px) scale(1.3);opacity:1} }
    @keyframes earthbounce { 0%{transform:translateY(0) scale(1)} 40%{transform:translateY(-18px) scale(1.08)} 60%{transform:translateY(-14px) scale(1.05)} 100%{transform:translateY(0) scale(1)} }

    /* ── CALENDAR SELECTED DAY ── */
    .cal-selected { outline: 2px solid var(--brand) !important; outline-offset: -2px; border-radius: 10px; }
    .cal-selected .cal-day-num { color: var(--brand) !important; font-weight: 700; }

    /* ── TOAST ── */
    .toast { position:fixed; top:calc(env(safe-area-inset-top,0px) + 20px); left:50%; transform:translateX(-50%) translateY(-20px); background:var(--text); color:var(--bg); padding:12px 20px; border-radius:16px; font-size:14px; font-weight:600; z-index:10000; opacity:0; transition:all .3s; white-space:normal; max-width:min(340px,90vw); text-align:center; pointer-events:none; box-shadow:var(--shadow-md); }
    .toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

    /* ── SECTION HEADERS ── */
    .section-page-header { background:var(--bg); padding:env(safe-area-inset-top,16px) 20px 0; border-bottom:1px solid var(--border); flex-shrink:0; }
    .section-page-title { font-size:24px; font-weight:800; color:var(--text); padding-bottom:14px; letter-spacing:-0.5px; }
  /* ── DATE INPUT GLOBAL STYLING ── */
  input[type="date"] {
    color-scheme: dark;
    position: relative;
  }
  input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    filter: invert(1);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: opacity .15s;
  }
  input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
  }
  input[type="date"].field-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px !important;
    appearance: none;
    -webkit-appearance: none;
  }
  input[type="date"].field-input::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  