/* ==========================================================================
   FAMILY GIFTS — Design System Moderne, Chaleureux & Responsive (Mobile-First)
   ========================================================================== */

:root {
    /* Palette Mode Clair (Chaleureuse & Familiale) */
    --bg-body: #FAF7F2;
    --bg-surface: #FFFFFF;
    --bg-elevated: #F3EDE4;
    --bg-subtle: #EFE8DC;
    --bg-glass: rgba(255, 255, 255, 0.88);

    --text-primary: #231F1E;
    --text-secondary: #5C534E;
    --text-muted: #8C817A;
    --text-inverse: #FFFFFF;

    --primary: #C85A32;
    --primary-hover: #B04923;
    --primary-soft: #FCEEE8;
    --primary-border: #F4CBB9;

    --secondary: #2E6F5E;
    --secondary-hover: #23584A;
    --secondary-soft: #E6F3EF;

    --accent-gold: #D48C1C;
    --accent-gold-soft: #FDF4E3;

    --accent-surprise: #6E48AA;
    --accent-surprise-soft: #F1EBF9;

    --danger: #C93B3B;
    --danger-soft: #FDECEC;

    --success: #2B7A4B;
    --success-soft: #E7F5EC;

    --border-color: #E6DEC8;
    --border-subtle: #EFE9DF;

    --shadow-sm: 0 2px 8px rgba(35, 31, 30, 0.05);
    --shadow-md: 0 8px 24px rgba(35, 31, 30, 0.08);
    --shadow-lg: 0 16px 40px rgba(35, 31, 30, 0.14);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-pill: 9999px;

    --transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", serif;
}

/* Mode Sombre */
[data-theme="dark"] {
    --bg-body: #131518;
    --bg-surface: #1C1F24;
    --bg-elevated: #252930;
    --bg-subtle: #2D323B;
    --bg-glass: rgba(28, 31, 36, 0.90);

    --text-primary: #F5F2ED;
    --text-secondary: #B8B2A9;
    --text-muted: #827C74;
    --text-inverse: #131518;

    --primary: #E5744B;
    --primary-hover: #F08761;
    --primary-soft: rgba(229, 116, 75, 0.16);
    --primary-border: rgba(229, 116, 75, 0.35);

    --secondary: #48A88E;
    --secondary-hover: #5BBBA1;
    --secondary-soft: rgba(72, 168, 142, 0.16);

    --accent-gold: #F0B44C;
    --accent-gold-soft: rgba(240, 180, 76, 0.16);

    --accent-surprise: #A37EE0;
    --accent-surprise-soft: rgba(163, 126, 224, 0.16);

    --danger: #E85C5C;
    --danger-soft: rgba(232, 92, 92, 0.16);

    --success: #46B473;
    --success-soft: rgba(70, 180, 115, 0.16);

    --border-color: #2E333D;
    --border-subtle: #242830;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.50);
}

/* Adaptation visuelle discrète aux périodes de Noël */
body.christmas-season .app-header {
    border-top: 3px solid var(--secondary);
    background-image: radial-gradient(circle at 90% 0%, var(--secondary-soft), transparent 45%);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.55;
    min-height: 100vh;
    padding-bottom: 84px; /* Espace pour la navigation mobile */
    transition: background-color 0.25s ease, color 0.25s ease;
}

@media (min-width: 960px) {
    body {
        padding-bottom: 32px;
    }
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
}

/* En-tête de l'application */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #E07A5F);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 0.35rem;
}

@media (min-width: 960px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--transition);
    position: relative;
}

.nav-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-elevated);
    transform: translateY(-1px);
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
}

/* Barre de navigation inférieure Mobile */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 110;
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

@media (min-width: 960px) {
    .mobile-bottom-nav {
        display: none;
    }
}

.mobile-nav-item {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex: 1;
    position: relative;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* Conteneur principal */
.main-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

@media (min-width: 768px) {
    .main-container {
        padding: 1.75rem 1.75rem 3rem;
    }
}

/* Bannière Héro / Tableau de bord */
.hero-banner {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 860px) {
    .hero-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 2rem 2.25rem;
    }
}

.hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.countdown-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--secondary-soft);
    border: 1px solid rgba(46, 111, 94, 0.25);
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    color: var(--secondary);
    flex-shrink: 0;
}

.countdown-days {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
}

/* Grille d'accès rapides */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .quick-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .quick-links-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.quick-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.quick-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.quick-card-title {
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--text-primary);
}

.quick-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sections & Titres */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Cartes Membres de la Famille */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2.25rem;
}

.member-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.member-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.avatar-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft), var(--bg-elevated));
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

/* Grille de Wishlists */
.wishlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.1rem;
    margin-bottom: 2rem;
}

.wishlist-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.wishlist-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.wishlist-cover {
    height: 110px;
    background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wishlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wishlist-body {
    padding: 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.65rem;
}

/* ==========================================================================
   GRILLE DE CADEAUX STYLE PINTEREST (Section 8)
   - Smartphone : 1 ou 2 colonnes selon largeur et lisibilité
   - Tablette : 2 à 3 colonnes
   - Ordinateur : 3 à 5 colonnes selon largeur
   ========================================================================== */

.gifts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
    align-items: stretch;
}

/* Smartphone large ou mode 2 colonnes */
@media (min-width: 480px) {
    .gifts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Tablette : 2 à 3 colonnes */
@media (min-width: 768px) {
    .gifts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

/* Ordinateur : 3 à 4 colonnes */
@media (min-width: 1120px) {
    .gifts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Grand écran : 5 colonnes */
@media (min-width: 1400px) {
    .gifts-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Option mobile 1 colonne forcée pour confort maximal */
.gifts-grid.mobile-single-col {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .gifts-grid.mobile-single-col {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Carte Cadeau Élégante */
.gift-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.gift-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* État visuel très distinct pour les autres membres lorsqu'un cadeau est réservé (Section 9.2) */
.gift-card--reserved {
    background: var(--bg-subtle);
    border: 2px dashed rgba(180, 73, 35, 0.45);
    opacity: 0.76;
    box-shadow: none;
}

[data-theme="dark"] .gift-card--reserved {
    background: rgba(20, 18, 17, 0.78);
    border-color: rgba(224, 118, 80, 0.4);
}

.gift-card--reserved-by-me {
    border: 2px solid var(--secondary);
    background: linear-gradient(180deg, var(--secondary-soft) 0%, var(--bg-surface) 45%);
    opacity: 0.9;
}

.gift-card--reserved:hover {
    opacity: 0.98;
    transform: translateY(-2px);
}

.gift-card--reserved .gift-media img,
.gift-card--reserved .gift-placeholder {
    filter: grayscale(90%) blur(2.5px) brightness(0.68);
    transform: scale(1.05);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.gift-card--reserved:hover .gift-media img,
.gift-card--reserved:hover .gift-placeholder {
    filter: grayscale(35%) blur(0.5px) brightness(0.88);
    transform: scale(1.02);
}

.gift-card--reserved .gift-title {
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.gift-card--reserved .gift-price {
    color: var(--text-muted);
}

/* Bandeau central superposé sur la photo floutée des cadeaux réservés */
.gift-reserved-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    text-align: center;
    z-index: 1;
    pointer-events: none;
    background: rgba(22, 19, 18, 0.28);
}

.gift-reserved-stamp {
    background: rgba(30, 25, 24, 0.9);
    color: #FFFFFF;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transform: rotate(-3deg);
}

.gift-reserved-stamp--mine {
    background: rgba(35, 88, 74, 0.94);
    border-color: rgba(167, 243, 208, 0.55);
}

.gift-reserved-stamp-sub {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.92;
    margin-top: 2px;
}

.gift-card--reserved .gift-reservation-box {
    background: rgba(200, 90, 50, 0.12);
    border: 1px solid rgba(200, 90, 50, 0.3);
}

.gift-card--reserved-by-me .gift-reservation-box {
    background: var(--secondary-soft);
    border: 1px solid rgba(46, 111, 94, 0.35);
}

.gift-media {
    position: relative;
    width: 100%;
    padding-top: 78%;
    background: var(--bg-elevated);
    overflow: hidden;
}

.gift-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gift-card:hover .gift-media img {
    transform: scale(1.03);
}

.gift-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: linear-gradient(145deg, var(--bg-elevated), var(--bg-subtle));
    padding: 1rem;
    text-align: center;
}

.gift-badges-top {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    right: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.4rem;
    pointer-events: none;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.badge-priority-low {
    background: rgba(255, 255, 255, 0.9);
    color: #5C534E;
}
.badge-priority-normal {
    background: rgba(230, 243, 239, 0.94);
    color: #23584A;
}
.badge-priority-high {
    background: rgba(252, 238, 232, 0.95);
    color: #B04923;
}
.badge-priority-dream {
    background: linear-gradient(135deg, #D48C1C, #B86B11);
    color: #FFFFFF;
}
.badge-surprise {
    background: var(--accent-surprise);
    color: #FFFFFF;
}
.badge-reserved {
    background: rgba(35, 31, 30, 0.86);
    color: #FFFFFF;
}
.badge-available {
    background: var(--secondary);
    color: #FFFFFF;
}

.gift-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}

.gift-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.gift-price {
    font-size: 1.12rem;
    font-weight: 800;
    color: var(--primary);
}

.gift-merchant {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-pill);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gift-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.gift-variant {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary);
    background: var(--secondary-soft);
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    align-self: flex-start;
}

.gift-desc {
    font-size: 0.86rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gift-comment {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--text-muted);
    border-left: 2px solid var(--primary-border);
    padding-left: 0.55rem;
}

/* Bloc Réservation / Cagnotte dans la carte */
.gift-reservation-box {
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    font-size: 0.82rem;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin: 0.45rem 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: var(--radius-pill);
    transition: width 0.35s ease;
}

.gift-actions {
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.gift-actions-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.05rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.2;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    color: #FFFFFF;
}

.btn-secondary {
    background: var(--secondary);
    color: #FFFFFF;
}
.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-hover);
    color: #FFFFFF;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover:not(:disabled) {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--danger);
    color: #FFFFFF;
}

.btn-sm {
    padding: 0.42rem 0.75rem;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

/* Barre de recherche et filtres (Section 16) */
.filters-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
    margin-bottom: 1.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.filter-input, .filter-select {
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-search {
    flex: 1 1 220px;
}

/* Formulaires & Modales */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 14, 13, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.18s ease;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
}

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

.modal-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 540px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Page d'authentification */
.auth-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 2rem 1.75rem;
    box-shadow: var(--shadow-md);
}

/* Toasts / Alertes */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 380px;
    width: calc(100% - 2rem);
}

.toast {
    background: var(--bg-surface);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    animation: slideIn 0.22s ease;
}

.toast-success {
    border-left-color: var(--success);
}
.toast-error {
    border-left-color: var(--danger);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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