/**
 * Styles pour le système de gestion du consentement cookies (CMP)
 * Conforme RGPD - Design moderne et professionnel
 * 
 * @package AlphaBill
 * @version 2.10.0
 */

/* ============================================
   BANDEAU DE CONSENTEMENT
   ============================================ */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #0066FF;
}

.cookie-consent-banner--visible {
    transform: translateY(0);
}

.cookie-consent-banner__content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

@media (min-width: 768px) {
    .cookie-consent-banner__content {
        flex-direction: row;
        align-items: center;
        padding: 28px 40px;
    }
}

.cookie-consent-banner__text {
    flex: 1;
}

.cookie-consent-banner__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.cookie-consent-banner__description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
    .cookie-consent-banner__title {
        font-size: 20px;
    }
    
    .cookie-consent-banner__description {
        font-size: 15px;
    }
}

.cookie-consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

@media (min-width: 768px) {
    .cookie-consent-banner__actions {
        width: auto;
        flex-shrink: 0;
    }
}

/* ============================================
   BOUTONS
   ============================================ */

.cookie-consent-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
}

.cookie-consent-btn:focus {
    outline: 2px solid #0066FF;
    outline-offset: 2px;
}

.cookie-consent-btn--primary {
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.cookie-consent-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
}

.cookie-consent-btn--primary:active {
    transform: translateY(0);
}

.cookie-consent-btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.cookie-consent-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.cookie-consent-btn--secondary:active {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   MODAL DE PERSONNALISATION
   ============================================ */

.cookie-consent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-modal--visible {
    opacity: 1;
    visibility: visible;
}

.cookie-consent-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.cookie-consent-modal__content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent-modal--visible .cookie-consent-modal__content {
    transform: scale(1);
}

.cookie-consent-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #e5e5e5;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px 12px 0 0;
}

.cookie-consent-modal__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}

.cookie-consent-modal__close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666666;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cookie-consent-modal__close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
}

.cookie-consent-modal__close:focus {
    outline: 2px solid #0066FF;
    outline-offset: 2px;
}

.cookie-consent-modal__close svg {
    width: 20px;
    height: 20px;
}

.cookie-consent-modal__body {
    padding: 28px;
}

.cookie-consent-modal__intro {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.6;
    color: #666666;
}

.cookie-consent-modal__types {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-consent-modal__type {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.cookie-consent-modal__type:hover {
    border-color: #0066FF;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.1);
}

.cookie-consent-modal__type-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.cookie-consent-modal__type-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-consent-modal__type-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-consent-modal__type-badge {
    padding: 4px 10px;
    background: #0066FF;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.cookie-consent-modal__type-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
    padding-left: 52px;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.cookie-consent-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-consent-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cccccc;
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-consent-toggle__slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: #ffffff;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__slider {
    background: linear-gradient(135deg, #0066FF 0%, #00D4FF 100%);
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle__slider:before {
    transform: translateX(20px);
}

.cookie-consent-toggle input:disabled + .cookie-consent-toggle__slider {
    background-color: #0066FF;
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-consent-toggle input:focus + .cookie-consent-toggle__slider {
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.2);
}

/* ============================================
   FOOTER DU MODAL
   ============================================ */

.cookie-consent-modal__footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    justify-content: flex-end;
}

@media (max-width: 767px) {
    .cookie-consent-modal__footer {
        flex-direction: column;
    }
    
    .cookie-consent-modal__footer .cookie-consent-btn {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .cookie-consent-banner__actions {
        flex-direction: column;
    }
    
    .cookie-consent-btn {
        width: 100%;
        min-width: auto;
    }
    
    .cookie-consent-modal__content {
        max-height: 95vh;
    }
    
    .cookie-consent-modal__header {
        padding: 20px;
    }
    
    .cookie-consent-modal__body {
        padding: 20px;
    }
    
    .cookie-consent-modal__footer {
        padding: 16px 20px;
    }
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-consent-modal,
    .cookie-consent-modal__content,
    .cookie-consent-toggle__slider,
    .cookie-consent-toggle__slider:before {
        transition: none;
    }
}

/* Masquer visuellement mais garder accessible pour les lecteurs d'écran */
.cookie-consent-modal[aria-hidden="true"] {
    display: none;
}

