/* ========================================
   COOKIE CONSENT BANNER
   Design professionnel conforme RGPD
   ======================================== */

/* Overlay sombre derrière le popup */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cookie-consent-overlay.show {
    opacity: 1;
}

/* Container principal du popup */
.cookie-consent-banner {
    position: fixed;
    bottom: 30px;
    left: 50%;
    /* FIX CLS : transform composited GPU au lieu de bottom (évite layout shift) */
    transform: translateX(-50%) translateY(150%);
    max-width: 650px;
    width: calc(100% - 30px);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    padding: 25px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-sizing: border-box;
    will-change: transform;
}

.cookie-consent-banner.show {
    transform: translateX(-50%) translateY(0);
}

/* En-tête avec icône */
.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.cookie-icon {
    font-size: 36px;
    color: #e3a63d;
    animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-5deg);
    }
    75% {
        transform: translateY(-3px) rotate(5deg);
    }
}

.cookie-consent-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Contenu du texte */
.cookie-consent-content {
    margin-bottom: 25px;
}

.cookie-consent-text {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #4a4a4a;
    margin: 0 0 12px 0;
}

/* Lien "En savoir plus" */
.cookie-learn-more {
    color: #e3a63d;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.cookie-learn-more:hover {
    color: #d4972e;
    gap: 8px;
}

.cookie-learn-more i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.cookie-learn-more:hover i {
    transform: translateX(3px);
}

/* Boutons d'action */
.cookie-consent-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cookie-btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 28px;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cookie-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
}

.cookie-btn:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Bouton Accepter */
.cookie-btn-accept {
    background: linear-gradient(135deg, #e3a63d 0%, #d4972e 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(227, 166, 61, 0.4);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #d4972e 0%, #c68825 100%);
    box-shadow: 0 6px 20px rgba(227, 166, 61, 0.5);
    transform: translateY(-2px);
}

.cookie-btn-accept:active {
    transform: translateY(0);
}

/* Bouton Refuser */
.cookie-btn-decline {
    background: #ffffff;
    color: #4a4a4a;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cookie-btn-decline:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #2a2a2a;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.cookie-btn-decline:active {
    transform: translateY(0);
}

/* Icône check pour le bouton accepter */
.cookie-btn i {
    margin-right: 6px;
    font-size: 14px;
}

/* Badge "RGPD Compliant" */
.cookie-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #4caf50;
    margin-top: 15px;
}

.cookie-badge i {
    font-size: 14px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .cookie-consent-banner {
        width: 95%;
        padding: 25px 25px;
        bottom: 15px;
        transform: translateX(-50%) translateY(150%);
        border-radius: 15px;
    }

    .cookie-consent-banner.show {
        transform: translateX(-50%) translateY(0);
    }

    .cookie-consent-header {
        gap: 12px;
        margin-bottom: 15px;
    }

    .cookie-icon {
        font-size: 30px;
    }

    .cookie-consent-title {
        font-size: 19px;
    }

    .cookie-consent-text {
        font-size: 14px;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cookie-btn {
        width: 100%;
        min-width: unset;
        padding: 13px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 20px 18px;
    }

    .cookie-consent-title {
        font-size: 17px;
    }

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

    .cookie-icon {
        font-size: 28px;
    }

    .cookie-btn {
        padding: 12px 18px;
        font-size: 13px;
    }

    .cookie-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* Animation de sortie */
.cookie-consent-banner.hide {
    transform: translateX(-50%) translateY(150%);
    transition: transform 0.4s ease-in;
}

.cookie-consent-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

/* Accessibilité : Focus visible */
.cookie-btn:focus {
    outline: 3px solid rgba(227, 166, 61, 0.5);
    outline-offset: 2px;
}

.cookie-learn-more:focus {
    outline: 2px solid rgba(227, 166, 61, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animation d'apparition douce */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-consent-overlay {
    animation: fadeIn 0.4s ease;
}
