/* ==========================================================================
   MA2ID — feuille de style
   Palette tirée du logo : fond brun-noir, textes blanc/gris clair,
   liens bleu (arc bleu du logo) avec survol rouge (arc rouge du logo).
   Toutes les couleurs passent par les variables ci-dessous.
   ========================================================================== */

/* --- Polices hébergées sur le site (aucun appel à Google Fonts) ----------- */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../vendor/fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 800; font-display: swap; src: url('../vendor/fonts/montserrat-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../vendor/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../vendor/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../vendor/fonts/inter-latin-600-normal.woff2') format('woff2'); }

:root {
    /* Fonds */
    --fond:          #1c1a19;   /* brun-noir de base */
    --fond-2:        #24211f;   /* sections alternées */
    --surface:       #2c2826;   /* cartes */
    --surface-2:     #36312e;   /* survol des cartes, menus déroulants */
    --bordure:       #423b37;

    /* Textes */
    --texte:         #f3f1ef;
    --texte-doux:    #c4bdb7;
    --texte-faible:  #8f8781;

    /* Couleurs du logo */
    --bleu:          #0ba9cf;   /* exact logo */
    --bleu-texte:    #3cc3e6;   /* bleu éclairci pour les liens : contraste suffisant sur fond sombre */
    --rouge:         #cc0033;   /* exact logo */
    --rouge-texte:   #ff4d6d;   /* rouge éclairci pour le survol des liens */
    --gris-logo:     #c8c8c8;

    --rayon:         12px;
    --hauteur-pied:  48px;
    --police-titre:  'Montserrat', system-ui, sans-serif;
    --police-texte:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Bootstrap : on aligne ses variables sur notre palette */
    --bs-body-bg:            var(--fond);
    --bs-body-color:         var(--texte);
    --bs-secondary-color:    var(--texte-doux);
    --bs-border-color:       var(--bordure);
    --bs-link-color-rgb:     60, 195, 230;
    --bs-link-hover-color-rgb: 255, 77, 109;
    --bs-emphasis-color:     var(--texte);
}

[data-bs-theme=dark] {
    --bs-body-bg:    var(--fond);
    --bs-body-color: var(--texte);
}

/* --- Base ------------------------------------------------------------------ */
html { scroll-padding-top: 90px; }

body {
    background: var(--fond);
    color: var(--texte);
    font-family: var(--police-texte);
    font-size: 1.02rem;
    line-height: 1.65;
    /* place réservée au pied fixe pour que la fin du contenu ne passe jamais dessous */
    padding-bottom: calc(var(--hauteur-pied) + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .titre {
    font-family: var(--police-titre);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--texte);
}

p, li { color: var(--texte-doux); }

a {
    color: var(--bleu-texte);
    text-decoration: none;
    transition: color .15s ease;
}
a:hover, a:focus-visible { color: var(--rouge-texte); }

:focus-visible {
    outline: 2px solid var(--bleu-texte);
    outline-offset: 2px;
}

::selection { background: var(--rouge); color: #fff; }

.lien-evitement {
    position: absolute; left: 1rem; top: .5rem; z-index: 2000;
    background: var(--rouge); color: #fff; padding: .4rem .8rem; border-radius: 6px;
}

/* --- Barre du haut collante -------------------------------------------------- */
.barre-haut {
    background: rgba(28, 26, 25, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bordure);
}

.bandeau-contact {
    font-size: .82rem;
    color: var(--texte-faible);
    border-bottom: 1px solid rgba(66, 59, 55, .6);
    padding: .3rem 0;
}
.bandeau-contact i { color: var(--rouge-texte); margin-right: .25rem; }
.bandeau-contact a { color: var(--texte-doux); }
.bandeau-contact a:hover { color: var(--rouge-texte); }

.navbar { padding: .55rem 0; }

.navbar-brand {
    display: flex; align-items: center; gap: .6rem;
    color: var(--texte);
}
.navbar-brand img { height: 34px; width: auto; }
.marque {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: .02em;
    color: var(--texte);
}
.marque-2 { color: var(--rouge-texte); }
.navbar-brand:hover .marque { color: var(--texte); }

.navbar-toggler {
    border: 1px solid var(--bordure);
    color: var(--texte);
    font-size: 1.6rem;
    padding: .15rem .55rem;
}
.navbar-toggler:focus { box-shadow: 0 0 0 2px var(--bleu-texte); }

.navbar .nav-link {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: .95rem;
    color: var(--texte-doux);
    padding: .5rem .9rem !important;
    position: relative;
}
.navbar .nav-link:hover,
.navbar .nav-link:focus-visible,
.navbar .nav-link.show { color: var(--texte); }

.navbar .nav-link.active { color: var(--texte); }

/* soulignement bicolore façon logo sous l'onglet actif (bureau) */
@media (min-width: 992px) {
    .navbar .nav-link.active::after {
        content: '';
        position: absolute; left: .9rem; right: .9rem; bottom: .1rem;
        height: 2px;
        background: linear-gradient(90deg, var(--bleu) 0 50%, var(--rouge) 50% 100%);
        border-radius: 2px;
    }
}

.dropdown-menu {
    --bs-dropdown-bg: var(--surface);
    --bs-dropdown-border-color: var(--bordure);
    --bs-dropdown-link-color: var(--texte-doux);
    --bs-dropdown-link-hover-color: var(--texte);
    --bs-dropdown-link-hover-bg: var(--surface-2);
    --bs-dropdown-link-active-color: #fff;
    --bs-dropdown-link-active-bg: var(--rouge);
    --bs-dropdown-divider-bg: var(--bordure);
    border-radius: 10px;
    padding: .4rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}
.dropdown-item {
    border-radius: 6px;
    padding: .5rem .8rem;
    font-size: .93rem;
}
.dropdown-item i { color: var(--bleu-texte); margin-right: .35rem; }
.dropdown-item.active i, .dropdown-item:active i { color: #fff; }

/* Menu mobile : panneau déroulant sous la barre */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: .6rem;
        padding: .5rem 0 .8rem;
        border-top: 1px solid var(--bordure);
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
    .navbar .nav-link { padding: .7rem .2rem !important; font-size: 1.02rem; }
    .navbar .nav-link.active { color: var(--rouge-texte); }
    .dropdown-menu {
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0 0 .4rem .8rem;
        border-left: 2px solid var(--bordure);
        margin-left: .2rem;
    }
}

/* --- Pied de page fixé en bas de l'écran ------------------------------------ */
.pied-fixe {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1020;
    min-height: var(--hauteur-pied);
    padding: .65rem 0 calc(.65rem + env(safe-area-inset-bottom, 0px));
    background: rgba(20, 18, 17, .95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--bordure);
    font-size: .85rem;
    color: var(--texte-faible);
}
.pied-fixe::before {
    /* liseré bleu / rouge du logo */
    content: '';
    position: absolute; left: 0; right: 0; top: -1px; height: 2px;
    background: linear-gradient(90deg, var(--bleu) 0 50%, var(--rouge) 50% 100%);
    opacity: .7;
}
.pied-liens { display: flex; gap: 1.2rem; }
.pied-liens a { color: var(--texte-doux); }
.pied-liens a:hover, .pied-liens a[aria-current] { color: var(--rouge-texte); }

/* --- Sections ----------------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--fond-2); border-top: 1px solid var(--bordure); border-bottom: 1px solid var(--bordure); }

.surtitre {
    display: inline-block;
    font-family: var(--police-titre);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--bleu-texte);
    margin-bottom: .6rem;
}
.surtitre.rouge { color: var(--rouge-texte); }

.titre-section { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.chapo { font-size: 1.12rem; color: var(--texte-doux); max-width: 46rem; }

/* --- Accueil : bandeau d'ouverture --------------------------------------------- */
.ouverture {
    position: relative;
    padding: 5rem 0 4.5rem;
    overflow: hidden;
    isolation: isolate;
}
.ouverture::before {
    /* photo d'automate en arrière-plan, très atténuée */
    content: '';
    position: absolute; inset: 0; z-index: -2;
    background: url('/assets/img/automate-borniers.jpg') center / cover no-repeat;
    opacity: .16;
    filter: grayscale(.4);
}
.ouverture::after {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 80% at 85% 30%, rgba(11, 169, 207, .14), transparent 70%),
        radial-gradient(50% 70% at 10% 90%, rgba(204, 0, 51, .14), transparent 70%),
        linear-gradient(180deg, rgba(28, 26, 25, .3), var(--fond) 95%);
}
.ouverture h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    margin-bottom: 1.2rem;
}
.ouverture h1 .bleu  { color: var(--bleu-texte); }
.ouverture h1 .rouge { color: var(--rouge-texte); }
.ouverture .chapo { font-size: 1.2rem; }

.logo-ouverture {
    width: 100%;
    max-width: 340px;
    height: auto;
    filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .55));
}

.liste-domaines { list-style: none; padding: 0; margin: 1.5rem 0 2rem; }
.liste-domaines li {
    display: flex; align-items: center; gap: .7rem;
    padding: .35rem 0;
    color: var(--texte);
    font-weight: 500;
}
.liste-domaines i { font-size: 1.15rem; }
.liste-domaines li:nth-child(odd) i  { color: var(--bleu-texte); }
.liste-domaines li:nth-child(even) i { color: var(--rouge-texte); }

/* --- Boutons ---------------------------------------------------------------- */
.btn-ma2id {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--rouge);
    --bs-btn-border-color: var(--rouge);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #e0003a;
    --bs-btn-hover-border-color: #e0003a;
    --bs-btn-active-bg: #a8002a;
    --bs-btn-focus-shadow-rgb: 204, 0, 51;
    font-family: var(--police-titre);
    font-weight: 600;
    padding: .7rem 1.4rem;
    border-radius: 8px;
}
.btn-contour {
    --bs-btn-color: var(--texte);
    --bs-btn-border-color: var(--bordure);
    --bs-btn-hover-color: var(--texte);
    --bs-btn-hover-bg: var(--surface-2);
    --bs-btn-hover-border-color: var(--bleu);
    font-family: var(--police-titre);
    font-weight: 600;
    padding: .7rem 1.4rem;
    border-radius: 8px;
}

/* --- Cartes métiers ------------------------------------------------------------ */
.carte {
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
a.carte { color: inherit; }
a.carte:hover {
    transform: translateY(-4px);
    background: var(--surface-2);
}
a.carte.bleu:hover  { border-color: var(--bleu); }
a.carte.rouge:hover { border-color: var(--rouge); }

.carte-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}
.carte-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
a.carte:hover .carte-image img { transform: scale(1.05); }
.carte-image::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(28, 26, 25, .75));
}

.carte-corps { padding: 1.4rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.carte-corps h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.carte-corps p { margin-bottom: 1rem; }
.carte-icone {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 10px;
    font-size: 1.35rem;
    margin-top: -2.6rem;
    margin-bottom: .9rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .4);
}
.bleu .carte-icone  { background: var(--bleu);  color: #fff; }
.rouge .carte-icone { background: var(--rouge); color: #fff; }

.carte-lien {
    margin-top: auto;
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: .9rem;
    color: var(--bleu-texte);
}
a.carte:hover .carte-lien { color: var(--rouge-texte); }
.carte-lien i { transition: transform .2s ease; display: inline-block; }
a.carte:hover .carte-lien i { transform: translateX(4px); }

/* --- Compétences ------------------------------------------------------------ */
.bloc-competence {
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-left: 3px solid var(--bleu);
    border-radius: var(--rayon);
    padding: 1.4rem 1.5rem;
    height: 100%;
}
.bloc-competence:nth-child(even),
.col:nth-child(even) > .bloc-competence { border-left-color: var(--rouge); }
.bloc-competence h3 {
    font-size: 1.05rem;
    display: flex; align-items: center; gap: .6rem;
    margin-bottom: .9rem;
}
.bloc-competence h3 i { color: var(--bleu-texte); font-size: 1.25rem; }
.col:nth-child(even) > .bloc-competence h3 i { color: var(--rouge-texte); }

.puces { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 0; }
.puces li {
    background: var(--fond);
    border: 1px solid var(--bordure);
    border-radius: 999px;
    padding: .28rem .8rem;
    font-size: .88rem;
    color: var(--texte);
}

.bandeau-interventions {
    display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
    padding: 1rem 1.3rem;
    border-radius: var(--rayon);
    background: linear-gradient(90deg, rgba(11, 169, 207, .1), rgba(204, 0, 51, .1));
    border: 1px solid var(--bordure);
    margin-bottom: 2rem;
}
.bandeau-interventions span { color: var(--texte); font-weight: 500; }
.bandeau-interventions i { color: var(--rouge-texte); margin-right: .3rem; }
.bandeau-interventions a { color: var(--bleu-texte); font-weight: 600; border-bottom: 1px dashed currentColor; }
.bandeau-interventions a:hover { color: var(--rouge-texte); }
.bandeau-interventions a i { color: inherit; }

/* --- Encart qualifications (page Formation) ----------------------------------- */
.encart-qualifs {
    border: 1px solid var(--bordure);
    border-left: 3px solid var(--rouge);
    border-radius: var(--rayon);
    background: var(--fond-2);
    padding: 2rem 1.8rem;
}
.liste-qualifs {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem;
}
.liste-qualifs li {
    display: flex; gap: .8rem; align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: 10px;
    padding: .9rem 1rem;
}
.liste-qualifs i { color: var(--rouge-texte); font-size: 1.3rem; line-height: 1.2; }
.liste-qualifs strong { display: block; color: var(--texte); font-weight: 600; line-height: 1.35; }
.liste-qualifs small { display: block; color: var(--texte-faible); margin-top: .15rem; }

/* --- Page métier -------------------------------------------------------------- */
.entete-page {
    position: relative;
    padding: 4rem 0 3rem;
    isolation: isolate;
    border-bottom: 1px solid var(--bordure);
}
.entete-page.avec-image::before {
    content: '';
    position: absolute; inset: 0; z-index: -2;
    background-image: var(--image-fond);
    background-size: cover;
    background-position: center;
    opacity: .28;
}
.entete-page::after {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, var(--fond) 25%, rgba(28, 26, 25, .55)), linear-gradient(0deg, var(--fond), transparent 60%);
}
.entete-page h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }

.fil-ariane { font-size: .85rem; margin-bottom: 1rem; }
.fil-ariane ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.fil-ariane li { color: var(--texte-faible); }
.fil-ariane li + li::before { content: '/'; margin-right: .4rem; color: var(--bordure); }
.fil-ariane a { color: var(--texte-doux); }
.fil-ariane a:hover { color: var(--rouge-texte); }

.etape {
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    padding: 1.6rem 1.7rem;
    height: 100%;
}
.etape-numero {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: .8rem;
    letter-spacing: .12em;
    color: var(--rouge-texte);
}
.etape h2 { font-size: 1.3rem; margin: .3rem 0 .7rem; }

.liste-coches { list-style: none; padding: 0; margin: 0; }
.liste-coches li {
    position: relative;
    padding: .38rem 0 .38rem 1.8rem;
    color: var(--texte);
    border-bottom: 1px dashed rgba(66, 59, 55, .7);
}
.liste-coches li:last-child { border-bottom: 0; }
.liste-coches li::before {
    content: '\F26E';                  /* bi-check2 */
    font-family: 'bootstrap-icons';
    position: absolute; left: 0; top: .38rem;
    color: var(--bleu-texte);
    font-weight: 700;
}

.autres-metiers a {
    display: flex; align-items: center; gap: .7rem;
    padding: .9rem 1.1rem;
    border: 1px solid var(--bordure);
    border-radius: 10px;
    background: var(--surface);
    color: var(--texte);
    font-weight: 500;
}
.autres-metiers a:hover { border-color: var(--rouge); color: var(--texte); background: var(--surface-2); }
.autres-metiers a i:first-child { color: var(--bleu-texte); font-size: 1.2rem; }
.autres-metiers a i:last-child  { margin-left: auto; color: var(--texte-faible); }

/* --- À propos ------------------------------------------------------------------ */
.chiffre-cle {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: clamp(3rem, 8vw, 4.8rem);
    line-height: 1;
    background: linear-gradient(90deg, var(--bleu-texte), var(--rouge-texte));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.photo-cadre {
    border-radius: var(--rayon);
    border: 1px solid var(--bordure);
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
}
.photo-cadre img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Appel à contact -------------------------------------------------------------- */
.appel-contact {
    border-radius: var(--rayon);
    border: 1px solid var(--bordure);
    background:
        radial-gradient(80% 140% at 0% 0%, rgba(11, 169, 207, .16), transparent 60%),
        radial-gradient(80% 140% at 100% 100%, rgba(204, 0, 51, .16), transparent 60%),
        var(--surface);
    padding: 2.4rem 2rem;
}
.appel-contact h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

/* --- Textes longs (mentions légales) ------------------------------------------------ */
.texte-long { max-width: 52rem; }
.texte-long h2 {
    font-size: 1.25rem;
    margin: 2.2rem 0 .8rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--bordure);
}
.texte-long dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.4rem; }
.texte-long dt { color: var(--texte-faible); font-weight: 500; }
.texte-long dd { margin: 0; color: var(--texte); }
@media (max-width: 575.98px) {
    .texte-long dl { grid-template-columns: 1fr; }
    .texte-long dd { margin-bottom: .5rem; }
}

/* --- Page vide / 404 ------------------------------------------------------------------ */
.page-message { padding: 6rem 0; text-align: center; }
.page-message .code {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: clamp(4rem, 14vw, 8rem);
    line-height: 1;
    color: var(--surface-2);
}

/* --- Images génériques ------------------------------------------------------------- */
img { max-width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   BLOG
   ========================================================================== */
.filtres-blog { display: flex; flex-wrap: wrap; gap: .5rem; }
.filtres-blog a {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .45rem .9rem;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    background: var(--surface);
    color: var(--texte-doux);
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: .85rem;
}
.filtres-blog a span {
    background: var(--fond); border-radius: 999px; padding: 0 .45rem;
    font-size: .75rem; color: var(--texte-faible);
}
.filtres-blog a:hover { color: var(--texte); border-color: var(--bleu); }
.filtres-blog a.actif { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.filtres-blog a.actif span { background: rgba(0,0,0,.25); color: #fff; }

.carte-article .carte-image { aspect-ratio: 16 / 9; background: #fff; }
.carte-article .carte-image img { object-fit: contain; padding: .5rem; }
.carte-article .carte-image::after { display: none; }
.carte-article .carte-image.sans-image {
    display: grid; place-items: center;
    background:
        radial-gradient(60% 90% at 15% 20%, rgba(11, 169, 207, .28), transparent 70%),
        radial-gradient(60% 90% at 85% 85%, rgba(204, 0, 51, .28), transparent 70%),
        #141211;
    border-bottom: 1px solid var(--bordure);
}
.carte-article .carte-image.sans-image i { font-size: 3rem; color: rgba(243, 241, 239, .35); }
.carte-cat {
    font-family: var(--police-titre); font-size: .72rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: var(--rouge-texte);
    margin-bottom: .4rem;
}
.carte-article h2 { line-height: 1.35; margin-bottom: .6rem; }
.carte-pied {
    margin-top: auto; display: flex; justify-content: space-between; align-items: center;
    font-size: .82rem; color: var(--texte-faible);
}
.carte-pied i { margin-right: .2rem; }

.pagination-blog { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; }
.pagination-blog a, .pagination-blog span {
    min-width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
    border: 1px solid var(--bordure); border-radius: 8px;
    background: var(--surface); color: var(--texte-doux); font-weight: 600;
}
.pagination-blog a:hover { border-color: var(--bleu); color: var(--texte); }
.pagination-blog .actif { background: var(--rouge); border-color: var(--rouge); color: #fff; }

/* --- Page article -------------------------------------------------------------- */
.conteneur-article { max-width: 860px; }
.article-blog .entete-page h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.2; }
.article-blog .surtitre:hover { color: var(--rouge-texte); }
.meta-article {
    display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin-top: .9rem;
    font-size: .88rem; color: var(--texte-faible);
}
.meta-article i { color: var(--bleu-texte); margin-right: .25rem; }

/* Contenu saisi dans l'éditeur : mêmes règles ici et dans TinyMCE (editeur.css) */
.contenu-article { font-size: 1.05rem; line-height: 1.75; color: var(--texte-doux); overflow-wrap: break-word; }
.contenu-article > *:first-child { margin-top: 0; }
.contenu-article h2 { font-size: 1.5rem; margin: 2.4rem 0 .9rem; padding-bottom: .4rem; border-bottom: 1px solid var(--bordure); }
.contenu-article h3 { font-size: 1.22rem; margin: 2rem 0 .7rem; color: var(--bleu-texte); }
.contenu-article h4 { font-size: 1.05rem; margin: 1.6rem 0 .6rem; }
.contenu-article p { margin: 0 0 1.1rem; }
.contenu-article strong { color: var(--texte); }
.contenu-article ul, .contenu-article ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.contenu-article li { margin-bottom: .35rem; }
.contenu-article li::marker { color: var(--rouge-texte); }
.contenu-article img {
    max-width: 100%; height: auto;
    border-radius: 8px; border: 1px solid var(--bordure);
    background: #fff;
}
.contenu-article img.centre, .contenu-article p > img:only-child { display: block; margin: 1.5rem auto; }
.contenu-article figure { margin: 1.8rem 0; text-align: center; }
.contenu-article figcaption { font-size: .88rem; color: var(--texte-faible); margin-top: .5rem; }
.contenu-article blockquote {
    margin: 1.5rem 0; padding: 1rem 1.3rem;
    border-left: 3px solid var(--bleu); background: var(--surface); border-radius: 0 8px 8px 0;
}
.contenu-article blockquote p:last-child { margin-bottom: 0; }
.contenu-article code {
    font-family: 'Cascadia Code', Consolas, 'Courier New', monospace; font-size: .9em;
    background: var(--surface); border: 1px solid var(--bordure); border-radius: 5px;
    padding: .08rem .38rem; color: #f8c37a;
}
.contenu-article pre {
    margin: 1.4rem 0; padding: 1.1rem 1.3rem;
    background: #141211; border: 1px solid var(--bordure); border-left: 3px solid var(--rouge);
    border-radius: 8px; overflow-x: auto;
    font-size: .92rem; line-height: 1.6;
}
.contenu-article pre code { background: none; border: 0; padding: 0; color: #f3e6d4; font-size: inherit; }
.contenu-article table {
    width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: .95rem;
    display: block; overflow-x: auto;
}
.contenu-article th, .contenu-article td { border: 1px solid var(--bordure); padding: .55rem .8rem; text-align: left; vertical-align: top; }
.contenu-article th { background: var(--surface-2); color: var(--texte); font-weight: 600; }
.contenu-article tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.contenu-article hr { border-color: var(--bordure); opacity: 1; margin: 2rem 0; }
.contenu-article a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.contenu-article iframe { max-width: 100%; border-radius: 8px; }

.navigation-articles {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
    margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--bordure);
}
.nav-art {
    display: flex; flex-direction: column; gap: .3rem;
    padding: 1rem 1.2rem; border: 1px solid var(--bordure); border-radius: 10px;
    background: var(--surface); color: var(--texte);
}
.nav-art small { color: var(--texte-faible); font-size: .8rem; }
.nav-art span { font-weight: 600; line-height: 1.35; }
.nav-art.suivant { text-align: right; grid-column: 2; }
.nav-art:hover { border-color: var(--rouge); color: var(--texte); background: var(--surface-2); }
@media (max-width: 575.98px) {
    .navigation-articles { grid-template-columns: 1fr; }
    .nav-art.suivant { grid-column: 1; }
}
