/* ============================================================
   RedKey — Feuille de style
   Direction : Minimal Vintage
   Papier crème, serif classique, hairlines chaudes, rouge en accent
   ============================================================ */

:root {
    --red: #B91C1C;
    --red-dark: #7F1D1D;
    --red-hover: #9B1B1B;
    --red-soft: #FBF1EE;
    --red-border: #E9CFC7;
    --red-accent: #C87F72;

    --bg: #F7F3EB;          /* papier crème */
    --paper: #FFFDF8;       /* cartes */
    --paper-deep: #F1EBDF;  /* zones secondaires */
    --text: #2B2622;        /* brun-noir chaud */
    --text-muted: #756A5D;  /* AA sur fond crème */
    --border: #E4DBCC;      /* hairline chaude */
    --border-strong: #D5C9B6;

    --success: #3D6849;
    --success-bg: #EFF4EC;
    --info: #3A567C;
    --info-bg: #EDF1F6;
    --sky: #40647D;
    --sky-bg: #ECF2F5;
    --warning: #8A5722;
    --warning-bg: #F9F1E4;
    --violet: #6C4D7B;
    --violet-bg: #F3EEF6;
    --neutral: #6E675D;
    --neutral-bg: #F0EDE7;
    --danger: #A93226;
    --danger-bg: #F9ECE9;

    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Jost", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

    --radius: 4px;
    --shadow-hover: 0 3px 14px rgba(72, 60, 45, 0.08);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --sidebar-w: 240px;
}

* { box-sizing: border-box; }

html { font-size: 15.5px; }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: 0;
    color: var(--text);
}

::selection { background: rgba(185, 28, 28, 0.14); }

/* Focus clavier visible (a11y) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[draggable]:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Scrollbars fins */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* Étiquette vintage : petites capitales espacées */
.overline,
.stat-label,
.data-table th,
.pipeline-col-title,
.section-subtitle,
label {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 500;
}

/* ============ Layout ============ */

.layout { display: flex; min-height: 100vh; }

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content {
    padding: 30px 32px 48px;
    flex: 1;
    max-width: 1400px;
    width: 100%;
}

/* ============ Sidebar — papier clair ============ */

.sidebar {
    width: var(--sidebar-w);
    background: var(--paper);
    color: var(--text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--border);
}

.sidebar-brand {
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.sidebar-brand-link:hover { text-decoration: none; }

.sidebar-logo-wrap {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

.sidebar-brand-text {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
}

.brand-key { color: var(--red); }

.sidebar-nav {
    padding: 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: block;
    padding: 10px 13px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
    background: var(--red-soft);
    color: var(--red-dark);
    text-decoration: none;
}

.nav-link.active {
    background: var(--red-soft);
    color: var(--red);
    font-weight: 600;
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding: 12px 14px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 13px 12px;
}

.sidebar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--red-soft);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
    border: 1px solid var(--red-border);
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43, 38, 34, 0.45);
    z-index: 90;
}

/* ============ Topbar ============ */

.topbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 66px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-logo {
    display: none;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.topbar-title {
    font-size: 1.45rem;
    flex: 1;
    font-style: normal;
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius);
}

.burger:hover { background: var(--red-soft); }

.burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
}

/* ============ Boutons ============ */

.btn {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.86rem;
    font-weight: 600;
    font-family: var(--sans);
    letter-spacing: 0.04em;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
    line-height: 1.35;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary {
    background: var(--red);
    color: #FFFDF8;
}
.btn-primary:hover { background: var(--red-hover); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--red-border);
}
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-block { display: block; width: 100%; }

.inline-form { display: inline; }

/* ============ Cartes ============ */

.card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.card-header h2 { font-size: 1.18rem; }

.card-link {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.empty-state {
    color: var(--text-muted);
    text-align: center;
    padding: 32px 12px;
    margin: 0;
    font-style: italic;
}

.empty-state::before {
    content: "";
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    background: url('/assets/img/logo_icon.png') center / contain no-repeat;
    opacity: 0.15;
    filter: grayscale(35%);
}

/* ============ Stats dashboard ============ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.stat-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    color: var(--text);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.stat-card:hover {
    text-decoration: none;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hover);
}

.stat-value {
    font-family: var(--serif);
    font-size: 2.1rem;
    font-weight: 600;
    color: var(--red);
    line-height: 1.1;
}

.stat-alert .stat-value { color: var(--red-dark); }

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.stat-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.05rem;
    color: var(--border-strong);
    transition: color 0.18s;
}

.stat-card:hover .stat-icon { color: var(--red-accent); }
.stat-alert .stat-icon { color: var(--red-accent); }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 18px;
}

.dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dash-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    transition: background 0.12s;
}

.dash-list li:hover { background: var(--red-soft); }
.dash-list li:last-child { border-bottom: none; }

.dash-list-main { flex: 1; min-width: 140px; font-weight: 500; }
.dash-list-meta { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }

.text-danger { color: var(--danger); }

/* ============ Badges — étiquettes vintage ============ */

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.7;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border: 1px solid;
}

/* Priorités tâches */
.badge-prio-basse    { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }
.badge-prio-moyenne  { background: var(--warning-bg); color: var(--warning); border-color: #E8D3B4; }
.badge-prio-urgente  { background: var(--danger-bg); color: var(--danger); border-color: var(--red-border); }

/* Statuts tâches */
.badge-statut-a_faire  { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }
.badge-statut-en_cours { background: var(--info-bg); color: var(--info); border-color: #CBD7E6; }
.badge-statut-termine  { background: var(--success-bg); color: var(--success); border-color: #CCDCC9; }

/* Statuts biens */
.badge-bien-disponible    { background: var(--success-bg); color: var(--success); border-color: #CCDCC9; }
.badge-bien-visite_prevue { background: var(--info-bg); color: var(--info); border-color: #CBD7E6; }
.badge-bien-offre_recue   { background: var(--warning-bg); color: var(--warning); border-color: #E8D3B4; }
.badge-bien-vendu         { background: var(--red-soft); color: var(--red-dark); border-color: var(--red-border); }
.badge-bien-archive       { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }

/* Statuts clients */
.badge-client-nouveau       { background: var(--info-bg); color: var(--info); border-color: #CBD7E6; }
.badge-client-a_rappeler    { background: var(--warning-bg); color: var(--warning); border-color: #E8D3B4; }
.badge-client-visite_prevue { background: var(--sky-bg); color: var(--sky); border-color: #CBDCE5; }
.badge-client-offre_faite   { background: var(--violet-bg); color: var(--violet); border-color: #DCD0E3; }
.badge-client-perdu         { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }
.badge-client-acheteur      { background: var(--success-bg); color: var(--success); border-color: #CCDCC9; }

/* Niveaux d'intérêt */
.badge-interet-faible { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }
.badge-interet-moyen  { background: var(--warning-bg); color: var(--warning); border-color: #E8D3B4; }
.badge-interet-fort   { background: var(--danger-bg); color: var(--danger); border-color: var(--red-border); }

/* Étapes pipeline */
.badge-etape-nouveau_contact { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }
.badge-etape-interesse       { background: var(--info-bg); color: var(--info); border-color: #CBD7E6; }
.badge-etape-visite_prevue   { background: var(--sky-bg); color: var(--sky); border-color: #CBDCE5; }
.badge-etape-offre_recue     { background: var(--warning-bg); color: var(--warning); border-color: #E8D3B4; }
.badge-etape-negociation     { background: var(--violet-bg); color: var(--violet); border-color: #DCD0E3; }
.badge-etape-vendu           { background: var(--success-bg); color: var(--success); border-color: #CCDCC9; }
.badge-etape-perdu           { background: var(--neutral-bg); color: var(--neutral); border-color: #DDD8CF; }

.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--red-border); }
.badge-type   { background: var(--paper-deep); color: var(--text); border-color: var(--border-strong); }

.tag {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 2px 9px;
    font-size: 0.8rem;
    margin: 1px 2px 1px 0;
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}
.tag:hover { border-color: var(--red); background: var(--red-soft); text-decoration: none; }

/* ============ Flash ============ */

.flash {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 0.9rem;
    border: 1px solid;
    transition: opacity 0.4s;
    animation: flash-in 0.25s ease;
}

@keyframes flash-in {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.flash-success { background: var(--success-bg); color: var(--success); border-color: #CCDCC9; }
.flash-error   { background: var(--danger-bg); color: var(--danger); border-color: var(--red-border); }
.flash-warning { background: var(--warning-bg); color: var(--warning); border-color: #E8D3B4; }

/* ============ Page actions / filtres ============ */

.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.page-actions > div { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.filter-tabs {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper);
}

.filter-tab {
    padding: 7px 15px;
    border-right: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 550;
    letter-spacing: 0.04em;
    transition: color 0.15s, background 0.15s;
}

.filter-tab:last-child { border-right: none; }

.filter-tab:hover { color: var(--red); background: var(--red-soft); text-decoration: none; }

.filter-tab.active {
    background: var(--red);
    color: #FFFDF8;
}

.filter-tab i { font-size: 0.78em; margin-right: 3px; opacity: 0.85; }

.page-hint {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0 0 18px;
    font-style: italic;
}

/* ============ Tables ============ */

.table-card { padding: 0; overflow: hidden; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    text-align: left;
    padding: 13px 18px;
    background: var(--paper-deep);
    color: var(--text-muted);
    font-size: 0.68rem;
    border-bottom: 1px solid var(--border-strong);
}

.data-table td {
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: var(--red-soft); }

.table-sub { color: var(--text-muted); font-size: 0.82rem; }

.row-done { opacity: 0.5; }
.row-done td strong { text-decoration: line-through; }

.col-actions { text-align: right; white-space: nowrap; }
.col-check { width: 46px; }

.check-btn {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: transparent;
    color: transparent;
    cursor: pointer;
    font-size: 0.8rem;
    line-height: 1;
    transition: all 0.15s;
}

.check-btn:hover { border-color: var(--success); color: var(--success); }

.check-btn.checked {
    background: var(--success);
    border-color: var(--success);
    color: var(--paper);
}

/* ============ Grille de biens ============ */

.prop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 16px;
}

.prop-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.prop-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hover);
}

.prop-card-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.prop-card-title { font-size: 1.15rem; line-height: 1.3; }
.prop-card-title a { color: var(--text); }
.prop-card-title a:hover { color: var(--red); text-decoration: none; }

.prop-card-addr {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.prop-card-specs {
    display: flex;
    gap: 14px;
    align-items: baseline;
    font-size: 0.88rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.prop-price {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--red);
}

.prop-card-visit {
    font-size: 0.84rem;
    color: var(--red-dark);
    background: var(--red-soft);
    border: 1px solid var(--red-border);
    border-radius: var(--radius);
    padding: 6px 10px;
    margin: 0;
    font-weight: 500;
}

.prop-card-footer { margin-top: auto; padding-top: 8px; }

/* ============ Galerie photos ============ */

.gallery-hero {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    background: var(--paper-deep);
}

.gallery-hero img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.gallery-hero:hover img { transform: scale(1.03); }

.gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    aspect-ratio: 3 / 2;
    background: var(--paper-deep);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
}

.gallery-empty i { font-size: 1.8rem; opacity: 0.5; }

.gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    display: block;
}

.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.is-principale { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }

.gallery-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}

.gallery-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    color: var(--text);
    margin: 0;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.gallery-upload-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

.gallery-upload-hint { font-size: 0.78rem; color: var(--text-muted); font-style: italic; }

.gallery-manage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.gallery-manage-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-deep);
    aspect-ratio: 4 / 3;
    margin: 0;
    border: 1px solid var(--border);
    transition: border-color 0.15s;
}

.gallery-manage-item.is-principale {
    border-color: var(--red);
    box-shadow: 0 0 0 1px var(--red);
}

.gallery-manage-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge "Principale" en coin */
.gallery-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--red);
    color: #FFFDF8;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(43, 38, 34, 0.3);
}

.gallery-badge i { font-size: 0.62rem; }

/* Actions en pastilles, révélées au survol (toujours visibles au tactile) */
.gallery-item-actions {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.gallery-manage-item:hover .gallery-item-actions,
.gallery-manage-item:focus-within .gallery-item-actions {
    opacity: 1;
    transform: translateY(0);
}

.gallery-act {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 253, 248, 0.92);
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(43, 38, 34, 0.25);
    transition: background 0.15s, color 0.15s, transform 0.12s;
}

.gallery-act:hover { background: #FFF; transform: scale(1.08); }
.gallery-act:active { transform: scale(0.96); }
.gallery-act i { margin: 0; }

.gallery-act-danger:hover { background: var(--danger); color: #FFFDF8; }

/* Toujours visibles sur écrans tactiles (pas de survol) */
@media (hover: none) {
    .gallery-item-actions { opacity: 1; transform: none; }
}

/* Vignette sur les cartes de la liste */
.prop-card-cover {
    display: block;
    margin: -20px -22px 4px;
    border-radius: var(--radius) var(--radius) 0 0;
    overflow: hidden;
    position: relative;
    background: var(--paper-deep);
    border-bottom: 1px solid var(--border);
}

.prop-card-cover img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.prop-card:hover .prop-card-cover img { transform: scale(1.04); }

.prop-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    color: var(--border-strong);
    font-size: 2rem;
}

.prop-card-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(43, 38, 34, 0.72);
    color: #FFF;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============ Lightbox ============ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(30, 26, 22, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: backdrop-in 0.18s ease;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(43, 38, 34, 0.55);
    border: 1px solid rgba(255, 253, 248, 0.18);
    color: #FFFDF8;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.15s, transform 0.12s, border-color 0.15s;
}

.lightbox-close i,
.lightbox-nav i { line-height: 1; }

.lightbox-close {
    top: 22px;
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 1.15rem;
}

.lightbox-prev { left: 22px; }
.lightbox-next { right: 22px; }

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(43, 38, 34, 0.85);
    border-color: rgba(255, 253, 248, 0.4);
}

.lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox-close:active,
.lightbox-nav:active { transform: translateY(-50%) scale(0.96); }
.lightbox-close:active { transform: scale(0.96); }

@media (max-width: 768px) {
    .lightbox-nav { width: 44px; height: 44px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 12px; right: 14px; }
}

/* ============ Fiches ============ */

.fiche-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr;
    gap: 18px;
    align-items: start;
}

.detail-list {
    display: grid;
    grid-template-columns: 138px 1fr;
    gap: 10px 14px;
    margin: 0;
}

.detail-list dt {
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    padding-top: 2px;
}

.detail-list dt i {
    color: var(--red-accent);
    margin-right: 6px;
    width: 14px;
    text-align: center;
    font-size: 0.9em;
}

.detail-list dd { margin: 0; font-size: 0.93rem; }

.detail-price {
    font-family: var(--serif);
    font-weight: 600;
    color: var(--red);
    font-size: 1.05rem !important;
}

.section-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 22px 0 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
}

.text-block { margin: 0; font-size: 0.92rem; }

.text-notes {
    background: var(--paper-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 11px 13px;
    font-style: italic;
}

.fiche-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.task-done { text-decoration: line-through; opacity: 0.6; }

/* ============ Liaisons client-bien ============ */

.link-list { display: flex; flex-direction: column; gap: 12px; }

.link-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--paper);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.link-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-hover); }

.link-item-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 5px;
}

.link-item-name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.02rem;
}

.link-item-meta {
    display: flex;
    gap: 14px;
    font-size: 0.84rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.link-item-action {
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 550;
    color: var(--red-dark);
}

.link-item-visite {
    margin-top: 7px;
    font-size: 0.85rem;
    font-weight: 550;
    color: var(--sky);
}

.link-item-visite i { color: var(--sky); font-size: 0.78rem; }

.link-item-note {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--paper-deep);
    border-radius: var(--radius);
    padding: 8px 11px;
    font-style: italic;
}

.link-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.link-item-footer > div { display: flex; gap: 6px; }

.link-item-date { font-size: 0.76rem; color: var(--text-muted); font-style: italic; }

/* ============ Pipeline ============ */

.pipeline {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 14px;
    align-items: flex-start;
}

.pipeline-col {
    background: var(--paper-deep);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 242px;
    width: 242px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 215px);
    transition: border-color 0.15s, background 0.15s;
}

.pipeline-col.drag-over {
    border-color: var(--red);
    background: var(--red-soft);
}

.pipeline-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 2px solid var(--red);
    background: var(--paper);
    border-radius: var(--radius) var(--radius) 0 0;
}

.pipeline-col-nouveau_contact .pipeline-col-head { border-bottom-color: var(--neutral); }
.pipeline-col-interesse .pipeline-col-head       { border-bottom-color: var(--info); }
.pipeline-col-visite_prevue .pipeline-col-head   { border-bottom-color: var(--sky); }
.pipeline-col-offre_recue .pipeline-col-head     { border-bottom-color: var(--warning); }
.pipeline-col-negociation .pipeline-col-head     { border-bottom-color: var(--violet); }
.pipeline-col-vendu .pipeline-col-head           { border-bottom-color: var(--success); }
.pipeline-col-perdu .pipeline-col-head           { border-bottom-color: var(--neutral); }

.pipeline-col-title {
    font-size: 0.7rem;
    color: var(--text);
}

.pipeline-col-count {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0 7px;
}

.pipeline-col-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    overflow-y: auto;
    min-height: 70px;
    flex: 1;
}

.pipeline-card {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    cursor: grab;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.pipeline-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-hover);
}

.pipeline-card:active { cursor: grabbing; }
.pipeline-card.dragging { opacity: 0.35; }

.pipeline-card-client {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 0.97rem;
}
.pipeline-card-client a { color: var(--text); }
.pipeline-card-client a:hover { color: var(--red); }

.pipeline-card-bien { font-size: 0.83rem; margin-top: 3px; }

.pipeline-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}

.pipeline-card-prix {
    font-family: var(--serif);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--red);
}

.pipeline-card-action {
    margin-top: 9px;
    font-size: 0.8rem;
    color: var(--red-dark);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    font-weight: 500;
}

/* ============ Formulaires ============ */

.form-group { margin-bottom: 16px; flex: 1; }

.form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.form-row .form-group { min-width: 130px; }

label {
    display: block;
    font-size: 0.7rem;
    margin-bottom: 6px;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    font-size: 0.92rem;
    font-family: var(--sans);
    background: var(--paper);
    color: var(--text);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

input::placeholder, textarea::placeholder { color: #B5AB9E; font-style: italic; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.10);
}

textarea { resize: vertical; }

/* ============ Modales ============ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 44px 16px;
    overflow-y: auto;
}

.modal[hidden] { display: none; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(43, 38, 34, 0.5);
    animation: backdrop-in 0.18s ease;
}

@keyframes backdrop-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-dialog {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    padding: 26px;
    box-shadow: 0 18px 50px rgba(43, 38, 34, 0.22);
    animation: dialog-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dialog-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-lg { max-width: 680px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 1.25rem; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px 9px;
    border-radius: var(--radius);
    transition: color 0.15s, background 0.15s;
}

.modal-close:hover { color: var(--red); background: var(--red-soft); }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

body.modal-open { overflow: hidden; }

/* ============ Dialogue de confirmation ============ */

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 320;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.confirm-modal[hidden] { display: none; }

.confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(43, 38, 34, 0.5);
    animation: backdrop-in 0.18s ease;
}

.confirm-dialog {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    width: 100%;
    max-width: 380px;
    padding: 26px 24px 22px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(43, 38, 34, 0.28);
    animation: dialog-in 0.2s var(--ease);
}

.confirm-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--danger-bg);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.confirm-msg {
    margin: 0 0 22px;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-actions .btn { min-width: 120px; }

@media (max-width: 480px) {
    .confirm-actions { flex-direction: column-reverse; }
    .confirm-actions .btn { width: 100%; }
}

/* ============ Pages auth (login / install) ============ */

.auth-body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
    font-family: var(--sans);
    color: var(--text);
}

.auth-card {
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 40px 34px 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 40px rgba(43, 38, 34, 0.10);
    animation: dialog-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-logo-img {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto 12px;
}

.auth-logo {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-logo .brand-key { color: var(--red); }

.auth-title {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 14px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin: 0 0 26px;
    font-style: italic;
    letter-spacing: 0.02em;
}

/* ============ Selects à icônes ============ */

.iselect { position: relative; }

.iselect-native {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.iselect-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.92rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.iselect-btn:hover { border-color: var(--red-accent); }

.iselect.open .iselect-btn {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.10);
}

.iselect-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iselect-icon {
    width: 17px;
    text-align: center;
    color: var(--red);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.iselect-caret {
    color: var(--text-muted);
    font-size: 0.72rem;
    transition: transform 0.2s var(--ease);
    flex-shrink: 0;
}

.iselect.open .iselect-caret { transform: rotate(180deg); }

.iselect-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--paper);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: 0 8px 26px rgba(43, 38, 34, 0.16);
    padding: 4px;
    max-height: 260px;
    overflow-y: auto;
    animation: iselect-in 0.14s var(--ease);
}

@keyframes iselect-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.iselect-opt {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background 0.12s;
}

.iselect-opt:hover { background: var(--red-soft); }

.iselect-opt.selected {
    background: var(--red-soft);
    color: var(--red-dark);
    font-weight: 600;
}

.iselect-opt .iselect-icon { color: var(--red-accent); }
.iselect-opt.selected .iselect-icon { color: var(--red); }

/* Icône dans les libellés de formulaire */
.form-group label i {
    color: var(--red-accent);
    margin-right: 5px;
    font-size: 0.82em;
    width: 14px;
    text-align: center;
}

/* ============ Icônes dans les badges ============ */

.badge::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 5px;
    font-size: 0.92em;
    display: inline-block;
}

.badge-prio-basse::before        { content: "\f107"; }
.badge-prio-moyenne::before      { content: "\f52c"; }
.badge-prio-urgente::before      { content: "\f06d"; }

.badge-statut-a_faire::before    { content: "\f192"; }
.badge-statut-en_cours::before   { content: "\f110"; }
.badge-statut-termine::before    { content: "\f058"; }

.badge-bien-disponible::before    { content: "\f058"; }
.badge-bien-visite_prevue::before { content: "\f783"; }
.badge-bien-offre_recue::before   { content: "\f4c0"; }
.badge-bien-vendu::before         { content: "\f084"; }
.badge-bien-archive::before       { content: "\f187"; }

.badge-client-nouveau::before       { content: "\f234"; }
.badge-client-a_rappeler::before    { content: "\f095"; }
.badge-client-visite_prevue::before { content: "\f783"; }
.badge-client-offre_faite::before   { content: "\f573"; }
.badge-client-perdu::before         { content: "\f506"; }
.badge-client-acheteur::before      { content: "\f2b5"; }

.badge-interet-faible::before { content: "\f76b"; }
.badge-interet-moyen::before  { content: "\f2c9"; }
.badge-interet-fort::before   { content: "\f06d"; }

.badge-etape-nouveau_contact::before { content: "\f234"; }
.badge-etape-interesse::before       { content: "\f06e"; }
.badge-etape-visite_prevue::before   { content: "\f783"; }
.badge-etape-offre_recue::before     { content: "\f4c0"; }
.badge-etape-negociation::before     { content: "\f24e"; }
.badge-etape-vendu::before           { content: "\f084"; }
.badge-etape-perdu::before           { content: "\f00d"; }

.badge-type::before   { content: "\f02b"; }
.badge-danger::before { content: "\f071"; }
.badge-vous::before   { content: "\f007"; }
.badge-vous { background: var(--red-soft); color: var(--red); border-color: var(--red-border); }

/* ============ Icônes Font Awesome ============ */

.nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 11px;
    font-size: 0.88rem;
    opacity: 0.85;
}

.nav-link.active i { color: var(--red); opacity: 1; }

.btn i { margin-right: 7px; font-size: 0.88em; }
.btn-sm i { margin-right: 5px; }

.card-header h2 i {
    color: var(--red-accent);
    margin-right: 10px;
    font-size: 0.75em;
    width: 20px;
    text-align: center;
    vertical-align: 2px;
}

.tag i { margin-right: 5px; color: var(--red); font-size: 0.72rem; }

.link-item-meta i { color: var(--red-accent); font-size: 0.78rem; }

.check-btn i { font-size: 0.7rem; }

.prop-card-visit i { margin-right: 5px; color: var(--red-accent); }

.pipeline-card-bien i { color: var(--red-accent); font-size: 0.72rem; margin-right: 3px; }

/* ============ Responsive ============ */

@media (max-width: 900px) {
    .fiche-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .burger { display: block; }
    .topbar-logo { display: block; }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        height: 100%;
        box-shadow: 4px 0 24px rgba(43, 38, 34, 0.15);
    }

    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.visible { display: block; }

    .content { padding: 18px 14px 36px; }
    .topbar { padding: 0 14px; height: 60px; }
    .topbar-title { font-size: 1.2rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dash-grid { grid-template-columns: 1fr; }

    /* Tables → cartes empilées */
    .data-table thead { display: none; }

    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        border-bottom: 1px solid var(--border);
        padding: 12px 16px;
    }

    .data-table td {
        border: none;
        padding: 4px 0;
    }

    .data-table td[data-label]::before {
        content: attr(data-label) " : ";
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.78rem;
    }

    .col-actions { text-align: left; padding-top: 10px; }
    .col-check { width: auto; }

    .page-actions { flex-direction: column; align-items: stretch; }
    .page-actions .btn { width: 100%; }
    .page-actions > div { flex-direction: column; align-items: stretch; }
    .page-actions > div .btn, .page-actions > div .inline-form { width: 100%; }
    .page-actions .inline-form .btn { width: 100%; }

    .filter-tabs { width: 100%; }
    .filter-tab { flex: 1; text-align: center; }

    .pipeline-col { min-width: 82vw; width: 82vw; }

    .modal { padding: 14px 10px; }
    .modal-dialog { padding: 20px 16px; }
    .modal-footer { flex-direction: column-reverse; }
    .modal-footer .btn { width: 100%; }

    .auth-card { padding: 30px 22px 26px; }
}

/* ============ Transitions de page & apparition ============ */

/* Transition entre pages (navigation same-origin) — Chrome/Brave/Edge.
   Fallback silencieux sur les navigateurs non compatibles. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 170ms;
    animation-timing-function: var(--ease);
}
::view-transition-old(root) { animation-name: rk-page-out; }
::view-transition-new(root) { animation-name: rk-page-in; }

@keyframes rk-page-out {
    to { opacity: 0; }
}
@keyframes rk-page-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Apparition douce des blocs au chargement */
@keyframes rk-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.card,
.stat-card {
    animation: rk-fade-up 180ms var(--ease) both;
}

/* Léger décalage en cascade sur les compteurs du tableau de bord */
.stats-grid .stat-card:nth-child(1) { animation-delay: 0ms; }
.stats-grid .stat-card:nth-child(2) { animation-delay: 45ms; }
.stats-grid .stat-card:nth-child(3) { animation-delay: 90ms; }
.stats-grid .stat-card:nth-child(4) { animation-delay: 135ms; }
.stats-grid .stat-card:nth-child(5) { animation-delay: 180ms; }

/* Réduction des animations si demandé par l'OS */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}
