/* --- Styles de base et utilitaires --- */
[x-cloak] { display: none !important; }
.cookie-consent-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Overlay et Conteneurs Généraux --- */

.cookie-consent-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto; /* Important pour les modals */
}

/* --- Styles du Banner (Pop-up initial) --- */

.cookie-consent-banner {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 32rem;
    width: 100%;
    margin: 1rem;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-consent-title {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    margin-bottom: 0.25rem;
}

.cookie-consent-description {
    color: #4b5563; /* text-gray-700 */
    font-size: 0.875rem; /* text-sm */
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

/* --- Styles des Boutons Généraux --- */

.cookie-consent-button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.cookie-consent-button-primary {
    background-color: #083f45; /* bg-pink-500 */
    color: white;
}
.cookie-consent-button-primary:hover {
    background-color: #083f45; /* hover:bg-pink-600 */
}

.cookie-consent-button-secondary {
    background-color: #e5e7eb; /* bg-gray-200 */
    color: #374151; /* text-gray-800 */
}
.cookie-consent-button-secondary:hover {
    background-color: #d1d5db; /* hover:bg-gray-300 */
}

.cookie-consent-button-tertiary {
    background-color: white;
    border-color: #d1d5db;
    color: #374151;
}
.cookie-consent-button-tertiary:hover {
    background-color: #f9fafb;
}

/* --- Styles du Menu des Paramètres (Settings Modal) --- */

.cookie-consent-settings-modal {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 36rem; /* max-w-xl */
    width: 100%;
    margin: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 1.5rem; /* Ajouté manquant */
    position: relative;
}

.cookie-consent-close-button-container {
    position: absolute;
    top: 0;
    right: 0;
    padding: 1rem;
}

.cookie-consent-close-button {
    background: none;
    border: none;
    color: #9ca3af; /* text-gray-400 */
    cursor: pointer;
}
.cookie-consent-close-button:hover {
    color: #6b7280; /* hover:text-gray-500 */
}
.cookie-consent-icon-close {
    height: 1.5rem;
    width: 1.5rem;
    stroke: currentColor;
}

.cookie-consent-settings-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: bold;
    text-align: center;
    margin-bottom: 1rem;
    /* Pour simuler le gradient textuel, c'est plus complexe en pur CSS.
       Vous pouvez utiliser une couleur unie à la place: */
    color: #083f45; /* Rose par défaut */
}

.cookie-consent-categories-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-consent-category-item {
    border: 1px solid #e5e7eb; /* border border-gray-200 */
    border-radius: 0.5rem;
    padding: 1rem;
}

.cookie-consent-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-consent-category-title {
    font-weight: 600; /* font-semibold */
}

.cookie-consent-category-description {
    font-size: 0.875rem; /* text-sm */
    color: #4b5563; /* text-gray-600 */
    margin-top: 0.25rem;
}

.cookie-consent-toggle-container,
.cookie-consent-status-container {
    margin-left: 1rem;
}

/* --- Styles pour le Bouton Bascule (Toggle Switch) --- */
.cookie-consent-toggle-label {
    position: relative;
    display: inline-block;
    width: 2.75rem; /* w-11 */
    height: 1.5rem; /* h-6 */
    cursor: pointer;
}

.cookie-consent-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db; /* bg-gray-200 */
    border-radius: 1.5rem; /* rounded-full */
    transition: 0.4s;
}

.cookie-consent-toggle-slider:before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    height: 1.25rem; /* h-5 */
    width: 1.25rem; /* w-5 */
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
    border: 1px solid #d1d5db; /* border-gray-300 */
}

.cookie-consent-toggle-checked {
    background-color: #083f45; /* peer-checked:bg-pink-500 */
}

.cookie-consent-toggle-checked:before {
    transform: translateX(1.1rem); /* Calcul basé sur la taille du slider */
}

/* --- Statut Actif (pour les cookies Essentiels) --- */

.cookie-consent-status-active {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #f3f4f6; /* bg-gray-100 */
    color: #374151; /* text-gray-800 */
    font-size: 0.75rem; /* text-xs */
    border-radius: 0.25rem; /* rounded */
}

.cookie-consent-settings-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}
