/* Variables CSS pour les couleurs du thème restaurant */
:root {
    --restaurant-50: #fef7ee;
    --restaurant-100: #fdedd3;
    --restaurant-200: #fad7a5;
    --restaurant-300: #f6bb6d;
    --restaurant-400: #f19b47;
    --restaurant-500: #ec7c30;
    --restaurant-600: #d4621f;
    --restaurant-700: #b04d1c;
    --restaurant-800: #8f3f1d;
    --restaurant-900: #73361a;
    --restaurant-950: #3e1a0c;
}

/* Style de base pour le site */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

header {
    background: var(--restaurant-600);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Bannière de consentement */
.consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.consent-banner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--restaurant-200);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 100%;
    animation: slideUp 0.3s ease-out;
}

.consent-content {
    padding: 1.5rem;
}

.consent-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.consent-icon {
    font-size: 2rem;
    background: var(--restaurant-100);
    padding: 0.75rem;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.consent-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.consent-text p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

.consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--restaurant-600);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 98, 31, 0.3);
}

.btn-primary:hover {
    background: var(--restaurant-700);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-outline {
    background: transparent;
    color: var(--restaurant-700);
    border: 1px solid var(--restaurant-300);
}

.btn-outline:hover {
    background: var(--restaurant-50);
}

.consent-links {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.consent-links a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.consent-links a:hover {
    color: var(--restaurant-600);
}

/* Modal des préférences */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    background: #f3f4f6;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body > p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-icon {
    font-size: 1rem;
}

.category-title {
    font-weight: 500;
    color: #111827;
}

.category-description {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

/* Switch toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

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

input:checked + .slider {
    background-color: var(--restaurant-600);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

input:disabled + .slider {
    background-color: #22c55e;
    cursor: not-allowed;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Classes utilitaires pour cacher les éléments */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .consent-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .consent-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .consent-links {
        justify-content: center;
        text-align: center;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-footer {
        flex-direction: column;
    }
}

@media (min-width: 768px) {
    .consent-overlay {
        padding: 1.5rem;
    }
    
    .consent-header {
        align-items: flex-start;
    }
    
    .consent-actions {
        justify-content: flex-end;
    }
    
    .btn {
        width: auto;
    }
}
