/* Cookie Banner Styles - RGPD Compliant */
/* Design moderne et élégant */

:root {
    --cookie-primary: #2C3E2A;
    --cookie-accent: #C2825C;
    --cookie-bg: #FEFCFA;
    --cookie-shadow: rgba(44, 62, 42, 0.15);
    --cookie-overlay: rgba(0, 0, 0, 0.5);
}

/* Bannière principale */
#cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--cookie-bg);
    box-shadow: 0 -4px 20px var(--cookie-shadow);
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--cookie-accent);
}

#cookie-banner.show {
    bottom: 0;
}

.cookie-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* Version simple */
#cookie-banner-simple {
    display: block;
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-icon {
    font-size: 2.5rem;
    color: var(--cookie-accent);
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    margin: 0 0 0.5rem 0;
    color: var(--cookie-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.cookie-text p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--cookie-accent);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-text a:hover {
    color: var(--cookie-primary);
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: var(--cookie-accent);
    color: white;
}

.cookie-btn-primary:hover {
    background: #A86D4A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 130, 92, 0.3);
}

.cookie-btn-secondary {
    background: white;
    color: var(--cookie-primary);
    border: 2px solid var(--cookie-primary);
}

.cookie-btn-secondary:hover {
    background: var(--cookie-primary);
    color: white;
    transform: translateY(-2px);
}

.cookie-btn-text {
    background: transparent;
    color: var(--cookie-primary);
    text-decoration: underline;
    padding: 0.75rem 1rem;
}

.cookie-btn-text:hover {
    color: var(--cookie-accent);
}

/* Version personnalisée */
#cookie-banner-custom {
    display: none;
}

.cookie-custom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #E8D5C4;
}

.cookie-custom-header h3 {
    margin: 0;
    color: var(--cookie-primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-custom {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-custom:hover {
    color: var(--cookie-accent);
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-option {
    background: white;
    border: 2px solid #E8D5C4;
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.cookie-option:hover {
    border-color: var(--cookie-accent);
    box-shadow: 0 2px 8px var(--cookie-shadow);
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-option-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--cookie-primary);
    font-size: 1rem;
}

.cookie-option-icon {
    width: 35px;
    height: 35px;
    background: var(--cookie-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.cookie-option-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    padding-left: 50px;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 56px;
    height: 28px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .toggle-slider {
    background-color: var(--cookie-accent);
}

.cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(28px);
}

.cookie-toggle input:disabled + .toggle-slider {
    background-color: var(--cookie-primary);
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-custom-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #E8D5C4;
}

/* Badge "Requis" */
.required-badge {
    background: var(--cookie-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-container {
        padding: 1.25rem 1rem;
    }

    .cookie-content {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }

    .cookie-icon {
        font-size: 2rem;
        text-align: center;
    }

    .cookie-text {
        min-width: 100%;
        text-align: center;
    }

    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-custom-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .close-custom {
        align-self: flex-end;
        position: absolute;
        right: 1rem;
        top: 1rem;
    }

    .cookie-option-description {
        padding-left: 0;
        margin-top: 0.5rem;
    }

    .cookie-custom-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cookie-text h3 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.9rem;
    }

    .cookie-btn {
        font-size: 0.9rem;
        padding: 0.65rem 1.25rem;
    }
}

/* Animation d'entrée */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#cookie-banner.show {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Style pour le lien dans le footer pour gérer les cookies */
.manage-cookies-link {
    color: var(--cookie-accent);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.manage-cookies-link:hover {
    color: var(--cookie-primary);
}
