/* ============================================================
   LÚMINA Conciergerie — Design System Premium
   Palette : #111111 · #686868 · #F2EDE5 · #D4AF37 · #FFFFFF
   Fonts   : Manrope (display) · Poppins (body)
   Style   : Light content · header & footer sombres · login dark
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600&display=swap');

/* ── Tokens Lúmina ── */
:root {
    --black:      #111111;
    --surface:    #FFFFFF;   /* cards light */
    --surface-2:  #EDE8DF;   /* légèrement plus sombre que cream */
    --graphite:   #686868;
    --cream:      #F2EDE5;
    --gold:       #D4AF37;
    --white:      #FFFFFF;

    /* Dérivés */
    --gold-soft:  rgba(212,175,55,0.12);
    --gold-line:  rgba(212,175,55,0.30);
    --white-10:   rgba(17,17,17,0.10);   /* borders légères light */
    --white-06:   rgba(17,17,17,0.06);
    --white-04:   rgba(17,17,17,0.04);

    /* Sémantiques — mode light */
    --bg:         #F2EDE5;   /* fond crème */
    --text:       #111111;
    --text-sub:   #4A4A4A;
    --text-muted: #686868;
    --accent:     var(--gold);
    --success:    #3A9668;
    --danger:     #CF4A4A;
    --warning:    #D4AF37;

    /* Layout */
    --header-h:   56px;
    --nav-h:      68px;
    --r-card:     20px;
    --r-sm:       12px;
    --r-xs:       8px;
    --font-body:  'Poppins', -apple-system, sans-serif;
    --font-disp:  'Manrope', -apple-system, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--nav-h);
}

/* ── Utilitaires ── */
.hidden { display: none !important; }

/* ══════════════════════════════════════════
   HEADER — contexte sombre
══════════════════════════════════════════ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(17,17,17,0.96);
    border-bottom: 0.5px solid rgba(255,255,255,0.10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    /* Re-scoper les variables pour le contexte sombre */
    --white-10: rgba(255,255,255,0.10);
    --white-06: rgba(255,255,255,0.08);
    --white-04: rgba(255,255,255,0.04);
}

/* Logo réel — image PNG */
.app-logo {
    display: flex;
    align-items: center;
}

.app-logo-img {
    height: 44px;         /* agrandi vs 38px */
    width: auto;
    object-fit: contain;
    display: block;
}

.app-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.logo-name {
    font-family: var(--font-disp);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: var(--white);
    text-transform: uppercase;
    line-height: 1;
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase;
    margin-top: 3px;
    line-height: 1;
}

/* Sélecteur villa */
.villa-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    border: 0.5px solid rgba(255,255,255,0.14);
    border-radius: 20px;
    padding: 6px 12px;
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.villa-selector:active { background: rgba(255,255,255,0.14); }
.villa-selector .villa-icon { font-size: 13px; }
.villa-selector .chevron { color: var(--gold); font-size: 9px; margin-left: 2px; }

.header-right { display: flex; align-items: center; gap: 8px; }
.header-date  { font-size: 11px; color: rgba(255,255,255,0.45); }

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 0.5px solid rgba(255,255,255,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    color: var(--cream);
}

/* ── Offline ── */
.offline-banner {
    background: rgba(212,175,55,0.10);
    border-bottom: 0.5px solid rgba(212,175,55,0.25);
    color: var(--gold);
    text-align: center;
    padding: 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════
   CONTENU
══════════════════════════════════════════ */
.app-content {
    padding: 24px 20px;
    padding-bottom: 32px;
    min-height: calc(100dvh - var(--header-h) - var(--nav-h));
}

.view { display: none; animation: fadeIn 0.22s ease; }
.view.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── View header ── */
.view-header { margin-bottom: 28px; }

.view-header h1 {
    font-family: var(--font-disp);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    line-height: 1.15;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--graphite);
    margin-top: 5px;
}

/* ══════════════════════════════════════════
   CARDS — style light
══════════════════════════════════════════ */
.card {
    background: var(--surface);
    border-radius: var(--r-card);
    padding: 20px;
    margin-bottom: 12px;
    border: 0.5px solid rgba(17,17,17,0.08);
    box-shadow: 0 1px 6px rgba(17,17,17,0.05);
}

.card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

.card-value {
    font-family: var(--font-disp);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--text);
    line-height: 1;
}

.card-trend {
    font-size: 12px;
    font-weight: 400;
    color: var(--graphite);
    margin-top: 8px;
}

.card-trend.up   { color: var(--success); }
.card-trend.warn { color: var(--gold); }

/* Graphique sparkline (canvas ou SVG simple) */
.sparkline-wrap {
    margin-top: 16px;
    height: 56px;
    position: relative;
}

/* ── Stat cards row ── */
.cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--r-sm);
    padding: 16px 12px;
    text-align: center;
    border: 0.5px solid rgba(17,17,17,0.08);
    box-shadow: 0 1px 4px rgba(17,17,17,0.05);
}

.stat-value {
    font-family: var(--font-disp);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-card.urgent  .stat-value { color: var(--danger); }
.stat-card.pending .stat-value { color: var(--gold); }
.stat-card.done    .stat-value { color: var(--success); }

.stat-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Next arrival ── */
.next-arrival {
    background: var(--surface);
    border-radius: var(--r-card);
    padding: 18px 20px;
    margin-bottom: 12px;
    border: 0.5px solid rgba(17,17,17,0.08);
    border-left: 2px solid var(--gold);
    box-shadow: 0 1px 6px rgba(17,17,17,0.05);
}

.arrival-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.arrival-name {
    font-family: var(--font-disp);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.arrival-meta {
    font-size: 12px;
    color: var(--graphite);
}

.arrival-badge {
    display: inline-block;
    margin-top: 8px;
    background: var(--gold-soft);
    border: 0.5px solid var(--gold-line);
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
}

/* ══════════════════════════════════════════
   TASK CARDS
══════════════════════════════════════════ */
.task-list { display: flex; flex-direction: column; gap: 8px; }

.task-card {
    background: var(--surface);
    border-radius: var(--r-sm);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    border: 0.5px solid rgba(17,17,17,0.08);
    border-left: 2.5px solid rgba(17,17,17,0.12);
    box-shadow: 0 1px 4px rgba(17,17,17,0.05);
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.task-card:active { background: var(--surface-2); }

.task-card[data-priority="urgent"]  { border-left-color: var(--danger); }
.task-card[data-priority="high"]    { border-left-color: var(--gold); }
.task-card[data-priority="normal"]  { border-left-color: rgba(17,17,17,0.15); }
.task-card[data-status="completed"] { opacity: 0.45; }

.task-icon { font-size: 24px; min-width: 32px; text-align: center; }

.task-body { flex: 1; min-width: 0; }

.task-title {
    font-family: var(--font-disp);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.1px;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 11px;
    color: var(--graphite);
}

.task-badge {
    background: rgba(17,17,17,0.06);
    border: 0.5px solid rgba(17,17,17,0.10);
    border-radius: 5px;
    padding: 2px 7px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--graphite);
}

.task-badge.gold   { background: var(--gold-soft); border-color: var(--gold-line); color: #9A7B0A; }
.task-badge.green  { background: rgba(58,150,104,.10); border-color: rgba(58,150,104,.25); color: var(--success); }
.task-badge.red    { background: rgba(207,74,74,.10); border-color: rgba(207,74,74,.25); color: var(--danger); }

.task-progress {
    margin-top: 9px;
    height: 2px;
    background: rgba(17,17,17,0.08);
    border-radius: 1px;
    overflow: hidden;
}

.task-progress-bar {
    height: 100%;
    background: var(--gold);
    border-radius: 1px;
    transition: width 0.4s ease;
}

.task-arrow { color: var(--graphite); font-size: 16px; align-self: center; }

/* ══════════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════════ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: var(--font-disp);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.2px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--gold);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-body);
}

/* ══════════════════════════════════════════
   CHECKLIST
══════════════════════════════════════════ */
.checklist { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; }

.checklist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--r-xs);
    cursor: pointer;
    min-height: 56px;
    border: 0.5px solid rgba(17,17,17,0.07);
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.checklist-item:active { background: var(--surface-2); }
.checklist-item.checked { opacity: 0.5; }
.checklist-item.checked .checklist-label { text-decoration: line-through; }

.checklist-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--graphite);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    font-size: 12px;
    transition: all 0.2s;
    color: var(--white);
}

.checklist-item.checked .checklist-checkbox {
    background: var(--gold);
    border-color: var(--gold);
}

.checklist-label { font-size: 14px; color: var(--text-sub); line-height: 1.4; }

/* ══════════════════════════════════════════
   PISCINE
══════════════════════════════════════════ */
.pool-gauges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.pool-gauge {
    background: var(--surface);
    border-radius: var(--r-sm);
    padding: 16px 12px;
    text-align: center;
    border: 0.5px solid rgba(17,17,17,0.08);
    border-bottom: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(17,17,17,0.05);
    min-width: 0;
    overflow: hidden;
}

.pool-gauge.ok       { border-bottom-color: var(--success); }
.pool-gauge.warning  { border-bottom-color: var(--gold); }
.pool-gauge.critical { border-bottom-color: var(--danger); }

.pool-gauge-label  { font-size: 11px; color: var(--graphite); margin-bottom: 8px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.pool-gauge-value  { font-family: var(--font-disp); font-size: 26px; font-weight: 800; letter-spacing: -1px; }
.pool-gauge.ok       .pool-gauge-value { color: var(--success); }
.pool-gauge.warning  .pool-gauge-value { color: var(--gold); }
.pool-gauge.critical .pool-gauge-value { color: var(--danger); }
.pool-gauge-ideal    { font-size: 10px; color: var(--graphite); margin-top: 4px; }

/* ══════════════════════════════════════════
   CALENDAR
══════════════════════════════════════════ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    background: var(--surface);
    border-radius: var(--r-card);
    padding: 16px;
    border: 0.5px solid rgba(17,17,17,0.08);
    box-shadow: 0 1px 6px rgba(17,17,17,0.05);
    margin-bottom: 20px;
}

.cal-header { text-align: center; font-size: 10px; font-weight: 600; color: var(--graphite); padding-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text);
}

.cal-day.today  { background: var(--gold); color: var(--black); font-weight: 700; }
.cal-day.booked { background: var(--gold-soft); color: #9A7B0A; font-weight: 600; }
.cal-day.empty  { color: rgba(17,17,17,0.25); }

/* ══════════════════════════════════════════
   BOUTONS
══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--r-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    padding: 15px 22px;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Bouton gold glossy ── */
.btn-primary {
    background: linear-gradient(
        180deg,
        #EDD253 0%,
        #D4AF37 40%,
        #B8960C 100%
    );
    color: #111111;
    font-weight: 700;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.35),
        inset 0 -1px 0 rgba(0,0,0,0.20),
        0 2px 8px rgba(212,175,55,0.30);
    text-shadow: 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:active {
    background: linear-gradient(180deg, #C9A42E 0%, #A88A0A 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.25);
}

.btn-secondary { background: var(--surface); color: var(--text); border: 0.5px solid rgba(17,17,17,0.12); }
.btn-success   { background: var(--success); color: var(--white); font-weight: 700; }
.btn-danger    { background: var(--danger); color: var(--white); }
.btn-large     { padding: 18px 26px; font-size: 16px; }
.btn-full      { width: 100%; }
.btn-outline   {
    background: transparent;
    color: #9A7B0A;
    border: 1px solid var(--gold-line);
    box-shadow: inset 0 1px 0 rgba(212,175,55,0.08);
}

.btn-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: 1px dashed var(--gold-line);
    border-radius: var(--r-sm);
    padding: 16px;
    color: #9A7B0A;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-photo:active { background: var(--gold-soft); }

/* FAB */
.fab {
    position: fixed;
    bottom: calc(var(--nav-h) + 16px);
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--black);
    font-size: 24px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(212,175,55,0.35);
    transition: transform 0.2s;
}
.fab:active { transform: scale(0.93); }

/* ══════════════════════════════════════════
   NAVIGATION BOTTOM — contexte sombre
══════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(17,17,17,0.97);
    border-top: 0.5px solid rgba(255,255,255,0.10);
    display: flex;
    z-index: 100;
    /* Safe area iOS */
    padding-bottom: env(safe-area-inset-bottom, 12px);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    padding: 10px 0 6px;
    transition: color 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.nav-btn.active { color: var(--gold); }

.nav-icon  { width: 22px; height: 22px; display: block; flex-shrink: 0; }
.nav-label { font-size: 10px; font-weight: 500; letter-spacing: 0.2px; }

.nav-badge {
    position: absolute;
    top: 8px;
    right: calc(50% - 20px);
    background: var(--danger);
    color: var(--white);
    border-radius: 9px;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}

/* ══════════════════════════════════════════
   MODALES / SHEETS — restent sombres
══════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-sheet {
    position: relative;
    background: #1C1C1E;
    border-radius: 28px 28px 0 0;
    border-top: 0.5px solid rgba(255,255,255,0.10);
    padding: 0 20px 40px;
    max-height: 80dvh;
    overflow-y: auto;
    animation: slideUp 0.32s cubic-bezier(0.32,0.72,0,1);
    /* Re-scoper pour contexte sombre */
    --surface: #2C2C2E;
    --surface-2: #3A3A3C;
    --bg: #1C1C1E;
    --text: #FFFFFF;
    --text-sub: #F2EDE5;
    --text-muted: #686868;
    --white-10: rgba(255,255,255,0.10);
    --white-06: rgba(255,255,255,0.08);
    --white-04: rgba(255,255,255,0.04);
}

.modal-sheet-tall { max-height: 92dvh; }

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    margin: 12px auto 20px;
}

.modal-sheet h3 {
    font-family: var(--font-disp);
    font-size: 20px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 22px;
    letter-spacing: -0.3px;
}

.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions .btn { flex: 1; }

/* ══════════════════════════════════════════
   FORMULAIRES
══════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ideal { font-weight: 400; color: var(--gold); text-transform: none; letter-spacing: 0; font-size: 11px; }

.form-input {
    width: 100%;
    background: var(--surface);
    border: 0.5px solid var(--white-10);
    border-radius: var(--r-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    padding: 14px 16px;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus { border-color: var(--gold); }
.form-input::placeholder { color: var(--graphite); }
.form-input-large { font-size: 18px; padding: 18px 20px; }

/* Inputs dans les modales sombres */
.modal-sheet .form-input {
    background: #2C2C2E;
    border-color: rgba(255,255,255,0.10);
    color: #FFFFFF;
}
.modal-sheet .form-input::placeholder { color: #686868; }
.modal-sheet .form-group label { color: #686868; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.param-indicator {
    height: 2px;
    border-radius: 1px;
    margin-top: 5px;
    background: rgba(17,17,17,0.08);
    transition: background 0.3s;
}
.param-indicator.ok       { background: var(--success); }
.param-indicator.warning  { background: var(--gold); }
.param-indicator.critical { background: var(--danger); }

/* ══════════════════════════════════════════
   PHOTOS
══════════════════════════════════════════ */
.photo-section { margin-bottom: 24px; }
.photo-section h4 { font-family: var(--font-disp); font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.modal-sheet .photo-section h4 { color: #FFFFFF; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.photo-thumb { aspect-ratio: 1; border-radius: var(--r-xs); object-fit: cover; width: 100%; border: 0.5px solid rgba(17,17,17,0.08); }

/* ══════════════════════════════════════════
   CONNEXION — reste sombre
══════════════════════════════════════════ */
.screen-login {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 28px;
    /* Contexte sombre pour les enfants */
    --surface: #1C1C1E;
    --surface-2: #2C2C2E;
    --text: #FFFFFF;
    --text-sub: #F2EDE5;
    --text-muted: #686868;
    --white-10: rgba(255,255,255,0.10);
    --white-06: rgba(255,255,255,0.08);
}

.login-container { width: 100%; max-width: 380px; }

/* Logo réel sur l'écran de connexion */
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}

.login-logo-img {
    width: 300px;
    height: auto;
    object-fit: contain;
}

.login-subtitle {
    font-size: 13px;
    font-weight: 300;
    color: #686868;
    text-align: center;
    margin-bottom: 36px;
    font-family: var(--font-disp);
    font-style: italic;
}

.form-login { display: flex; flex-direction: column; gap: 12px; }

/* Inputs dans le login (dark) */
.screen-login .form-input {
    background: #1C1C1E;
    border-color: rgba(255,255,255,0.10);
    color: #FFFFFF;
}
.screen-login .form-input::placeholder { color: #686868; }
.screen-login .form-group label { color: #686868; }

.error-message {
    background: rgba(207,74,74,0.10);
    border: 0.5px solid rgba(207,74,74,0.30);
    border-radius: var(--r-xs);
    padding: 12px 16px;
    color: var(--danger);
    font-size: 13px;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 10px;
    color: #686868;
    letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════
   FILTRES / TABS
══════════════════════════════════════════ */
.filter-tabs {
    display: flex;
    background: var(--surface);
    border-radius: 10px;
    padding: 3px;
    margin-top: 12px;
    border: 0.5px solid rgba(17,17,17,0.08);
}

.filter-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--graphite);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab.active {
    background: var(--surface-2);
    color: var(--text);
    font-weight: 600;
}

/* ══════════════════════════════════════════
   MONTH NAV
══════════════════════════════════════════ */
.month-nav { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
#current-month-label { font-family: var(--font-disp); font-size: 15px; font-weight: 600; color: var(--text); min-width: 120px; text-align: center; }

/* ══════════════════════════════════════════
   TOAST — reste sombre
══════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: calc(var(--nav-h) + 12px);
    left: 16px; right: 16px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: #2C2C2E;
    border: 0.5px solid rgba(255,255,255,0.10);
    border-radius: var(--r-sm);
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    animation: slideUp 0.3s ease;
    pointer-events: all;
    color: var(--cream);
}

.toast.success { border-color: rgba(58,150,104,0.35); }
.toast.error   { border-color: rgba(207,74,74,0.35);  }
.toast.warning { border-color: rgba(212,175,55,0.35); color: var(--gold); }

/* ══════════════════════════════════════════
   LOADING
══════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(242,237,229,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    backdrop-filter: blur(8px);
}
.loading-overlay.active { opacity: 1; pointer-events: all; }

.loading-spinner {
    width: 36px; height: 36px;
    border: 1.5px solid rgba(17,17,17,0.10);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-family: var(--font-disp);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--graphite);
    text-transform: uppercase;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════
   BACK BUTTON
══════════════════════════════════════════ */
.back-btn {
    background: none;
    border: none;
    color: #9A7B0A;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ══════════════════════════════════════════
   VILLA OPTION MODAL
══════════════════════════════════════════ */
.villa-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: var(--r-sm);
    cursor: pointer;
    border: 0.5px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
    background: #2C2C2E;
    transition: border-color 0.2s;
}
.villa-option.active  { border-color: var(--gold); }
.villa-option-name    { font-family: var(--font-disp); font-weight: 700; font-size: 15px; color: #FFFFFF; }
.villa-option-meta    { font-size: 12px; color: var(--graphite); margin-top: 2px; }
.villa-option .check  { color: var(--gold); margin-left: auto; font-size: 16px; }
.villa-option-icon    { font-size: 22px; }

/* ══════════════════════════════════════════
   RECOMMENDATIONS PISCINE
══════════════════════════════════════════ */
.recommendations { margin-bottom: 20px; }

.recommendation-item {
    background: var(--surface);
    border: 0.5px solid rgba(17,17,17,0.08);
    border-radius: var(--r-sm);
    padding: 13px 15px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-sub);
    box-shadow: 0 1px 4px rgba(17,17,17,0.04);
}

/* ══════════════════════════════════════════
   MISC
══════════════════════════════════════════ */
.loading-placeholder { color: var(--graphite); font-size: 13px; padding: 10px 0; font-style: italic; }

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(17,17,17,0.15); border-radius: 2px; }

/* Sélection */
::selection { background: rgba(212,175,55,0.30); color: var(--black); }

/* Desktop centrage */
@media (min-width: 768px) {
    .app-content { max-width: 480px; margin: 0 auto; }
    .bottom-nav  { max-width: 480px; left: 50%; transform: translateX(-50%); right: auto; width: 480px; }
    .app-header  { max-width: 480px; left: 50%; transform: translateX(-50%); right: auto; width: 480px; }
    .fab         { right: calc(50% - 240px + 20px); }
    .toast-container { max-width: 480px; left: 50%; transform: translateX(-50%); right: auto; }
}

/* ══════════════════════════════════════════
   SPLASH SCREEN
══════════════════════════════════════════ */
.splash-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #111111;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.splash-screen.out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo-wrap {
    animation: splashLogoIn 0.85s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
    opacity: 0;
}

@keyframes splashLogoIn {
    from { opacity: 0; transform: scale(0.65); }
    to   { opacity: 1; transform: scale(1); }
}

.splash-logo-img {
    width: 200px;
    height: auto;
    object-fit: contain;
    display: block;
}

.splash-tagline {
    font-family: var(--font-disp);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 3.5px;
    color: rgba(255,255,255,0.30);
    text-transform: uppercase;
    animation: splashFadeUp 0.7s 0.45s ease forwards;
    opacity: 0;
}

@keyframes splashFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.splash-dots {
    display: flex;
    gap: 7px;
    animation: splashFadeUp 0.7s 0.65s ease forwards;
    opacity: 0;
}

.splash-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    animation: dotPulse 1.3s ease infinite;
}
.splash-dot:nth-child(2) { animation-delay: 0.22s; }
.splash-dot:nth-child(3) { animation-delay: 0.44s; }

@keyframes dotPulse {
    0%, 100% { opacity: 0.20; transform: scale(0.75); }
    50%       { opacity: 1;    transform: scale(1.1); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ══════════════════════════════════════════
   FORMULAIRES — upload photo / reçu
══════════════════════════════════════════ */
.form-input-file {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--white);
    border: 1.5px solid var(--white-10);
    border-radius: var(--r-sm);
    color: var(--text);
    cursor: pointer;
}
.form-input-file::file-selector-button {
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--gold-line);
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.2s;
}
.form-input-file::file-selector-button:hover { background: rgba(212,175,55,0.22); }

.photo-preview-mini {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.photo-preview-mini img {
    max-height: 80px;
    max-width: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1.5px solid var(--gold-line);
}

/* Badge rôle dans profil */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-concierge { background: rgba(58,150,104,.12); color: var(--success); }
.badge-owner     { background: var(--gold-soft); color: #8B6914; }
.badge-super_admin { background: rgba(207,74,74,.10); color: var(--danger); }
.badge-employee  { background: rgba(104,104,104,.12); color: var(--graphite); }
