/* Bannière de cookies */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    color: black;
    padding: 20px;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    font-family: inherit;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    padding-right: 20px;
    line-height: 1.5;
    min-width: 250px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px !important;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    background: #000000 !important;
    color:#ffffff !important;
}



/* Modale */
#cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.close-modal {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 5px;
    transition: color 0.3s ease;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #333;
    background: rgba(0,0,0,0.1);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-category {
    font-size:12px;
    margin-bottom: 24px;
    padding: 20px;
    border: 2px solid #f1f2f6;
    border-radius: 8px;
    background: #fafbfc;
    transition: border-color 0.3s ease;
}

.cookie-category:hover {
    border-color: #ddd;
}

.cookie-category h4 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.cookie-category p {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

.slider {
    position: relative;
    width: 54px;
    height: 28px;
    background: #ccc;
    border-radius: 28px;
    transition: background 0.3s ease;
    margin-right: 12px;
    flex-shrink: 0;
}

.slider:before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .slider {
    background: #27ae60;
}

.cookie-toggle input:checked + .slider:before {
    transform: translateX(26px);
}

.cookie-toggle input:disabled + .slider {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-toggle span:last-child {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid #eee;
    text-align: right;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Lien paramètres cookies */
#cookie-settings-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

#cookie-settings-link a {
    background: #2c3e50;
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#cookie-settings-link a:hover {
    background: #34495e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#cookie-banner {
    animation: slideUp 0.5s ease-out;
}

#cookie-modal {
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideUp 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cookie-content p {
        padding-right: 0;
        min-width: auto;
    }
    
    .cookie-buttons {
        justify-content: center;
        width: 100%;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: auto;
    }
    
    #cookie-modal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 100%;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 20px;
    }
    
    .cookie-category {
        padding: 16px;
    }
    
    #cookie-settings-link {
        bottom: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    #cookie-banner {
        padding: 15px;
    }
    
    .cookie-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
}

/* Focus et accessibilité */
.cookie-btn:focus,
.close-modal:focus,
#cookie-settings-link a:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.cookie-toggle:focus-within .slider {
    box-shadow: 0 0 0 2px #3498db;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .cookie-btn {
        border: 2px solid currentColor;
    }
    
    .modal-content {
        border: 2px solid #000;
    }
    
    .cookie-category {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-btn,
    .close-modal,
    #cookie-settings-link a,
    .slider:before {
        transition: none;
    }
    
    #cookie-banner,
    #cookie-modal,
    .modal-content {
        animation: none;
    }
}
/*****/
#cookie-modal .cm-accordion {
    background-color: #f1f1f1;
    cursor: pointer;
    padding: 10px 15px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: background-color 0.2s ease;
    margin: 10px 0;
    font-weight: normal;
    color:#565656;
}

#cookie-modal .cm-accordion:hover {
    background-color: #e0e0e0;
}

#cookie-modal .cm-accordion:after {
    content: "▼";
    float: right;
    margin-left: 10px;
}

#cookie-modal .cm-accordion.active:after {
    content: "▲";
}

#cookie-modal .cm-accordion-content {
    display: none;
    padding: 10px 0;
    border-top: 1px solid #ccc;
}
