

    *, *::before, *::after { box-sizing: border-box !important; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

    :root {
      /* ── Fond néo — dérivé du snow v1 ── */
      --bg:       #EEF1F8;   /* snow v1 (#F0F3FA) légèrement assombri pour le relief */
      --bg-deep:  #E4E8F2;   /* ombre intérieure */
      --bg-lt:    #F6F8FC;   /* lumière intérieure */
      --white:    #FFFFFF;

      /* ── Ombres néo calibrées sur navy ── */
      --sh-light: rgba(255,255,255,.90);
      --sh-dark:  rgba(163, 175, 205, 0.486);

      /* Neo shadows */
      --neo:       2px 2px 4px var(--sh-dark), -4px -4px 5px var(--sh-light);
      --neo-sm:    3px 3px 6px var(--sh-dark),  -2px -2px 6px var(--sh-light);
      --neo-inset: inset 3px 3px 5px var(--sh-dark), inset -2px -2px 4px var(--sh-light);
      --neo-press: inset 2px 2px 6px var(--sh-dark), inset -2px -2px 4px var(--sh-light);

      /* ── Textes (palette v1) ── */
      --ink:    #0D1530;   /* navy */
      --blue-dk:    #0a5a42;   /* navy */
      --ink2:   #2A3B6A;   /* slate */
      --ink3:   #6B7A99;   /* fog */
      --ink4:   #A8B2CC;   /* mist */

      /* ── Accent or (v1) ── */
      --accent:      #C9A84C;   /* gold */
      --accent-dk:   #8B6E2A;   /* gold-dk */
      --accent-lt:   #FDF8EC;   /* gold-bg */
      --accent-glow: rgba(201,168,76,.22);

      /* ── Sémantique (v1) ── */
      --green:    #0B7A5C;   /* emerald */
      --green-lt: #D1F5EC;
      --red:      #C0392B;   /* ruby */
      --red-lt:   #FCE8E6;
      --amber:    #C27A0A;
      --amber-lt: #FEF0C7;
      --blue:     #1A56A0;   /* sapphire */
      --blue-lt:  #E0EDFF;

      --nav: 72px;
      --top: 64px;
      --r:   6px;
      --r-sm: 4px;

      /* Animation timings */
      --ease-bounce: cubic-bezier(.34,1.56,.64,1);
      --ease-smooth: cubic-bezier(.4,0,.2,1);
    }

    /* ── DARK MODE ─────────────────────────────────────── */
    [data-theme="dark"] {
      --bg:       #1B1F35;
      --bg-deep:  #13172A;
      --bg-lt:    #232840;
      --white:    #1B1F35;

      --sh-light: rgba(38, 48, 76, 0.432);
      --sh-dark:  rgba(5, 7, 16, 0.521);

      --ink:    #E4ECFF;
      --ink2:   #9FAECB;
      --ink3:   #5C6A88;
      --ink4:   #36415A;

      --green-lt: rgba(11,122,92,.2);
      --red-lt:   rgba(192,57,43,.2);
      --amber-lt: rgba(194,122,10,.2);
      --blue-lt:  rgba(26,86,160,.22);
      --accent-lt: rgba(201,168,76,.12);
      --accent-glow: rgba(201,168,76,.15);
    }

    [data-theme="dark"] html,
    [data-theme="dark"] body,
    [data-theme="dark"] #app-wrapper { background: var(--bg); }

    [data-theme="dark"] #app-wrapper {
      box-shadow: 20px 0 60px rgba(0,0,0,.6), -20px 0 60px rgba(0,0,0,.6);
    }

    [data-theme="dark"] .topbar    { background: #080C1C; }
    [data-theme="dark"] .hero      { background: #06091A; }
    [data-theme="dark"] .prof-top  { background: #06091A; }

    [data-theme="dark"] .login-sheet { background: var(--bg); box-shadow: 0 -8px 40px rgba(0,0,0,.6); }

    [data-theme="dark"] .bnav { box-shadow: 0 -4px 24px rgba(0,0,0,.5); }

    /* Loyers modal fond */
    [data-theme="dark"] #loyers-modal > div {
      background: var(--bg) !important;
    }
    [data-theme="dark"] #loyers-modal .fas.fa-list-ul { color: var(--accent) !important; }

    /* Chip dark */
    [data-theme="dark"] .chip { color: var(--ink2); }

    html { background: var(--bg); height: 100%; }

    body {
      font-family: 'DM Sans', system-ui, sans-serif;
      color: var(--ink);
      height: 100%;
      overflow: hidden;
      display: flex;
      justify-content: center;
      align-items: stretch;
    }

    #app-wrapper {
      width: 100%; max-width: 430px;
      position: relative;
      background: var(--bg);
      overflow: hidden;
      box-shadow: 20px 0 60px rgba(180,190,205,.5), -20px 0 60px rgba(180,190,205,.5);
      display: flex; flex-direction: column; height: 100%;
    }

    /* ── SCREENS ── */
    .screen {
      display: flex; flex-direction: column; height: 100%;
      position: absolute; inset: 0;
      transition: opacity .35s var(--ease-smooth), transform .35s var(--ease-smooth);
    }
    .screen.hidden { opacity: 0; pointer-events: none; transform: translateY(12px) scale(.98); }

    /* ══════════════════════════════════
       KEYFRAMES
    ══════════════════════════════════ */
    @keyframes floatIn {
      from { opacity: 0; transform: translateY(28px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes popIn {
      from { opacity: 0; transform: scale(.85); }
      to   { opacity: 1; transform: scale(1); }
    }
    @keyframes pulse-ring {
      0%   { transform: scale(.95); box-shadow: 0 0 0 0 var(--accent-glow); }
      70%  { transform: scale(1);   box-shadow: 0 0 0 14px rgba(201,168,76,0); }
      100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(201,168,76,0); }
    }
    @keyframes shimmer {
      from { background-position: -200% center; }
      to   { background-position:  200% center; }
    }
    @keyframes ripple {
      to { transform: scale(4); opacity: 0; }
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    @keyframes slideUp {
      from { opacity: 0; transform: translateY(20px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes staggerFade {
      from { opacity: 0; transform: translateY(10px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes tickIn {
      from { stroke-dashoffset: 40; }
      to   { stroke-dashoffset: 0; }
    }

    /* ══════════════════════════════════
       LOGIN
    ══════════════════════════════════ */
    #sl { background: var(--bg); }

    .login-hero {
      flex: 1; min-height: 280px;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding: 32px 28px 20px;
      position: relative;
      background: #000;
      background: url('https://plus.unsplash.com/premium_photo-1742457604656-b9feed9543f1?q=80&w=1600&auto=format&fit=crop') center/cover;
        background: linear-gradient(rgba(255, 255, 255, 0.993), rgba(255, 255, 255, 0.767)), url('https://images.unsplash.com/photo-1545324418-cc1a3fa10c00?w=1800&auto=format&fit=crop&q=60') center/cover;
    }

    /* Cercles décoratifs néo en fond */
    .neo-circle {
      position: absolute;
      border-radius: 50%;
      background: var(--bg);
    }
    .neo-circle.c1 {
      width: 260px; height: 260px;
      top: -80px; right: -80px;
      box-shadow: 5px 5px 8px var(--sh-dark), -2px -2px 8px var(--sh-light);
    }
    .neo-circle.c2 {
      width: 140px; height: 140px;
      bottom: 20px; left: -40px;
      box-shadow: var(--neo);
    }
    .neo-circle.c3 {
      width: 80px; height: 80px;
      top: 40px; left: 20px;
      box-shadow: var(--neo-sm);
    }

    .login-badge {
      position: relative; z-index: 1;
      width: 90px; height: 90px;
      border-radius: 28px;
      background: var(--bg);
      box-shadow: var(--neo);
      display: flex; align-items: center; justify-content: center;
      margin-bottom: 24px;
      animation: pulse-ring 2.8s ease-in-out infinite;
    }
    .login-badge-inner {
      width: 66px; height: 66px;
      border-radius: 20px;
      background: linear-gradient(145deg, #1C2E5C, #0D1530);
      display: flex; align-items: center; justify-content: center;
      box-shadow: 4px 4px 12px rgba(13,21,48,.4), -2px -2px 8px rgba(255,255,255,.6);
    }
    .login-badge-inner i { font-size: 26px; color: var(--accent); }

    .login-title {
      font-family: 'DM Serif Display', serif;
      font-size: 42px; font-weight: 400;
      color: var(--ink); letter-spacing: .06em;
      position: relative; z-index: 1;
      animation: floatIn .6s var(--ease-bounce) .1s both;
    }
    .login-title span { color: var(--accent); }

    .login-tagline {
      font-size: 12px; font-weight: 500;
      color: var(--ink3); letter-spacing: .12em;
      text-transform: uppercase; margin-top: 7px;
      position: relative; z-index: 1;
      animation: floatIn .6s var(--ease-bounce) .2s both;
    }

    .login-sheet {
      background: var(--bg);
      border-radius: 32px 32px 0 0;
      padding: 32px 26px max(44px, env(safe-area-inset-bottom, 44px));
      position: relative; z-index: 2;
      box-shadow: 0 -8px 40px rgba(180,190,205,.4);
      animation: slideUp .5s var(--ease-smooth) .15s both;
    }

    .login-sheet::before {
      content: '';
      position: absolute;
      top: 14px; left: 50%; transform: translateX(-50%);
      width: 40px; height: 5px;
      background: var(--bg);
      border-radius: 3px;
      box-shadow: var(--neo-inset);
    }

    .login-sheet-title {
      font-family: 'DM Serif Display', serif;
      font-size: 26px; font-weight: 400; color: var(--ink);
      margin-bottom: 4px;
    }
    .login-sheet-sub { font-size: 13px; color: var(--ink3); margin-bottom: 28px; font-weight: 400; }

    .err-box {
      background: var(--bg);
      border-radius: 14px;
      color: var(--red);
      padding: 12px 16px;
      font-size: 13px; font-weight: 600;
      margin-bottom: 16px;
      display: none; align-items: center; gap: 10px;
      box-shadow: var(--neo-inset);
      animation: floatIn .3s var(--ease-bounce);
    }

    .login-field { margin-bottom: 16px; }
    .login-field label {
      font-size: 11px; font-weight: 700;
      color: var(--ink3); letter-spacing: .07em;
      text-transform: uppercase; display: block; margin-bottom: 8px;
    }
    .login-field-row {
      display: flex; align-items: center; gap: 12px;
      background: var(--bg);
      border-radius: 16px;
      padding: 0 16px;
      box-shadow: var(--neo-inset);
      transition: box-shadow .25s var(--ease-smooth);
    }
    .login-field-row:focus-within {
      box-shadow: var(--neo-inset), 0 0 0 2px var(--accent);
    }
    .login-field-row i { font-size: 15px; color: var(--ink4); flex-shrink: 0; transition: color .25s; }
    .login-field-row:focus-within i { color: var(--accent); }
    .login-field-row input {
      flex: 1; border: none; padding: 15px 0;
      font-size: 15px; font-weight: 600; color: var(--ink);
      background: transparent; outline: none;
      font-family: 'DM Sans', sans-serif;
    }
    .login-field-row input::placeholder { color: var(--ink4); font-weight: 400; }

    /* Bouton néo avec ripple */
    .btn-primary {
      width: 100%; padding: 17px;
      background: var(--bg);
      color: var(--accent-dk);
      border: none; border-radius: 18px;
      font-size: 14px; font-weight: 700;
      letter-spacing: .08em; text-transform: uppercase;
      cursor: pointer; margin-top: 14px;
      box-shadow: var(--neo);
      transition: box-shadow .2s var(--ease-smooth), transform .15s var(--ease-smooth), color .2s;
      font-family: 'DM Sans', sans-serif;
      position: relative; overflow: hidden;
    }
    .btn-primary:hover {
      box-shadow: 8px 8px 18px var(--sh-dark), -4px -4px 12px var(--sh-light);
      color: var(--accent);
    }
    .btn-primary:active {
      box-shadow: var(--neo-press);
      transform: scale(.99);
    }
    .btn-primary:disabled { opacity: .55; cursor: not-allowed; }

    /* Ripple effect */
    .ripple-wave {
      position: absolute;
      border-radius: 50%;
      background: rgba(201,168,76,.18);
      transform: scale(0);
      animation: ripple .6s linear;
      pointer-events: none;
    }

    .login-help-link { text-align: center; margin-top: 20px; font-size: 12px; color: var(--ink4); }

    /* ══════════════════════════════════
       APP LAYOUT
    ══════════════════════════════════ */
    #sa { background: var(--bg); }

    /* Topbar */
    .topbar {
      height: var(--top); min-height: var(--top); flex-shrink: 0;
      background: #0D1530;
      display: flex; align-items: center;
      padding: 0 20px; gap: 12px;
      box-shadow: 0 4px 24px rgba(8,13,26,.35);
      position: relative; z-index: 10;
      z-index: 999;
    }
    /* Grille subtile v1 sur topbar */
    .topbar::before {
      content: '';
      position: absolute; inset: 0;
      background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
                        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
      background-size: 28px 28px;
      pointer-events: none;
    }
    /* Ligne or en bas */
    .topbar::after {
      content: '';
      position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(201,168,76,.5), transparent);
    }

    .tb-logo { display: flex; align-items: center; gap: 12px; flex: 1; position: relative; z-index: 1; }

    .tb-icon {
      width: 36px; height: 36px; border-radius: 11px;
      background: linear-gradient(145deg, var(--accent), var(--accent-dk));
      display: flex; align-items: center; justify-content: center;
      box-shadow: 0 3px 12px rgba(201,168,76,.35);
      transition: transform .2s var(--ease-bounce), box-shadow .2s;
    }
    .tb-icon:active { transform: scale(.93); }
    .tb-icon i { color: #0D1530; font-size: 15px; }

    .tb-name { font-family: 'DM Serif Display', serif; font-size: 20px; font-weight: 400; color: #fff; letter-spacing: .1em; position: relative; z-index: 1; }
    .tb-name span { color: var(--accent); }

    .tb-right { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }

    .tb-bell {
      width: 36px; height: 36px; border-radius: 11px;
      background: rgba(255,255,255,.07);
      border: 1px solid rgba(255,255,255,.12);
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: rgba(255,255,255,.6); font-size: 14px;
      position: relative;
      transition: background .2s, color .2s, transform .2s var(--ease-bounce);
    }
    .tb-bell:hover { background: rgba(255,255,255,.14); color: #fff; }
    .tb-bell:active { transform: scale(.93); }

    .badge {
      position: absolute; top: 6px; right: 6px;
      width: 8px; height: 8px;
      background: var(--accent); border-radius: 50%;
      border: 2px solid #0D1530;
      animation: pulse-ring 2s ease-in-out infinite;
    }
    .badge.off { display: none; }

    .tb-avatar-wrap { position: relative; }
    .tb-avatar {
      width: 36px; height: 36px; border-radius: 50%;
      background: linear-gradient(145deg, #1C2E5C, #0D1530);
      border: 1.5px solid rgba(201,168,76,.45);
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: var(--accent); font-size: 12px; font-weight: 700;
      box-shadow: 0 2px 10px rgba(0,0,0,.3);
      transition: border-color .2s, box-shadow .2s, transform .2s var(--ease-bounce);
    }
    .tb-avatar:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,168,76,.2); }
    .tb-avatar:active { transform: scale(.93); }

    .tb-dropdown {
      position: absolute; top: calc(100% + 12px); right: 0;
      background: var(--bg);
      border-radius: 6px;
      box-shadow: 2px 2px 5px var(--sh-dark), -6px -6px 2px var(--sh-light);
      min-width: 215px; z-index: 200; overflow: hidden;
      opacity: 0; pointer-events: none;
      transform: translateY(-10px) scale(.95);
      transition: all .25s var(--ease-bounce);
      transform-origin: top right;
    }
    .tb-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

    .tb-dd-header {
      padding: 15px 16px 12px;
      border-bottom: 1px solid var(--bg-deep);
    }
    .tb-dd-name { font-size: 14px; font-weight: 700; color: var(--ink); }
    .tb-dd-code { font-size: 11px; color: var(--ink3); margin-top: 2px; }

    .tb-dd-item {
      display: flex; align-items: center; gap: 11px;
      padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--ink);
      cursor: pointer; border: none; background: none;
      width: 100%; text-align: left;
      transition: background .15s; font-family: 'DM Sans', sans-serif;
    }
    .tb-dd-item:hover { background: var(--bg-lt); }
    .tb-dd-item i { width: 18px; text-align: center; color: var(--ink3); font-size: 13px; }
    .tb-dd-item.danger { color: var(--red); }
    .tb-dd-item.danger i { color: var(--red); }
    .tb-dd-sep { height: 1px; background: var(--bg-deep); }

    /* Scroll */
    .scroll {
      flex: 1; overflow-y: auto; overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      padding-bottom: calc(var(--nav) + 12px);
    }

    .sec { display: none; }
    .sec.on { display: block; }

    /* Bottom nav */
    .bnav {
      height: var(--nav); min-height: var(--nav); flex-shrink: 0;
      background: var(--bg);
      display: flex;
      box-shadow: 0 -4px 24px rgba(180,190,205,.5);
      position: relative; z-index: 10;
    }

    .ni {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center; gap: 5px;
      border: none; background: none; cursor: pointer;
      color: var(--ink3); font-size: 9px; font-weight: 700;
      text-transform: uppercase; letter-spacing: .06em;
      padding: 8px 0; transition: color .25s;
      position: relative; font-family: 'DM Sans', sans-serif;
    }
    .ni i { font-size: 20px; transition: transform .3s var(--ease-bounce); }
    .ni.on { color: var(--accent); }
    .ni.on i { transform: translateY(-3px); }

    /* Pill indicateur actif */
    .ni-pill {
      position: absolute; bottom: 8px;
      width: 0; height: 4px;
      background: var(--accent); border-radius: 2px;
      transition: width .3s var(--ease-bounce), opacity .3s;
      opacity: 0;
    }
    .ni.on .ni-pill { width: 28px; opacity: 1; }

    /* ══════════════════════════════════
       HERO
    ══════════════════════════════════ */
    .hero {
      background: #0D1530;
      padding: 24px 20px 22px;
      position: relative; overflow: hidden;
      animation: staggerFade .5s var(--ease-smooth) .1s both;
      border-radius: 0 0 28px 28px;
      box-shadow: 0 8px 32px rgba(8,13,26,.25);
    }

    /* Grille subtile */
    .hero::after {
      content: '';
      position: absolute; inset: 0;
      background-image: linear-gradient(rgba(201,168,76,.05) 1px, transparent 1px),
                        linear-gradient(90deg, rgba(201,168,76,.05) 1px, transparent 1px);
      background-size: 32px 32px;
      pointer-events: none;
    }

    /* Halo gold */
    .hero::before {
      content: '';
      position: absolute; top: -60px; right: -60px;
      width: 240px; height: 240px; border-radius: 50%;
      background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
      pointer-events: none;
    }

    .hero-top {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 16px; position: relative; z-index: 1;
    }

    .hero-eyebrow {
      font-size: 10px; font-weight: 700;
      color: var(--accent); letter-spacing: .16em;
      text-transform: uppercase;
      display: flex; align-items: center; gap: 8px;
    }
    .hero-dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: var(--accent);
      animation: pulse-ring 2s ease-in-out infinite;
      flex-shrink: 0;
    }

    .hero-amount {
      font-family: 'DM Serif Display', serif;
      font-size: 50px; font-weight: 400;
      color: #fff; line-height: 1;
      margin-bottom: 6px; letter-spacing: -.02em;
      position: relative; z-index: 1;
      text-shadow: 0 2px 16px rgba(8,13,26,.3);
    }
    .hero-amount em {
      font-size: 15px; font-weight: 400;
      color: rgba(255,255,255,.45); font-style: normal;
    }

    .hero-sub { font-size: 12px; color: rgba(255,255,255,.4); margin-bottom: 20px; position: relative; z-index: 1; }

    .hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; position: relative; z-index: 1; }

    .hstat {
      background: rgba(255,255,255,.05);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 14px;
      padding: 13px 10px;
      transition: background .2s, transform .2s var(--ease-bounce);
      cursor: default;
    }
    .hstat:active { transform: scale(.97); background: rgba(255,255,255,.08); }
    .hstat-ico { font-size: 13px; color: var(--accent); opacity: .75; margin-bottom: 7px; }
    .hstat-lbl { font-size: 9px; color: rgba(255,255,255,.35); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
    .hstat-val { font-size: 15px; font-weight: 700; color: #fff; margin-top: 3px; }
    .hstat-val.ok   { color: #6EE7B7; }
    .hstat-val.bad  { color: #FCA5A5; }
    .hstat-val.warn { color: var(--accent); }


    .loyers-modal{
      transform: translateY(100%);
      transition: all 0.5s ease;
    }
    .loyers-modal.active{
      transform: translateY(0);
      transition: all 0.5s ease;

    }
    /* Mes loyers bouton */
    .btn-loyers {
      
      margin: 16px; padding: 16px 10px;
      background: linear-gradient(135deg, #0B2050 0%, #1A56A0 100%);
      border: 1px solid rgba(201,168,76,.18);
      border-radius: 18px; cursor: pointer;
      color: #fff; font-size: 15px; font-weight: 700;
      display: flex; align-items: center; justify-content: center; gap: 10px;
      font-family: 'DM Sans', sans-serif;
      box-shadow: 0 8px 28px rgba(10,32,80,.45), inset 0 1px 0 rgba(255,255,255,.08);
      transition: transform .15s var(--ease-bounce), box-shadow .15s;
      position: relative; overflow: hidden;
    }
    .btn-loyers::before {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(201,168,76,.06) 0%, transparent 60%);
      pointer-events: none;
    }
    .btn-loyers:active { transform: scale(.98); box-shadow: 0 3px 12px rgba(10,32,80,.4); }
    .btn-loyers-badge {
      background: rgba(201,168,76,.2); border: 1px solid rgba(201,168,76,.4);
      border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700;
      color: var(--accent);
    }

    /* Variante rouge — impayés */
    .btn-loyers-red {
      background: linear-gradient(135deg, #7B0D0D 0%, #C0392B 100%);
      box-shadow: 0 8px 28px rgba(192,57,43,.45), inset 0 1px 0 rgba(255,255,255,.08);
      border-color: rgba(255,255,255,.1);
    }
    .btn-loyers-badge-red {
      background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
      border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #fff;
    }

    /* Variante verte — paiement anticipé */
    .btn-loyers-advance {
      background: linear-gradient(135deg, #064E3B 0%, #059669 100%);
      box-shadow: 0 8px 28px rgba(5,150,105,.4), inset 0 1px 0 rgba(255,255,255,.08);
      border-color: rgba(255,255,255,.1);
    }
    .btn-loyers-badge-advance {
      background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
      border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; color: #fff;
    }

    /* Cards */
    .card {
      background: var(--bg);
      border-radius: var(--r);
      box-shadow: var(--neo);
      padding: 18px; margin: 0 14px 14px;
      animation: staggerFade .4s var(--ease-smooth) both;
    }
    .card:nth-child(1) { animation-delay: .1s; }
    .card:nth-child(2) { animation-delay: .18s; }
    .card:nth-child(3) { animation-delay: .26s; }

    .card-head {
      display: flex; align-items: center; gap: 8px;
      font-size: 11px; font-weight: 700;
      color: var(--ink3); text-transform: uppercase;
      letter-spacing: .08em; margin-bottom: 16px;
    }
    .card-head-ico {
      width: 28px; height: 28px; border-radius: 9px;
      background: var(--bg);
      box-shadow: var(--neo-sm);
      display: flex; align-items: center; justify-content: center;
      color: var(--accent); font-size: 11px;
      flex-shrink: 0;
    }

    /* Section header */
    .sec-hd {
      display: flex; align-items: center; justify-content: space-between;
      padding: 20px 18px 10px;
      animation: slideUp .4s var(--ease-smooth) both;
    }
    .sec-hd h2 { font-family: 'DM Serif Display', serif; font-size: 22px; font-weight: 400; color: var(--ink); }

    /* Chips */
    .chip {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 4px 11px; border-radius: 20px;
      font-size: 10px; font-weight: 700; letter-spacing: .04em;
      background: var(--bg);
      box-shadow: var(--neo-sm);
    }
    .ch-green  { color: var(--green); }
    .ch-orange { color: var(--amber); }
    .ch-red    { color: var(--red); }
    .ch-blue   { color: var(--accent); }
    .ch-gray   { color: var(--ink3); }

    /* Rent row */
    .rent-row {
      display: flex; align-items: center; gap: 13px;
      padding: 13px 0; border-bottom: 1px solid var(--bg-deep);
      transition: opacity .15s;
    }
    .rent-row:last-child { border-bottom: none; padding-bottom: 0; }
    .rent-row:active { opacity: .7; }

    .rr-ico {
      width: 46px; height: 46px; border-radius: 15px;
      flex-shrink: 0; display: flex; align-items: center; justify-content: center;
      font-size: 17px;
      background: var(--bg); box-shadow: var(--neo-sm);
    }
    .ico-paid   { color: var(--green); }
    .ico-unpaid { color: var(--red); }
    .ico-late   { color: var(--amber); }
    .ico-part   { color: var(--accent); }
    .ico-future { color: var(--ink3); }

    .rr-info { flex: 1; min-width: 0; }
    .rr-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
    .rr-sub   { font-size: 12px; color: var(--ink3); margin-top: 2px; }
    .rr-right { text-align: right; flex-shrink: 0; }
    .rr-amt   { font-size: 14px; font-weight: 800; white-space: nowrap; color: var(--ink); }
    .rr-chip  { margin-top: 4px; }

    /* Tabs */
    .tabs {
      display: flex; margin: 14px 14px 0;
      background: var(--bg); border-radius: 16px;
      padding: 5px; gap: 3px;
      box-shadow: var(--neo-inset);
    }
    .tab {
      flex: 1; padding: 10px 4px;
      border: none; background: none;
      cursor: pointer; font-size: 11px; font-weight: 700;
      color: var(--ink3); border-radius: 12px;
      transition: all .25s var(--ease-bounce);
      font-family: 'DM Sans', sans-serif;
    }
    .tab.on {
      background: var(--bg);
      color: var(--accent);
      box-shadow: var(--neo-sm);
    }

    /* Notifs */
    .ni-item {
      display: flex; gap: 12px; padding: 14px 0;
      border-bottom: 1px solid var(--bg-deep); cursor: pointer;
      transition: opacity .15s;
    }
    .ni-item:last-child { border-bottom: none; }
    .ni-item:active { opacity: .7; }
    .ni-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
    .ni-dot.unread { background: var(--accent); animation: pulse-ring 2s ease-in-out infinite; }
    .ni-dot.read   { background: var(--ink4); }
    .ni-title { font-size: 13px; font-weight: 700; color: var(--ink); }
    .ni-msg   { font-size: 12px; color: var(--ink2); margin-top: 2px; line-height: 1.45; }
    .ni-time  { font-size: 11px; color: var(--ink3); margin-top: 4px; }
    .read-all-btn { border: none; background: none; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'DM Sans', sans-serif; }

    /* Profil */
    .prof-top {
      background: #080D1A;
      padding: 32px 20px 72px;
      text-align: center; position: relative; overflow: hidden;
      box-shadow: 0 8px 32px rgba(8,13,26,.3);
    }
    .prof-top::before {
      content: '';
      position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
      width: 360px; height: 360px; border-radius: 50%;
      background: radial-gradient(circle, rgba(201,168,76,.1) 0%, transparent 65%);
      pointer-events: none;
    }
    .prof-top::after {
      content: '';
      position: absolute; inset: 0;
      background-image: linear-gradient(rgba(201,168,76,.04) 1px, transparent 1px),
                        linear-gradient(90deg, rgba(201,168,76,.04) 1px, transparent 1px);
      background-size: 28px 28px;
      pointer-events: none;
    }

    .prof-av-wrap {
      position: relative; display: inline-block;
      margin: 0 auto 14px;
    }
    .prof-av {
      width: 86px; height: 86px; border-radius: 50%;
      background: linear-gradient(145deg, #1C2E5C, #0D1530);
      border: 2px solid rgba(201,168,76,.45);
      display: flex; align-items: center; justify-content: center;
      font-family: 'DM Serif Display', serif;
      font-size: 28px; font-weight: 400; color: var(--accent);
      position: relative; z-index: 1;
      box-shadow: 0 0 0 6px rgba(201,168,76,.1), 0 8px 32px rgba(0,0,0,.4);
      animation: popIn .5s var(--ease-bounce) .1s both;
    }
    /* Ring animé gold */
    .prof-av-ring {
      position: absolute; inset: -6px;
      border-radius: 50%;
      border: 2px solid transparent;
      border-top-color: var(--accent);
      border-right-color: var(--accent);
      animation: spin 3s linear infinite;
      opacity: .5;
    }

    .prof-name { font-family: 'DM Serif Display', serif; font-size: 22px; font-weight: 400; color: #fff; animation: slideUp .4s var(--ease-smooth) .2s both; position: relative; z-index: 1; }
    .prof-code { font-size: 12px; font-weight: 500; color: rgba(255,255,255,.45); margin-top: 4px; letter-spacing: .06em; animation: slideUp .4s var(--ease-smooth) .25s both; position: relative; z-index: 1; }

    .prof-card { margin: -48px 14px 14px; }

    .info-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--bg-deep); }
    .info-row:last-child { border-bottom: none; }
    .info-ico {
      width: 38px; height: 38px; border-radius: 12px;
      background: var(--bg); box-shadow: var(--neo-sm);
      display: flex; align-items: center; justify-content: center;
      color: var(--accent); font-size: 13px; flex-shrink: 0;
    }
    .info-lbl { font-size: 11px; color: var(--ink3); font-weight: 600; }
    .info-val { font-size: 14px; font-weight: 700; color: var(--ink); margin-top: 1px; }

    .btn-logout {
      width: 100%; padding: 15px;
      border: none; border-radius: 16px;
      background: var(--bg);
      box-shadow: var(--neo);
      color: var(--red); font-size: 13px; font-weight: 700;
      cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
      transition: box-shadow .2s, transform .15s var(--ease-bounce);
      margin-top: 4px; font-family: 'DM Sans', sans-serif;
    }
    .btn-logout:active { box-shadow: var(--neo-press); transform: scale(.98); }

    /* Loaders */
    .loader { display: flex; justify-content: center; align-items: center; padding: 44px; }
    .spin { width: 26px; height: 26px; border: 2.5px solid var(--bg-deep); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }

    /* Skeleton shimmer */
    .skeleton {
      background: linear-gradient(90deg, var(--bg-deep) 25%, var(--bg-lt) 50%, var(--bg-deep) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 8px;
    }

    .empty { text-align: center; padding: 56px 24px; }
    .empty i { font-size: 40px; color: var(--ink4); display: block; margin-bottom: 12px; }
    .empty p { color: var(--ink3); font-size: 14px; }

    /* Paid banner */
    .paid-banner {
      margin: 14px 14px 0;
      border-radius: 20px;
      background: var(--green);
      padding: 18px 20px;
      display: flex; align-items: center; gap: 16px;
      animation: staggerFade .4s var(--ease-smooth) both;
      box-shadow: 0 6px 24px rgba(11,122,92,.3);
      position: relative; overflow: hidden;
    }
    .paid-banner::before {
      content: '';
      position: absolute; top: -30px; right: -30px;
      width: 100px; height: 100px; border-radius: 50%;
      background: rgba(255,255,255,.08); pointer-events: none;
    }
    .paid-circle {
      width: 50px; height: 50px; border-radius: 50%;
      background: rgba(255,255,255,.2);
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .paid-tick { color: #fff; font-size: 22px; }
    .paid-text { font-family: 'DM Serif Display', serif; font-size: 17px; font-weight: 400; color: #fff; }
    .paid-sub  { font-size: 12px; color: rgba(255,255,255,.75); margin-top: 3px; }

    /* Overlays */
    .overlay {
      position: absolute; inset: 0;
      background: rgba(26,32,48,.35);
      backdrop-filter: blur(6px);
      z-index: 50; display: flex; align-items: flex-end;
      opacity: 0; pointer-events: none;
      transition: opacity .3s var(--ease-smooth);
    }
    .overlay.open { opacity: 1; pointer-events: auto; }

    .sheet {
      width: 100%;
      background: var(--bg);
      border-radius: 28px 28px 0 0;
      padding: 8px 20px 36px;
      transform: translateY(100%);
      transition: transform .38s var(--ease-bounce);
      box-shadow: -4px -4px 30px rgba(180,190,205,.6);
    }
    .overlay.open .sheet { transform: translateY(0); }

    .sh-handle {
      width: 40px; height: 5px; border-radius: 3px;
      background: var(--bg); box-shadow: var(--neo-inset);
      margin: 14px auto 20px;
    }
    .sh-title { font-family: 'DM Serif Display', serif; font-size: 22px; font-weight: 400; color: var(--ink); margin-bottom: 5px; }
    .sh-sub   { font-size: 13px; color: var(--ink3); margin-bottom: 20px; line-height: 1.5; }

    /* Methods */
    .methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
    .mth {
      padding: 16px 10px;
      background: var(--bg);
      box-shadow: var(--neo-sm);
      border: none; border-radius: 18px;
      cursor: pointer; text-align: center;
      transition: box-shadow .2s, transform .2s var(--ease-bounce);
    }
    .mth:active { box-shadow: var(--neo-press); transform: scale(.97); }
    .mth.sel {
      box-shadow: var(--neo-press), 0 0 0 2px var(--accent);
      transform: scale(.98);
    }
    .mth i { font-size: 26px; display: block; margin-bottom: 8px; }
    .mth span { font-size: 12px; font-weight: 700; color: var(--ink); }

    /* Bouton payer */
    .btn-pay {
      width: 100%; padding: 16px;
      background: var(--bg);
      box-shadow: var(--neo);
      border: none; border-radius: 50px;
      color: var(--accent-dk); font-size: 14px; font-weight: 800;
      letter-spacing: .08em; text-transform: uppercase;
      cursor: pointer; transition: box-shadow .2s, transform .15s var(--ease-bounce), color .2s;
      margin-bottom: 10px; font-family: 'DM Sans', sans-serif;
      position: relative; overflow: hidden;
    }
    .btn-pay:hover { color: var(--accent); }
    .btn-pay:active { box-shadow: var(--neo-press); transform: scale(.98); }
    .btn-pay:disabled { opacity: .5; cursor: not-allowed; }

    .btn-cancel { width: 100%; padding: 12px; background: none; border: none; color: var(--ink3); font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: color .2s; }
    .btn-cancel:hover { color: var(--ink2); }

    /* Proof zone */
    .proof-zone {
      margin-top: 14px; border-radius: 18px;
      background: var(--bg); box-shadow: var(--neo-inset);
      padding: 28px 16px; text-align: center;
      cursor: pointer; transition: box-shadow .2s;
    }
    .proof-zone:hover { box-shadow: var(--neo-inset), 0 0 0 2px var(--accent); }
    .proof-zone i { font-size: 26px; color: var(--ink3); display: block; margin-bottom: 7px; }
    .proof-zone.has-file i { color: var(--green); }
    .proof-zone span { font-size: 12px; font-weight: 700; color: var(--ink3); }
    .proof-zone.has-file span { color: var(--green); }

    .mm-instructions {
      background: var(--bg); box-shadow: var(--neo-inset);
      border-radius: 16px;
      padding: 14px; font-size: 13px; color: var(--amber);
      margin-top: 14px; line-height: 1.55;
    }

    /* FAB */
    .fab-report {
      position: fixed; bottom: calc(var(--nav) + 18px); right: 18px;
      width: 52px; height: 52px; border-radius: 50%;
      background: var(--bg); box-shadow: var(--neo);
      border: none; cursor: pointer; z-index: 40;
      display: none; align-items: center; justify-content: center;
      color: var(--red); font-size: 20px;
      transition: box-shadow .2s, transform .2s var(--ease-bounce);
    }
    .fab-report.visible { display: flex; }
    .fab-report:active { box-shadow: var(--neo-press); transform: scale(.92); }

    /* Sig overlay */
    .sig-overlay {
      position: absolute; inset: 0;
      background: rgba(26,32,48,.38);
      backdrop-filter: blur(6px);
      z-index: 60; display: flex; align-items: flex-end;
      opacity: 0; pointer-events: none; transition: opacity .3s;
    }
    .sig-overlay.open { opacity: 1; pointer-events: auto; }
    .sig-sheet {
      width: 100%; background: var(--bg);
      border-radius: 28px 28px 0 0;
      padding: 8px 20px 44px;
      transform: translateY(100%);
      transition: transform .38s var(--ease-bounce);
      box-shadow: -4px -4px 30px rgba(180,190,205,.6);
    }
    .sig-overlay.open .sig-sheet { transform: translateY(0); }

    .sig-type-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; }
    .sig-type-btn {
      padding: 14px 6px;
      background: var(--bg); box-shadow: var(--neo-sm);
      border: none; border-radius: 16px;
      cursor: pointer; text-align: center; transition: box-shadow .2s, transform .2s var(--ease-bounce);
      font-family: 'DM Sans', sans-serif;
    }
    .sig-type-btn:active { box-shadow: var(--neo-press); transform: scale(.96); }
    .sig-type-btn.sel { box-shadow: var(--neo-press), 0 0 0 2px var(--red); }
    .sig-type-btn i { font-size: 20px; display: block; margin-bottom: 5px; color: var(--ink3); }
    .sig-type-btn.sel i { color: var(--red); }
    .sig-type-btn span { font-size: 11px; font-weight: 700; color: var(--ink); }

    .sig-urgency-row { display: flex; gap: 6px; margin-bottom: 16px; }
    .sig-urg-btn {
      flex: 1; padding: 9px 4px;
      background: var(--bg); box-shadow: var(--neo-sm);
      border: none; border-radius: 20px;
      cursor: pointer; font-size: 11px; font-weight: 700; color: var(--ink3);
      text-align: center; transition: all .2s var(--ease-bounce);
      font-family: 'DM Sans', sans-serif;
    }
    .sig-urg-btn.sel { box-shadow: var(--neo-press), 0 0 0 2px var(--accent); color: var(--accent); }

    .sig-textarea {
      width: 100%; min-height: 90px; padding: 14px;
      background: var(--bg); box-shadow: var(--neo-inset);
      border: none; border-radius: 16px;
      font-size: 14px; font-family: 'DM Sans', sans-serif;
      color: var(--ink); resize: none; outline: none;
      transition: box-shadow .25s;
    }
    .sig-textarea:focus { box-shadow: var(--neo-inset), 0 0 0 2px var(--accent); }
    .sig-textarea::placeholder { color: var(--ink4); }

    .sig-field-lbl {
      font-size: 10px; font-weight: 800; color: var(--accent-dk);
      text-transform: uppercase; letter-spacing: .12em;
      margin-bottom: 8px; display: block;
    }

    .btn-report {
      width: 100%; padding: 16px; border: none; border-radius: 50px;
      background: var(--bg); box-shadow: var(--neo);
      color: var(--red); font-size: 14px; font-weight: 800;
      letter-spacing: .08em; text-transform: uppercase;
      cursor: pointer; transition: box-shadow .2s, transform .15s var(--ease-bounce);
      margin-top: 14px; margin-bottom: 10px;
      font-family: 'DM Sans', sans-serif;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .btn-report:active { box-shadow: var(--neo-press); transform: scale(.98); }
    .btn-report:disabled { opacity: .5; cursor: not-allowed; }

    .sig-date-input {
      width: 100%; padding: 13px 14px;
      background: var(--bg); box-shadow: var(--neo-inset);
      border: none; border-radius: 14px;
      font-size: 14px; font-family: 'DM Sans', sans-serif;
      color: var(--ink); outline: none; transition: box-shadow .25s;
    }
    .sig-date-input:focus { box-shadow: var(--neo-inset), 0 0 0 2px var(--accent); }

    /* Sig report items */
    .sig-report-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--bg-deep); }
    .sig-report-item:last-child { border-bottom: none; }
    .sig-report-ico { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; background: var(--bg); box-shadow: var(--neo-sm); }
    .sig-ico-probleme { color: var(--amber); }
    .sig-ico-depart   { color: var(--accent); }
    .sig-ico-alerte   { color: var(--red); }
    .sig-report-title { font-size: 13px; font-weight: 700; color: var(--ink); }
    .sig-report-msg   { font-size: 12px; color: var(--ink2); margin-top: 2px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .sig-report-date  { font-size: 11px; color: var(--ink3); margin-top: 4px; }

    .retard-rent-item {
      display: flex; align-items: center; gap: 12px; padding: 13px 14px;
      background: var(--bg); box-shadow: var(--neo-sm);
      border: none; border-radius: 16px;
      cursor: pointer; transition: box-shadow .2s, transform .2s var(--ease-bounce); margin-bottom: 10px;
    }
    .retard-rent-item.sel { box-shadow: var(--neo-press), 0 0 0 2px var(--amber); transform: scale(.98); }
    .retard-rent-item .rr-title { font-size: 14px; font-weight: 700; color: var(--ink); }
    .retard-rent-item .rr-sub   { font-size: 12px; color: var(--ink3); margin-top: 2px; }
    .retard-rent-item .rr-amt   { font-size: 14px; font-weight: 800; color: var(--amber); }

    /* Contract card */
    .contract-card { background: var(--bg); border-radius: var(--r); box-shadow: var(--neo); margin: 0 14px 14px; overflow: hidden; }
    .contract-card-head {
      background: #0D1530;
      padding: 12px 16px;
      display: flex; align-items: center; gap: 10px;
      position: relative;
    }
    .contract-card-head::after {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(201,168,76,.5), transparent);
    }
    .contract-card-head i { color: var(--accent); font-size: 15px; }
    .contract-card-head span { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .1em; }
    .contract-grid { display: grid; grid-template-columns: 1fr 1fr; }
    .contract-cell { padding: 12px 16px; border-bottom: 1px solid var(--bg-deep); }
    .contract-cell:nth-child(odd) { border-right: 1px solid var(--bg-deep); }
    .contract-cell-lbl { font-size: 10px; color: var(--ink3); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
    .contract-cell-val { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 3px; }
    .contract-cell-val.blue  { color: var(--accent); }
    .contract-cell-val.green { color: var(--green); }

    /* Initial loader */
    .initial-loader {
      position: absolute; inset: 0; background: #080D1A;
      z-index: 9999; display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 24px;
    }
    .initial-loader.fade-out { animation: fadeOut .8s var(--ease-smooth) forwards; }
    @keyframes fadeOut { to { opacity: 0; pointer-events: none; } }

    .loader-badge {
      width: 96px; height: 96px; border-radius: 30px;
      background: linear-gradient(145deg, #1C2E5C, #0D1530);
      border: 2px solid rgba(201,168,76,.3);
      display: flex; align-items: center; justify-content: center;
      animation: pulse-ring 2.5s ease-in-out infinite;
      box-shadow: 0 0 0 8px rgba(201,168,76,.06), 0 12px 40px rgba(0,0,0,.5);
    }
    .loader-badge-inner {
      width: 70px; height: 70px; border-radius: 22px;
      background: rgba(255,255,255,.06);
      display: flex; align-items: center; justify-content: center;
    }
    .loader-badge-inner i { font-size: 28px; color: var(--accent); }

    .loader-title { font-family: 'DM Serif Display', serif; font-size: 32px; font-weight: 400; color: #fff; letter-spacing: .1em; }
    .loader-title span { color: var(--accent); }

    /* Toast */
    #toast {
      position: absolute; bottom: calc(var(--nav) + 16px); left: 50%;
      transform: translateX(-50%) translateY(16px);
      background: var(--bg);
      box-shadow: var(--neo);
      color: var(--ink); padding: 13px 24px;
      border-radius: 40px; font-size: 13px; font-weight: 600;
      white-space: nowrap; max-width: calc(100% - 40px);
      overflow: hidden; text-overflow: ellipsis;
      opacity: 0; transition: all .35s var(--ease-bounce);
      z-index: 100; pointer-events: none;
      font-family: 'DM Sans', sans-serif;
    }
    #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
    #toast.ok  { color: var(--green); }
    #toast.err { color: var(--red); }
