/* ====================================
   Styles pour le Système de Consentement (Loi 25)
   ==================================== */

/* Banner de consentement */
#consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98), rgba(62, 39, 35, 0.98));
    backdrop-filter: blur(10px);
    border-top: 3px solid var(--color-gold);
    padding: 1.5rem;
    z-index: 10000;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

#consent-banner.active {
    transform: translateY(0);
}

.consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}

.consent-icon {
    font-size: 2.5rem;
    color: var(--color-gold);
    animation: pulse 2s ease-in-out infinite;
}

.consent-text h3 {
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.consent-text p {
    color: var(--color-cream);
    margin: 0.5rem 0;
    line-height: 1.6;
}

.consent-text strong {
    color: var(--color-orange-bright);
}

.consent-detail {
    font-size: 0.9rem;
    opacity: 0.8;
}

.consent-detail a {
    color: var(--color-gold);
    text-decoration: underline;
}

.consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-consent {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.btn-consent.btn-primary {
    background: linear-gradient(135deg, var(--color-gold), var(--color-orange-bright));
    color: var(--color-dark);
}

.btn-consent.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

.btn-consent.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-cream);
    border: 1px solid rgba(212, 175, 55, 0.5);
}

.btn-consent.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--color-gold);
}

.btn-consent.btn-reject {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-consent.btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-cream);
}

/* Modal de personnalisation */
#consent-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#consent-modal.active {
    opacity: 1;
}

.consent-modal-content {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98), rgba(62, 39, 35, 0.95));
    border: 2px solid var(--color-gold);
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#consent-modal.active .consent-modal-content {
    transform: scale(1);
}

.consent-modal-header {
    background: rgba(212, 175, 55, 0.1);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.consent-modal-header h2 {
    color: var(--color-gold);
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.consent-modal-close {
    background: none;
    border: none;
    color: var(--color-cream);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.consent-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-orange-bright);
    transform: rotate(90deg);
}

.consent-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.consent-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.consent-category-header h3 {
    color: var(--color-gold);
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.required-badge {
    background: var(--color-orange-bright);
    color: var(--color-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.consent-category p {
    color: var(--color-cream);
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.cookie-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cookie-list li {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.cookie-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-gold);
}

.cookie-list li strong {
    color: var(--color-cream);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 28px;
}

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

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

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

.consent-info {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--color-orange-bright);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: start;
}

.consent-info i {
    color: var(--color-orange-bright);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.consent-info p {
    margin: 0;
    color: var(--color-cream);
    line-height: 1.6;
}

.consent-info a {
    color: var(--color-gold);
    text-decoration: underline;
}

.consent-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
}

/* Bouton flottant de gestion des cookies */
.consent-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-gold), var(--color-orange-bright));
    border: none;
    color: var(--color-dark);
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
}

.consent-floating-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.6);
}

/* Notification */
.consent-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.95);
    color: var(--color-cream);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.consent-notification.active {
    transform: translateX(0);
}

.consent-notification.success {
    border-left: 4px solid #4CAF50;
}

.consent-notification.info {
    border-left: 4px solid var(--color-gold);
}

.consent-notification.error {
    border-left: 4px solid #f44336;
}

/* Responsive */
@media (max-width: 968px) {
    .consent-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .consent-icon {
        display: none;
    }

    .consent-actions {
        justify-content: center;
    }

    .consent-modal-content {
        max-height: 95vh;
    }

    .consent-modal-header h2 {
        font-size: 1.4rem;
    }

    .consent-modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    #consent-banner {
        padding: 1rem;
    }

    .consent-text h3 {
        font-size: 1.1rem;
    }

    .consent-text p {
        font-size: 0.9rem;
    }

    .btn-consent {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .consent-actions {
        width: 100%;
    }

    .btn-consent {
        flex: 1;
        justify-content: center;
    }

    .consent-floating-btn {
        width: 48px;
        height: 48px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2rem;
    }

    .consent-notification {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}
