/**
 * Styles pour le bandeau de consentement des cookies
 * Conforme RGPD
 */

/* Bandeau principal */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    transition: bottom 0.4s ease-in-out;
    border-top: 3px solid var(--primary-color, #d4a5a5);
}

.cookie-banner-show {
    bottom: 0;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 20px;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    font-size: 48px;
    color: var(--primary-color, #d4a5a5);
    animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #333;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.cookie-banner-text a {
    color: var(--primary-color, #d4a5a5);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Boutons */
.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.cookie-btn-accept {
    background: var(--primary-color, #d4a5a5);
    color: white;
}

.cookie-btn-accept:hover {
    background: #c69a9a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 165, 0.3);
}

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

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

.cookie-btn-secondary {
    background: #ffffff;
    color: #333;
    border: 2px solid #ddd;
}

.cookie-btn-secondary:hover {
    background: #f5f5f5;
    border-color: var(--primary-color, #d4a5a5);
    color: var(--primary-color, #d4a5a5);
}

/* Panneau de personnalisation */
.cookie-customize-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cookie-panel-show {
    opacity: 1;
    visibility: visible;
}

.cookie-customize-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease-out;
}

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

.cookie-customize-header {
    padding: 25px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-customize-header h3 {
    margin: 0;
    font-size: 22px;
    color: #333;
}

.cookie-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.cookie-close:hover {
    color: #333;
}

.cookie-customize-body {
    padding: 25px;
}

.cookie-category {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

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

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-info h4 i {
    color: var(--primary-color, #d4a5a5);
}

.cookie-category-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--primary-color, #d4a5a5);
}

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

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

.cookie-customize-footer {
    padding: 20px 25px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

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

    .cookie-banner-icon {
        font-size: 36px;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-customize-content {
        width: 95%;
        max-height: 95vh;
    }

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

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

/* Animation de chargement */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
