* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }

:root { --bleu: #1e3a8a; --bleu-clair: #3b82f6; --jaune: #fbbf24; --arrondi: 24px 0 24px 0; }

body {
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding-top: 64px;
    padding-bottom: 56px;
    min-height: 100vh;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
main { padding: 30px 0 40px; }

/* Bandeaux fixes */
header, footer { background-color: var(--bleu); color: #fff; position: fixed; left: 0; width: 100%; z-index: 10; }
header { top: 0; padding: .8rem 0; }
footer { bottom: 0; padding: 14px 0; text-align: center; font-size: .9rem; }
header .container { display: flex; justify-content: space-between; align-items: center; }

.logo { display: flex; align-items: center; font-size: 1.1rem; font-weight: bold; color: #fff; text-decoration: none; white-space: nowrap; }
.logo svg { margin-right: 8px; }

nav { display: flex; align-items: center; }
nav ul { list-style: none; display: flex; }
nav li + li { margin-left: 16px; padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .5); }
nav a { color: #fff; text-decoration: none; font-weight: bold; font-size: .95rem; padding-bottom: 3px; border-bottom: 2px solid transparent; }
nav a:hover { color: #93c5fd; }
nav a.active { border-bottom-color: #fff; }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Titres */
.page-title { color: var(--bleu); font-size: 2rem; margin-bottom: 25px; text-align: center; }
.lead { text-align: center; max-width: 700px; margin: -10px auto 30px; font-size: 1.1rem; }

/* Articles encadrés */
.card { display: flex; align-items: center; gap: 30px; border: 2px solid var(--bleu); border-radius: 8px; padding: 25px; background: #fff; }
.card-image { flex: 1; max-width: 420px; }
.card-text { flex: 1.3; }
.card h2 { color: var(--bleu); font-size: 1.4rem; margin-bottom: 12px; }
.card h3 { color: var(--bleu); font-size: 1.1rem; margin: 15px 0 8px; }
.card p { margin-bottom: 12px; }
.card ul { margin: 0 0 15px 20px; }
.card li { margin-bottom: 6px; }

/* Images : angles arrondis en haut à gauche et en bas à droite */
img { width: 100%; height: auto; display: block; border-radius: var(--arrondi); }

/* Accueil */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }
.card-vertical { flex-direction: column; align-items: stretch; text-align: center; gap: 18px; }
.card-vertical .card-image { flex: none; max-width: 100%; }
.card-vertical .card-text { display: flex; flex-direction: column; flex: 1; }
.card-vertical p { flex: 1; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 25px; }
.service-item { border: 2px solid var(--bleu); border-radius: 8px; padding: 20px; text-align: center; }
.service-item h3 { color: var(--bleu); font-size: 1.1rem; margin-bottom: 10px; }

/* Page formation : colonne latérale (encadré, image, encadré) */
.card-formation { align-items: stretch; }
.card-side { flex: 1; max-width: 420px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.card-side .card-image { flex: none; max-width: 100%; }
.card-note { background: #eef4ff; border-left: 4px solid var(--jaune); border-radius: 4px; padding: 12px 16px; }
.card-note h3 { margin: 0 0 6px; }
.card-text .card-note { margin-top: 16px; }
.card-note p { margin: 0; font-size: .95rem; }

/* Liens dans les textes */
.card-text a:not(.btn) { color: var(--bleu); font-weight: bold; }
.card-text a:not(.btn):hover { color: var(--bleu-clair); }

/* Pastille « Nouveauté » */
.badge { display: inline-block; background-color: var(--jaune); color: var(--bleu); font-size: .8rem; font-weight: bold; text-transform: uppercase; letter-spacing: .04em; padding: 3px 12px; border-radius: 999px; margin-bottom: 10px; }
.card-vertical .badge { align-self: center; }
.mention { font-size: .9rem; color: var(--bleu); }
.card-vertical p.mention { flex: none; }

/* Boutons */
.buttons { margin-top: 10px; }
.buttons.center { text-align: center; margin-top: 30px; }
.btn { display: inline-block; background-color: var(--bleu); color: #fff; padding: 10px 22px; text-decoration: none; border-radius: 5px; font-weight: bold; }
.btn:hover { background-color: var(--bleu-clair); }

/* Mention en pied de page */
.credit { opacity: .85; }
.credit::before { content: "\00b7\00a0"; }

/* Mobile */
@media (max-width: 960px) {
    .hamburger { display: block; }
    nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background-color: var(--bleu); padding: 15px 20px; }
    nav ul.active { display: flex; }
    nav li + li { margin-left: 0; padding-left: 0; border-left: none; }
    nav a { margin: 8px 0; display: inline-block; }
}
@media (max-width: 768px) {
    body { padding-bottom: 84px; }
    .credit { display: block; font-size: .8rem; }
    .credit::before { content: none; }
    .logo { font-size: 1rem; }
    .page-title { font-size: 1.6rem; }
    .card { flex-direction: column; padding: 18px; }
    .card-image { max-width: 100%; }
    /* Formation : sur mobile, l'image puis le texte principal, puis les encadrés */
    .card-formation .card-side { display: contents; }
    .card-formation .card-image { order: 1; }
    .card-formation .card-text { order: 2; }
    .card-formation .card-note:first-child { order: 3; }
    .card-formation .card-note:last-child { order: 4; }
}
