/**
 * Bandeau Cookie RGPD/CNIL - Stickers Garage
 * Conforme aux normes francaises (CNIL)
 */

/* Bandeau principal */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: #fff;
    padding: 20px;
    z-index: 999999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

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

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

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-consent-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #bdc3c7;
}

.cookie-consent-text a {
    color: #3498db;
    text-decoration: underline;
}

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

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

.cookie-consent-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-consent-btn-accept {
    background: #27ae60;
    color: #fff;
}

.cookie-consent-btn-accept:hover {
    background: #2ecc71;
}

.cookie-consent-btn-refuse {
    background: #e74c3c;
    color: #fff;
}

.cookie-consent-btn-refuse:hover {
    background: #ec7063;
}

.cookie-consent-btn-customize {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.cookie-consent-btn-customize:hover {
    background: rgba(255,255,255,0.1);
}

/* Modal de personnalisation */
.cookie-consent-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-consent-modal-overlay.show {
    display: flex;
}

.cookie-consent-modal {
    background: #fff;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.cookie-consent-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-consent-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
}

.cookie-consent-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #7f8c8d;
    line-height: 1;
}

.cookie-consent-modal-close:hover {
    color: #2c3e50;
}

.cookie-consent-modal-body {
    padding: 20px;
}

/* Categories de cookies */
.cookie-category {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
}

.cookie-category-header h4 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.cookie-category-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

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

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

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

.cookie-category-toggle input:checked + .slider {
    background-color: #27ae60;
}

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

.cookie-category-toggle input:disabled + .slider {
    background-color: #27ae60;
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-category-description {
    padding: 15px;
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
    border-top: 1px solid #eee;
}

.cookie-category-required {
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
}

/* Footer modal */
.cookie-consent-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cookie-consent-modal-footer .cookie-consent-btn {
    padding: 10px 20px;
}

/* Bouton pour rouvrir les preferences */
.cookie-consent-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 10px 15px;
    font-size: 12px;
    cursor: pointer;
    z-index: 99998;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.cookie-consent-reopen:hover {
    background: #34495e;
    transform: scale(1.05);
}

.cookie-consent-reopen.show {
    display: flex;
}

.cookie-consent-reopen svg {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 15px;
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-text {
        min-width: auto;
    }

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

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

    .cookie-consent-modal {
        margin: 10px;
        max-height: 90vh;
    }

    .cookie-consent-modal-footer {
        flex-direction: column;
    }

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