/* === ED Cookie Consent CSS === */

/* Variables */
.ed-cookie-consent {
    --ed-cookie-bg: #1a1a1a;
    --ed-cookie-text: #ffffff;
    --ed-cookie-cookie: #ffffff;
    --ed-cookie-text-muted: rgba(255, 255, 255, 0.7);
    --ed-cookie-border: currentColor;
    --ed-cookie-radius: 20px;
    --ed-cookie-radius-btn: 25px;
}

/* Reset */
.ed-cookie-consent *,
.ed-cookie-consent *::before,
.ed-cookie-consent *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Masquer complètement quand consent donné */
.ed-cookie-consent.consented {
    display: none !important;
}

/* === POPUP (Les deux modes) === */

.ed-cookie-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--ed-cookie-bg);
    padding: 35px 40px;
    border-radius: var(--ed-cookie-radius);
    z-index: 999999;
    max-width: 520px;
    width: calc(100% - 40px);
    display: flex;
    gap: 25px;
    align-items: flex-start;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Bouton fermer (croix) */
.ed-cookie-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--ed-cookie-text);
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.ed-cookie-popup-close:hover {
    opacity: 1;
}

.ed-cookie-popup-close svg {
    width: 20px;
    height: 20px;
}

/* Icône cookie */
.ed-cookie-popup-icon {
    flex-shrink: 0;
}

.ed-cookie-popup-icon img {
    width: 100px;
    height: 100px;
}

/* Contenu */
.ed-cookie-popup-content {
    flex: 1;
    padding-right: 15px;
}

/* Titre - style fixe pour éviter héritage du thème */
.ed-cookie-popup-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--ed-cookie-text) !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ed-cookie-popup-text {
    font-size: 13px;
    color: var(--ed-cookie-text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.ed-cookie-popup-text a {
    color: var(--ed-cookie-text);
    text-decoration: underline;
}

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

/* Actions */
.ed-cookie-popup-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* === BOUTONS === */

.ed-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 30px;
    border-radius: var(--ed-cookie-radius-btn);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid var(--ed-cookie-border);
    background: transparent;
    color: var(--ed-cookie-text);
    text-decoration: none;
}

.ed-cookie-btn:hover {
    background: var(--ed-cookie-text);
    color: var(--ed-cookie-bg);
}

.ed-cookie-btn-link {
    background: transparent;
    border: none;
    color: var(--ed-cookie-text-muted);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    padding: 5px 0;
    text-decoration: underline;
}

.ed-cookie-btn-link:hover {
    color: var(--ed-cookie-text);
}

/* === MODAL PRÉFÉRENCES === */

.ed-cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.ed-cookie-modal.active {
    display: flex;
}

.ed-cookie-modal-content {
    background: #ffffff;
    border-radius: var(--ed-cookie-radius);
    padding: 40px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    color: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ed-cookie-modal-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.ed-cookie-modal-intro {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 10px;
    color: #444;
}

.ed-cookie-modal-privacy {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.ed-cookie-modal-privacy a {
    color: #1a1a1a;
    text-decoration: underline;
}

/* Bouton OK en haut du modal */
.ed-cookie-modal-top-btn {
    margin-bottom: 25px;
}

.ed-cookie-modal-top-btn .ed-cookie-btn {
    width: 100%;
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    padding: 14px 30px;
    font-size: 16px;
}

.ed-cookie-modal-top-btn .ed-cookie-btn:hover {
    background: #333;
    border-color: #333;
}

/* === OPTIONS COOKIES === */

.ed-cookie-options {
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
}

.ed-cookie-option {
    padding: 18px 0;
    border-bottom: 1px solid #e5e5e5;
}

.ed-cookie-option:last-child {
    border-bottom: none;
}

.ed-cookie-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.ed-cookie-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.ed-cookie-checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: #ffffff;
    border: 2px solid #ccc;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.ed-cookie-checkbox input:checked ~ .ed-cookie-checkmark {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.ed-cookie-checkbox input:checked ~ .ed-cookie-checkmark::after {
    content: "";
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.ed-cookie-checkbox input:disabled {
    cursor: not-allowed;
}

.ed-cookie-checkbox input:disabled ~ .ed-cookie-checkmark {
    opacity: 0.5;
    background: #e5e5e5;
    border-color: #ccc;
}

.ed-cookie-checkbox input:disabled:checked ~ .ed-cookie-checkmark {
    background: #888;
    border-color: #888;
}

.ed-cookie-option-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.ed-cookie-option-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 8px 0 0 32px;
}

/* === BOUTONS MODAL === */

.ed-cookie-modal-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.ed-cookie-modal-actions .ed-cookie-btn {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
    padding: 12px 35px;
}

.ed-cookie-modal-actions .ed-cookie-btn:hover {
    background: #333;
    border-color: #333;
}

.ed-cookie-modal-actions .ed-cookie-btn-link {
    color: #666;
    font-size: 14px;
}

.ed-cookie-modal-actions .ed-cookie-btn-link:hover {
    color: #1a1a1a;
}

/* === RESPONSIVE === */

@media screen and (max-width: 600px) {
    .ed-cookie-popup {
        bottom: 15px;
        right: 15px;
        left: 15px;
        width: auto;
        max-width: none;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 25px;
        gap: 20px;
    }
    
    .ed-cookie-popup-content {
        padding-right: 0;
    }
    
    .ed-cookie-popup-icon svg {
        width: 70px;
        height: 70px;
    }
    
    .ed-cookie-popup-title {
        font-size: 18px;
    }
    
    .ed-cookie-popup-text {
        font-size: 12px;
    }
    
    .ed-cookie-popup-actions {
        justify-content: center;
    }
    
    .ed-cookie-popup-close {
        top: 10px;
        right: 10px;
    }
    
    /* Modal mobile */
    .ed-cookie-modal-content {
        padding: 25px 20px;
        max-height: 85vh;
    }
    
    .ed-cookie-modal-content h2 {
        font-size: 18px;
    }
    
    .ed-cookie-option-desc {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .ed-cookie-modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .ed-cookie-modal-actions .ed-cookie-btn {
        width: 100%;
    }
}

/* === ANIMATIONS === */

@keyframes edCookieSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes edCookieFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ed-cookie-popup {
    animation: edCookieSlideIn 0.4s ease-out;
}

.ed-cookie-modal {
    animation: edCookieFadeIn 0.3s ease-out;
}
