/* Reset de base et styles généraux */
.cookie-banner * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Styles du bandeau de cookies */
.cookie-banner {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    max-width: 400px;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Classe pour masquer des éléments */
.d-none {
    display: none !important;
}

/* En-tête du bandeau */
.cookie-banner-header {
    margin-bottom: 1rem;
}

.cookie-banner-header span {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.cookie-banner-header p {
    margin-bottom: 1rem;
    color: #666;
}

/* Zone des boutons d'action */
.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Styles des boutons */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

/* Bouton principal bleu */
.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Bouton avec contour secondaire */
.btn-outline-secondary {
    color: #6c757d;
    background-color: transparent;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Bouton avec contour principal */
.btn-outline-primary {
    color: #007bff;
    background-color: transparent;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* Bouton lien */
.btn-link {
    font-weight: 400;
    color: #007bff;
    background-color: transparent;
    border: none;
    text-decoration: none;
}

.btn-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Conteneur des catégories de cookies */
.cookie-categories-wrapper {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
    padding-right: 0.5rem;
}

/* Catégorie individuelle de cookies */
.cookie-category {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* Mise en page flex pour aligner les éléments horizontalement */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

/* Styles pour les cases à cocher */
.form-check {
    position: relative;
    display: block;
    padding-left: 1.25rem;
}

.form-check-input {
    position: absolute;
    margin-top: 0.3rem;
    margin-left: -1.25rem;
}

.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
}

.fw-bold {
    font-weight: 700;
}

/* Styles pour le texte grisé */
.text-muted {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Styles des liens */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Détails des cookies */
.cookie-details {
    background-color: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Styles pour le tableau */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table-sm {
    font-size: 0.875rem;
}

.table-borderless th,
.table-borderless td {
    border: 0;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table th,
.table td {
    padding: 0.5rem;
    vertical-align: top;
    text-align: left;
}

/* Pied de page du bandeau */
.cookie-banner-footer {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

/* Utilitaires d'espacement */
.mb-3 {
    margin-bottom: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

/* Media queries pour la responsivité */
@media (max-width: 576px) {
    .cookie-banner {
        bottom: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 8px 8px 0 0;
    }
    
    .cookie-banner-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn {
        width: 100%;
    }
}

/* Styles pour le second écran (paramètres des cookies) */
#cookie-preferences-panel h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Styles pour les icônes Bootstrap (simulés si nécessaire) */
.bi {
    display: inline-block;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -0.125em;
}

.bi-chevron-down::before {
    content: "▼";
    font-size: 0.75em;
}

.bi-chevron-up::before {
    content: "▲";
    font-size: 0.75em;
}

/* Utilitaires supplémentaires */
.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}