/* ==================== BANNIÈRE COOKIES - STYLE FORMASOUND ==================== */

/* Variables reprises du style principal */
:root {
    --gold: #F5A623;
    --gold-dark: #e6a11e;
    --burgundy: #1a1a1a;
    --burgundy-light: #2d2d2d;
    --accent-blue: #00A8E8;
    --accent-blue-dark: #0095d1;
    --white: #ffffff;
    --gray-light: rgba(255, 255, 255, 0.1);
    --gray-medium: rgba(255, 255, 255, 0.3);
    --gray-dark: rgba(255, 255, 255, 0.7);
}

/* Bannière principale */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-light) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: var(--white);
    padding: 20px;
    border-top: 1px solid var(--gray-light);
    z-index: 9999;
    transform: translateY(100%);
    transition: all 0.4s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

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

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

.cookie-text h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.cookie-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Boutons cookies avec style Formasound */
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

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

/* Bouton Accepter - doré */
.cookie-btn-accept {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--burgundy);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    transform: translateY(-3px);
}

/* Bouton Personnaliser - bleu accent */
.cookie-btn-customize {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
    color: var(--white);
}

.cookie-btn-customize:hover {
    background: linear-gradient(135deg, var(--accent-blue-dark), var(--accent-blue));
    transform: translateY(-3px);
}

/* Bouton Refuser - outline */
.cookie-btn-reject {
    background: transparent;
    color: var(--gray-dark);
    border: 2px solid var(--gray-medium);
}

.cookie-btn-reject:hover {
    background: var(--gray-light);
    color: var(--white);
    border-color: var(--gray-dark);
}

/* ==================== MODAL PRÉFÉRENCES ==================== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--burgundy-light) 100%);
    border: 1px solid var(--gray-light);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    color: var(--white);
}

.cookie-modal-header {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--burgundy);
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--burgundy);
}

.cookie-modal-close {
    background: rgba(26, 26, 26, 0.2);
    border: none;
    color: var(--burgundy);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: bold;
}

.cookie-modal-close:hover {
    background: rgba(26, 26, 26, 0.4);
    transform: scale(1.1);
}

.cookie-modal-body {
    padding: 25px;
}

/* Catégories de cookies */
.cookie-category {
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.cookie-category-header {
    background: rgba(255, 255, 255, 0.08);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cookie-category-header:hover {
    background: rgba(255, 255, 255, 0.12);
}

.cookie-category-title {
    font-weight: 600;
    color: var(--white);
    margin: 0;
    font-size: 16px;
}

/* Toggle switch avec style Formasound */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 55px;
    height: 28px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-light);
    transition: all 0.4s ease;
    border-radius: 28px;
    border: 2px solid var(--gray-medium);
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    transition: all 0.4s ease;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-color: var(--gold);
}

input:checked + .cookie-slider:before {
    transform: translateX(27px);
    background: var(--burgundy);
}

.cookie-slider.disabled {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    border-color: var(--gold) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-slider.disabled:before {
    background: var(--burgundy) !important;
}

.cookie-category-content {
    padding: 18px 20px;
    border-top: 1px solid var(--gray-light);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.cookie-modal-footer {
    padding: 25px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ==================== TOAST NOTIFICATION ==================== */
.cookie-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
    color: var(--white);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 168, 232, 0.3);
    z-index: 10001;
    transform: translateX(400px);
    transition: all 0.4s ease;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

.cookie-toast.show {
    transform: translateX(0);
}

.cookie-toast.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: rgba(220, 53, 69, 0.3);
}

.cookie-toast.success {
    background: linear-gradient(135deg, #28a745, #218838);
    border-color: rgba(40, 167, 69, 0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 15px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cookie-buttons {
        justify-content: center;
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        min-width: 120px;
        padding: 12px 16px;
    }

    .cookie-modal {
        padding: 10px;
    }

    .cookie-modal-content {
        margin: 5px;
        max-height: 90vh;
        border-radius: 15px;
    }

    .cookie-modal-header {
        padding: 15px;
        border-radius: 15px 15px 0 0;
    }

    .cookie-modal-body {
        padding: 20px;
    }

    .cookie-modal-footer {
        flex-direction: column;
        padding: 20px;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
    }

    .cookie-toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .cookie-text h4 {
        font-size: 16px;
    }

    .cookie-text p {
        font-size: 13px;
    }

    .cookie-btn {
        font-size: 13px;
        padding: 10px 14px;
    }

    .cookie-category-header {
        padding: 15px;
    }

    .cookie-category-content {
        padding: 15px;
        font-size: 13px;
    }

    .cookie-toggle {
        width: 50px;
        height: 26px;
    }

    .cookie-slider:before {
        height: 18px;
        width: 18px;
    }

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

/* ==================== ANIMATIONS ==================== */
@keyframes slideUp {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.cookie-modal {
    animation: fadeIn 0.3s ease;
}

/* ==================== ACCESSIBILITÉ ==================== */
.cookie-btn:focus,
.cookie-modal-close:focus,
.cookie-toggle input:focus + .cookie-slider {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* ==================== SUPPORT MOUVEMENT RÉDUIT ==================== */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-btn,
    .cookie-modal,
    .cookie-toast,
    .cookie-slider {
        transition: none;
    }
}