/**
 * Style Bannière Cookies Custom
 * Thème: Autumn Harvest - Fiona Bouakaz
 */

:root {
    --cookie-cream-light: #F5EFE6;
    --cookie-cream: #E8D5BD;
    --cookie-beige: #D4B896;
    --cookie-caramel: #B89968;
    --cookie-brown: #8B6F47;
    --cookie-brown-dark: #6B5436;
    --cookie-text-dark: #3A2F23;
}

/* ========================================
   BANNIÈRE PRINCIPALE
   ======================================== */

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 1rem;
    animation: slideUp 0.5s ease-out;
    pointer-events: none;
}

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

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

.cookie-content {
    background: linear-gradient(135deg, var(--cookie-cream-light) 0%, #FAF7F2 100%);
    border: 3px solid var(--cookie-brown);
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -10px 50px rgba(107, 84, 54, 0.3);
    padding: 2rem 2.5rem;
    max-width: 700px;
    width: 100%;
    font-family: 'Inter', sans-serif;
    pointer-events: all;
    position: relative;
}

.cookie-icon-emoji {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.cookie-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cookie-brown-dark);
    margin: 0 0 1rem 0;
    text-align: center;
}

.cookie-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--cookie-text-dark);
    margin: 0 0 1rem 0;
    text-align: center;
}

.cookie-privacy {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cookie-privacy a {
    color: var(--cookie-brown);
    text-decoration: underline;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.cookie-privacy a:hover {
    color: var(--cookie-brown-dark);
}

/* ========================================
   BOUTONS
   ======================================== */

/* ⚖️ CONFORMITÉ CNIL/RGPD :
   Les boutons "Accepter" et "Refuser" doivent avoir
   la MÊME VISIBILITÉ (même couleur, même taille).
   Seul "Personnaliser" peut être différent.
*/

.cookie-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

/* Boutons "Accepter" et "Refuser" - MÊME VISIBILITÉ (conformité CNIL) */
.cookie-btn-primary,
.cookie-btn-secondary {
    background: linear-gradient(135deg, var(--cookie-brown) 0%, var(--cookie-brown-dark) 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(107, 84, 54, 0.25);
}

.cookie-btn-primary:hover,
.cookie-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(107, 84, 54, 0.35);
}

/* Bouton "Personnaliser" - Style secondaire pour le différencier */
.cookie-btn-outline {
    background: white;
    color: var(--cookie-brown-dark);
    border: 2px solid var(--cookie-brown);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.cookie-btn-outline:hover {
    background: var(--cookie-cream-light);
    border-color: var(--cookie-brown-dark);
    transform: translateY(-1px);
}

/* ========================================
   ICÔNE COOKIES (coin de l'écran)
   ======================================== */

#cookie-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--cookie-brown) 0%, var(--cookie-caramel) 100%);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(107, 84, 54, 0.3);
    z-index: 999998;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#cookie-icon:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 40px rgba(107, 84, 54, 0.4);
}

/* ========================================
   PANNEAU DE PERSONNALISATION
   ======================================== */

#cookie-customize-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(58, 47, 35, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.cookie-customize-content {
    background: linear-gradient(135deg, var(--cookie-cream-light) 0%, #FAF7F2 100%);
    border: 3px solid var(--cookie-brown);
    border-radius: 25px;
    padding: 2.5rem;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(107, 84, 54, 0.4);
}

.cookie-customize-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cookie-brown-dark);
    margin: 0 0 1rem 0;
    text-align: center;
}

.cookie-customize-content > p {
    text-align: center;
    color: var(--cookie-text-dark);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Catégories de cookies */

.cookie-category {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cookie-category:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.cookie-category h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--cookie-brown-dark);
    margin: 0;
}

.cookie-always-active {
    background: var(--cookie-beige);
    color: var(--cookie-text-dark);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.cookie-category-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--cookie-text-dark);
    margin: 0;
}

/* Switch toggle */

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 30px;
    transition: 0.3s;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.cookie-switch input:checked + .cookie-slider {
    background: linear-gradient(135deg, var(--cookie-brown) 0%, var(--cookie-caramel) 100%);
}

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

/* Actions du panneau */

.cookie-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* ========================================
   RESPONSIVE MOBILE
   ======================================== */

@media (max-width: 768px) {
    .cookie-content {
        padding: 1.5rem;
        border-radius: 20px 20px 0 0;
    }

    .cookie-title {
        font-size: 1.5rem;
    }

    .cookie-text {
        font-size: 0.9rem;
    }

    .cookie-buttons {
        flex-direction: column;
        gap: 0.6rem;
    }

    .cookie-btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }

    #cookie-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
        bottom: 15px;
        left: 15px;
    }

    .cookie-customize-content {
        padding: 1.8rem;
        max-height: 85vh;
    }

    .cookie-customize-content h2 {
        font-size: 1.6rem;
    }

    .cookie-category {
        padding: 1.2rem;
    }

    .cookie-category h3 {
        font-size: 1.1rem;
    }

    .cookie-actions {
        flex-direction: column;
    }

    .cookie-actions .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #cookie-banner {
        padding: 0;
    }

    .cookie-content {
        padding: 1.2rem;
        max-width: 100%;
        border-radius: 15px 15px 0 0;
    }

    .cookie-title {
        font-size: 1.3rem;
    }

    .cookie-icon-emoji {
        font-size: 2.5rem;
    }

    .cookie-customize-content {
        padding: 1.5rem;
        border-radius: 20px;
        max-height: 80vh;
    }
}

/* ========================================
   SCROLLBAR CUSTOM (panneau personnalisation)
   ======================================== */

.cookie-customize-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-customize-content::-webkit-scrollbar-track {
    background: var(--cookie-cream-light);
    border-radius: 10px;
}

.cookie-customize-content::-webkit-scrollbar-thumb {
    background: var(--cookie-brown);
    border-radius: 10px;
}

.cookie-customize-content::-webkit-scrollbar-thumb:hover {
    background: var(--cookie-brown-dark);
}
