/* ==================================================================
   cookie-consent.css — Bandeau de consentement RGPD (25/08/2026)
   Style aligné sur le legacy .cookie-consent (dégradé sombre).
   Cible UNIQUEMENT le bandeau #cookie-consent-banner.
   ================================================================== */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 20px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1999;
    display: none; /* affiché par cookie-consent.js si aucun choix enregistré */
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: #ffffff;
}

.cookie-consent-message {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cookie-btn:hover {
    transform: translateY(-2px);
}

/* RGPD/CNIL : Refuser aussi visible qu'Accepter (même gabarit) */
.cookie-btn-accept {
    background: #FFCE32;
    color: #1a1a1a;
}

.cookie-btn-decline {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.cookie-btn-customize {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.35);
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    .cookie-consent-actions {
        justify-content: center;
    }
    .cookie-btn {
        flex: 1;
        min-width: 130px;
    }
}

/* ==================================================================
   Modal de préférences cookies (étape 2 — 25/08/2026)
   Granularité RGPD : toggles par finalité, jamais pré-cochés
   (sauf "nécessaires", grisé).
   ================================================================== */

.cookie-prefs-modal {
    position: fixed;
    inset: 0;
    z-index: 2001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-prefs-modal.open {
    display: flex;
}

.cookie-prefs-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.cookie-prefs-dialog {
    position: relative;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.cookie-prefs-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #003D99;
}

.cookie-prefs-desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #666;
    margin: 0 0 1.25rem;
}

.cookie-prefs-categories {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.cookie-prefs-category {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    background: #f8f9fa;
}

.cookie-prefs-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-prefs-cat-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-prefs-cat-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #666;
    margin: 0.5rem 0 0;
}

/* --- Toggle switch --- */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.25s ease;
}

.cookie-toggle-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #0052CC;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}

.cookie-toggle.disabled .cookie-toggle-slider {
    background: #0052CC;
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-prefs-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.4rem;
}

.cookie-prefs-actions .cookie-btn {
    background: #0052CC;
    color: #ffffff;
}

@media (max-width: 600px) {
    .cookie-prefs-dialog {
        padding: 1.25rem;
    }
    .cookie-prefs-actions {
        justify-content: stretch;
    }
    .cookie-prefs-actions .cookie-btn {
        width: 100%;
    }
}
