/* Import de la police Roboto depuis Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

:root {
    /* La couleur principale est maintenant définie par le script JS */
    --cookie-main-color: #E99718; /* Couleur par défaut si JS échoue */
    
    /* Couleurs fonctionnelles */
    --cookie-overlay-bg: rgba(0,0,0,0.7);
    --cookie-modal-bg: #ffffff;
    --cookie-text-color: #333;
    --cookie-btn-reject-bg: #dc3545;
    --cookie-btn-neutral-bg: #6c757d;
}

/* MODIFIÉ : Utilisation de l'ID et de !important pour forcer le centrage */
#cookie-consent-modal {
    /* Utilisation de la nouvelle police */
    font-family: 'Roboto', sans-serif;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: var(--cookie-overlay-bg);
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#cookie-consent-modal.show { opacity: 1; visibility: visible; }

.cookie-modal-content-lg {
    background-color: var(--cookie-modal-bg);
    color: var(--cookie-text-color);
    padding: 40px;
    border-radius: 10px;
    
    /* MODIFIÉ : Modale plus large */
    max-width: 850px;
    width: 90%;
    
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
}
/* MODIFIÉ : Utilisation de l'ID */
#cookie-consent-modal.show .cookie-modal-content-lg { transform: translateY(0); }

/* L'icône prend la couleur principale */
.cookie-icon {
    position: absolute;
    top: 15px; right: 15px;
    width: 60px; height: 60px;
    fill: var(--cookie-main-color);
    opacity: 0.5; /* Légère transparence pour un effet plus doux */
}

/* MODIFIÉ (Polices +0.3rem) */
.cookie-modal-content-lg h3 { 
    margin-top: 0; 
    color: #0d2c4a; 
    font-size: 2.3rem; /* Ancien: 2.0rem */
}

.cookie-modal-content-lg p { 
    font-size: 1.5rem;   /* Ancien: 1.2rem */
    line-height: 1.7;    
    margin-bottom: 30px; 
}

.cookie-legal-link { 
    margin-top: 25px; 
    font-size: 1.3rem; /* Ancien: 1.0rem */
}
.cookie-legal-link a { color: var(--cookie-main-color); text-decoration: underline; }

/* Style des cases à cocher */
.cookie-choice-lg { display: flex; align-items: flex-start; padding: 15px 0; border-bottom: 1px solid #eee; text-align: left; }
.cookie-choice-lg:first-of-type { border-top: 1px solid #eee; }
.cookie-choice-lg input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin-right: 15px; margin-top: 5px;
    font: inherit;
    color: currentColor;
    width: 1.15em; height: 1.15em;
    border: 0.15em solid #ccc;
    border-radius: 0.15em;
    transform: translateY(-0.075em);
    display: grid; place-content: center;
    cursor: pointer;
}
/* Applique la couleur principale quand la case est cochée */
.cookie-choice-lg input[type="checkbox"]:checked {
    background-color: var(--cookie-main-color);
    border-color: var(--cookie-main-color);
}
.cookie-choice-lg input[type="checkbox"]::before {
    content: "";
    width: 0.65em; height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em white;
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.cookie-choice-lg input[type="checkbox"]:checked::before { transform: scale(1); }

/* MODIFIÉ (Polices +0.3rem) */
.cookie-choice-lg label { 
    font-size: 1.5rem; /* Ancien: 1.2rem */
    cursor: pointer; 
}
.cookie-choice-lg small { 
    display: block; 
    color: #555; 
    font-size: 1.3rem; /* Ancien: 1.0rem */
    margin-top: 5px; 
}

/* Boutons d'action */
.cookie-actions-full { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
/* MODIFIÉ (Polices +0.3rem) */
.cookie-btn { 
    padding: 12px 25px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    color: white; 
    font-weight: bold; 
    font-size: 1.3rem; /* Ancien: 1.0rem */
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s; 
    white-space: nowrap; 
}
.cookie-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); opacity: 0.9; }
.cookie-btn-primary { background-color: var(--cookie-main-color); }
.cookie-btn-accept { background-color: var(--cookie-main-color); }
.cookie-btn-reject { background-color: var(--cookie-btn-reject-bg); }
.cookie-btn-neutral { background-color: var(--cookie-btn-neutral-bg); }

/* Onglet de gestion (caché par défaut, affiché par JS) */
.cookie-manage-tab { 
    font-family: 'Roboto', sans-serif; 
    position: fixed; 
    bottom: 15px; 
    right: 65px; 
    background-color: var(--cookie-btn-neutral-bg); 
    color: white; 
    padding: 8px 15px; 
    border-radius: 5px; 
    cursor: pointer; 
    z-index: 9999; 
    display: none; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); 
    transition: transform 0.2s; 
}
.cookie-manage-tab:hover { transform: translateY(-2px); }

/* Responsive */
@media (max-width: 600px) {
    .cookie-modal-content-lg { padding: 40px 20px 20px 20px; }
    /* MODIFIÉ (Polices +0.3rem) */
    .cookie-modal-content-lg h3 { 
        font-size: 1.8rem; /* Ancien: 1.5rem */
    }
    .cookie-actions-full { flex-direction: column; gap: 10px; }
    .cookie-btn { width: 100%; }
}
/* ================================================ */
/* == ADAPTATION POUR LES PETITS ÉCRANS (RESPONSIVE) == */
/* ================================================ */

@media (max-width: 600px) {
    /* Styles existants pour la modale sur mobile */
    .cookie-modal-content-lg { 
        padding: 40px 20px 20px 20px; 
    }
    /* MODIFIÉ (Polices +0.3rem) */
    .cookie-modal-content-lg h3 { 
        font-size: 1.8rem; /* Ancien: 1.5rem */
    }
    .cookie-actions-full { 
        flex-direction: column; 
        gap: 10px; 
    }
    .cookie-btn { 
        width: 100%; 
    }

    /*
     * NOUVEAU : Ajustement de l'icône sur mobile
     */
    .cookie-icon {
        width: 28px;      /* Taille fortement réduite pour le mobile */
        height: 28px;     /* Taille fortement réduite pour le mobile */
        top: 15px;        /* Plus proche du bord supérieur */
        right: 15px;      /* Plus proche du bord droit */
    }

    /*
     * Ajustement de l'onglet "Gérer mes cookies" sur mobile
     */
    .cookie-manage-tab {
        /* MODIFIÉ (Polices +0.3rem) */
        font-size: 1.1rem; /* Ancien: 0.8rem */
        padding: 8px 12px;
        left: 50%;
        right: auto;
        bottom: 10px;       /* distance du bas */
        transform: translateX(-50%);
    }
}