/**
 * ═══════════════════════════════════════════════════════════════
 * MAISONS CTL - Bandeau Cookies RGPD - CSS
 * ═══════════════════════════════════════════════════════════════
 * 
 * 📄 Fichier : cookie-banner.css
 * 📂 Chemin : /public_html/assets/css/cookie-banner.css
 * 🔢 Version : 1.0.0
 * 📅 Date : 27/10/2025
 * 
 * ════════════════════════════════════════════════════════════════
 * 🎨 DESIGN
 * ════════════════════════════════════════════════════════════════
 * 
 * Bandeau moderne et élégant en bas de page
 * - Glassmorphism subtle
 * - Animations fluides
 * - 3 boutons : Accepter / Refuser / Personnaliser
 * - Mobile-first responsive
 * 
 * ═══════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════
   1. VARIABLES CSS
   ═══════════════════════════════════════════════════════════════ */

:root {
    --cookie-bg: rgba(255, 255, 255, 0.98);
    --cookie-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    --cookie-text: #1a1a1a;
    --cookie-text-light: #4a5568;
    --cookie-primary: #1a73e8;
    --cookie-primary-hover: #135bb5;
    --cookie-success: #34a853;
    --cookie-danger: #ea4335;
    --cookie-border: rgba(0, 0, 0, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   2. CONTENEUR PRINCIPAL
   ═══════════════════════════════════════════════════════════════ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cookie-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--cookie-shadow);
    border-top: 1px solid var(--cookie-border);
    z-index: 9999;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner.hide {
    transform: translateY(100%);
}

/* ═══════════════════════════════════════════════════════════════
   3. CONTENU
   ═══════════════════════════════════════════════════════════════ */

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Texte */
.cookie-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cookie-text-light);
}

.cookie-text strong {
    color: var(--cookie-text);
    font-weight: 600;
}

.cookie-text a {
    color: var(--cookie-primary);
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.cookie-text a:hover {
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════
   4. BOUTONS
   ═══════════════════════════════════════════════════════════════ */

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-family: inherit;
}

/* Bouton Accepter */
.cookie-btn-accept {
    background: var(--cookie-success);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
}

.cookie-btn-accept:hover {
    background: #2d8e47;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.4);
}

/* Bouton Refuser */
.cookie-btn-refuse {
    background: white;
    color: var(--cookie-danger);
    border: 2px solid var(--cookie-danger);
}

.cookie-btn-refuse:hover {
    background: var(--cookie-danger);
    color: white;
}

/* Bouton Personnaliser */
.cookie-btn-settings {
    background: white;
    color: var(--cookie-primary);
    border: 2px solid var(--cookie-border);
}

.cookie-btn-settings:hover {
    border-color: var(--cookie-primary);
    background: rgba(26, 115, 232, 0.05);
}

/* ═══════════════════════════════════════════════════════════════
   5. MODALE PERSONNALISATION
   ═══════════════════════════════════════════════════════════════ */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
    pointer-events: all;
}

.cookie-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

/* Header modale */
.cookie-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--cookie-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--cookie-text);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--cookie-text-light);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.cookie-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Body modale */
.cookie-modal-body {
    padding: 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--cookie-border);
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.cookie-category-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--cookie-text);
    margin: 0;
}

.cookie-category-desc {
    font-size: 14px;
    color: var(--cookie-text-light);
    line-height: 1.5;
    margin: 0;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

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

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--cookie-success);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer modale */
.cookie-modal-footer {
    padding: 24px;
    border-top: 1px solid var(--cookie-border);
    display: flex;
    gap: 12px;
    flex-direction: column;
}

/* ═══════════════════════════════════════════════════════════════
   6. RESPONSIVE DESKTOP (≥768px)
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .cookie-text {
        flex: 1;
        margin-right: 20px;
    }
    
    .cookie-actions {
        flex-direction: row;
        flex-shrink: 0;
    }
    
    .cookie-btn {
        white-space: nowrap;
    }
    
    .cookie-modal-footer {
        flex-direction: row;
    }
}

/* ═══════════════════════════════════════════════════════════════
   7. ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

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

/* ═══════════════════════════════════════════════════════════════
   8. ACCESSIBILITÉ
   ═══════════════════════════════════════════════════════════════ */

.cookie-btn:focus,
.cookie-modal-close:focus,
.cookie-toggle input:focus + .cookie-toggle-slider {
    outline: 2px solid var(--cookie-primary);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-btn,
    .cookie-toggle-slider {
        transition: none !important;
    }
}

/*
════════════════════════════════════════════════════════════════
✅ FIN DU FICHIER CSS - VERSION 1.0.0
════════════════════════════════════════════════════════════════

📝 CARACTÉRISTIQUES :
- Bandeau moderne en bas de page
- Glassmorphism subtil
- 3 boutons : Accepter / Refuser / Personnaliser
- Modale de personnalisation avec toggles
- Animations fluides
- Responsive mobile-first
- Accessible (focus, reduced motion)

════════════════════════════════════════════════════════════════
*/
