/**
 * STYLES DE BASE
 * Reset CSS et styles de base pour le projet ANSSI
 */

/* === RESET CSS === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === BODY === */
body {
    font-family: var(--police-principale);
    color: var(--texte-principal);
    line-height: 1.6;
    overflow-x: hidden;
    /* Laisse la place pour le header fixe (logo + menu) */
    padding-top: 60px;
    /* Netteté du texte (évite le flou sur certains écrans) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Quand la bande Flash Infos est affichée, on ajoute sa hauteur
   au décalage pour garder le contenu bien visible sous les deux barres. */
body.has-flash-infos {
    padding-top: 104px; /* 60px header + 44px flash infos */
}

/* === TYPOGRAPHIE === */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--poids-bold);
    color: var(--couleur-secondaire);
}

p {
    margin-bottom: var(--espacement-md);
}

a {
    text-decoration: none;
    transition: all var(--transition-rapide);
}

/* === LISTES === */
ul {
    list-style: none;
}

/*
 * Restaurer les puces pour les listes dans les contenus éditoriaux (richtext).
 * Le reset ci-dessus supprime les puces de TOUS les <ul>, y compris les menus.
 * Les menus ont toujours une classe CSS ou un id (#mobileNavList, .nav-list…).
 * Le contenu Wagtail/richtext génère des <ul>/<ol> sans classe ni id.
 * Exclusion explicite de #mobileNavList par sécurité (ul sans class mais avec id).
 */
ul:not([class]):not([id]) {
    list-style: disc outside;
    padding-left: 1.5em;
}

ul:not([class]):not([id]) li {
    display: list-item;
}

/* Listes ordonnées dans le richtext */
ol:not([class]):not([id]) {
    list-style: decimal outside;
    padding-left: 1.5em;
}

ol:not([class]):not([id]) li {
    display: list-item;
}

/* === BOUTONS === */
button,
[role="button"],
a.card-btn,
a.featured-button {
    cursor: pointer;
    border: none;
    font-family: var(--police-principale);
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 140, 0, 0.2);
    -webkit-user-select: none;
    user-select: none;
}

/* === INPUTS === */
input,
textarea,
select {
    font-family: var(--police-principale);
}

/* === IMAGES === */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Responsive-friendly par défaut */
img[width][height] {
    height: auto;
}

table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

pre,
code {
    max-width: 100%;
    overflow-x: auto;
}

/* === CHARGEMENT PROGRESSIF === */
body.page-loading {
    /* Fallback safety: keep content visible if JS/CSP blocks loader script */
    opacity: 1;
}
body {
    transition: opacity 0.2s ease-in;
}

/* === CLASSES UTILITAIRES === */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}
