/**
 * Cookie Consent Banner - RGPD/LPD Compliant
 * 5th Floor RO - 2025
 */

/* ========================================
   BANNIÈRE DE CONSENTEMENT
   ======================================== */

#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, #1e3a5f, #2c5282);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.5s ease-out;
}

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

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

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #fff;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-consent-text a {
    color: #ffd700;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-consent-text a:hover {
    color: #ffed4e;
}

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

/* Boutons */
.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #4CAF50;
    color: white;
}

.cookie-btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.cookie-btn-secondary {
    background: #f44336;
    color: white;
}

.cookie-btn-secondary:hover {
    background: #da190b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.cookie-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cookie-btn-outline:hover {
    background: white;
    color: #1e3a5f;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

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

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

/* ========================================
   PANNEAU DE PARAMÈTRES
   ======================================== */

#cookie-settings-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
}

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-settings-modal {
    position: relative;
    max-width: 700px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cookie-settings-header {
    padding: 25px 30px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #f5f5f5, #ffffff);
}

.cookie-settings-header h2 {
    margin: 0;
    color: #1e3a5f;
    font-size: 1.5em;
}

.cookie-close-btn {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-close-btn:hover {
    background: #f0f0f0;
    color: #333;
    transform: rotate(90deg);
}

.cookie-settings-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: #f0f0f0;
    border-left-color: #1976D2;
}

.cookie-category-header {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.cookie-category-info h3 {
    margin: 0 0 8px 0;
    color: #1e3a5f;
    font-size: 1.1em;
}

.cookie-category-info p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.6;
}

/* Switch Toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.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;
    transition: 0.4s;
    border-radius: 34px;
}

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

.cookie-switch input:checked + .cookie-slider {
    background-color: #4CAF50;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #4CAF50;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-settings-footer {
    padding: 20px 30px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f9f9f9;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .cookie-settings-modal {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .cookie-settings-header,
    .cookie-settings-body,
    .cookie-settings-footer {
        padding: 20px;
    }

    .cookie-settings-footer {
        flex-direction: column;
    }

    .cookie-settings-footer .cookie-btn {
        width: 100%;
    }

    .cookie-category-header {
        flex-direction: column;
    }
}

