:root {
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
}

/* ── Login admin : split 60/40 animé ────────────────────── */
.login-split { min-height: 100vh; }
.login-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-hero .login-content { position: relative; z-index: 2; }
.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.35;
    background: radial-gradient(circle at 30% 30%, #93c5fd, transparent 70%);
    animation: blobFloat 14s ease-in-out infinite;
}
.login-blob.b1 { width: 320px; height: 320px; top: -60px; left: -80px; }
.login-blob.b2 { width: 260px; height: 260px; bottom: -70px; right: -40px; animation-delay: -4s; background: radial-gradient(circle at 30% 30%, #bfdbfe, transparent 70%); }
.login-blob.b3 { width: 180px; height: 180px; top: 45%; right: 18%; animation-delay: -8s; opacity: 0.25; }
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(24px, -28px) scale(1.08); }
    66% { transform: translate(-18px, 18px) scale(0.95); }
}
.login-feature {
    opacity: 0;
    animation: loginUp 0.6s cubic-bezier(.21,1,.21,1) forwards;
}
.login-feature:nth-child(1) { animation-delay: 0.15s; }
.login-feature:nth-child(2) { animation-delay: 0.30s; }
.login-feature:nth-child(3) { animation-delay: 0.45s; }
.login-feature .login-ico {
    width: 42px; height: 42px; flex: 0 0 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.15); border-radius: 12px; font-size: 1.1rem;
}
.login-card-anim { opacity: 0; animation: loginUp 0.7s cubic-bezier(.21,1,.21,1) 0.1s forwards; }
.login-brand-anim { opacity: 0; animation: loginUp 0.6s ease forwards; }
@keyframes loginUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-form .form-control {
    padding: 0.7rem 0.9rem;
    border-radius: 0.6rem;
}
.login-form .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.18);
}
.login-btn {
    padding: 0.7rem;
    border-radius: 0.6rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); }
@media (prefers-reduced-motion: reduce) {
    .login-blob, .login-feature, .login-card-anim, .login-brand-anim { animation: none; opacity: 1; }
}

body {
    color: #1f2937;
}

.btn-primary {
    --bs-btn-bg: #2563eb;
    --bs-btn-border-color: #2563eb;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-active-bg: #1e40af;
}

.text-primary {
    color: #2563eb !important;
}

.btn-outline-primary {
    --bs-btn-color: #2563eb;
    --bs-btn-border-color: #2563eb;
    --bs-btn-hover-bg: #2563eb;
    --bs-btn-hover-border-color: #2563eb;
}

.bg-primary {
    background-color: #2563eb !important;
}

.navbar-brand {
    font-size: 1.25rem;
}

.accordion-button:not(.collapsed) {
    color: #2563eb;
    background-color: #eff6ff;
}

.card {
    border-radius: 0.75rem;
}

.progress-bar {
    transition: width 0.4s ease;
}

/* Watermark de prévisualisation du DUERP (phase 2) */
.duerp-preview {
    position: relative;
    overflow: hidden;
}

.duerp-preview::after {
    content: "APERÇU — NON PAYÉ";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(220, 38, 38, 0.12);
    pointer-events: none;
    white-space: nowrap;
}

/* ── Tableau comparatif : compact sur petit écran ───────── */
@media (max-width: 575.98px) {
    .comparatif-table {
        font-size: 0.7rem;
    }
    .comparatif-table th,
    .comparatif-table td {
        padding: 0.35rem 0.2rem;
    }
}

/* ── CTA mobile collante ────────────────────────────────── */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}
/* Tant que la bannière cookies est affichée, on masque la CTA pour la laisser tout en bas. */
body.cookie-visible .sticky-cta {
    display: none;
}
.sticky-cta {
    padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
body.has-sticky-cta {
    padding-bottom: 80px;
}
@media (min-width: 992px) {
    body.has-sticky-cta {
        padding-bottom: 0;
    }
}

/* ── Bannière cookies ───────────────────────────────────── */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: #1f2937;
    color: #f3f4f6;
    padding: 0.9rem 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}

/* ── Tableaux admin responsive (cartes empilées sur mobile) ── */
@media (max-width: 767.98px) {
    .admin-main .table thead {
        display: none;
    }
    .admin-main .table,
    .admin-main .table tbody,
    .admin-main .table tr,
    .admin-main .table td {
        display: block;
        width: 100%;
    }
    .admin-main .table tr {
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
        padding: 0.25rem 0.6rem;
        background: #fff;
    }
    .admin-main .table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        border: 0;
        padding: 0.45rem 0.1rem;
        text-align: right;
    }
    .admin-main .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        text-align: left;
        white-space: nowrap;
    }
    .admin-main .table td:empty {
        display: none;
    }
}
