/* ==========================================================================
   Positif-Coach — feuille de style du site public
   Couleurs d'origine du site : vert #179731 et jaune #FDB121.
   Cartes blanches, ombres douces, police Public Sans. Responsive, sans dépendance (hors police Google).
   ========================================================================== */
:root {
    --primary: #179731;            /* vert du site */
    --primary-dark: #107524;
    --primary-soft: rgba(23, 151, 49, .10);
    --accent: #FDB121;             /* jaune du site */
    --accent-dark: #e9a00f;
    --accent-soft: rgba(253, 177, 33, .16);
    --bg: #f7faf5;
    --card: #ffffff;
    --border: #e4eadf;
    --text: #55625a;
    --heading: #1f2a22;
    --muted: #84908a;
    --danger: #dc2626;
    --radius: 10px;
    --shadow: 0 8px 24px rgba(20, 60, 30, .07);
    --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.65; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.text-center { text-align: center; }
.muted { color: var(--muted); }

/* Contenu intérieur : le site (container) contient un bloc « col-10 » centré, responsive :
   100 % sur téléphone, 11/12 sur tablette, 10/12 sur ordinateur (1/12 de marge de chaque côté, comme l'ancien site). */
.page-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.col-10 { width: 100%; margin: 0 auto; }
@media (min-width: 768px) { .col-10 { width: 91.6667%; } }
@media (min-width: 992px) { .col-10 { width: 83.3333%; } }

/* ---------- En-tête, LIGNE 1 : le logo centré (transparent) ---------- */
.site-head { background: transparent; }
.logo-row { position: relative; padding: 24px 16px 8px; text-align: center; }
.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none !important; }
.logo-mark {
    display: block; white-space: nowrap; /* le logo reste toujours sur une seule ligne */
    font-size: clamp(18px, 5.4vw, 36px); font-weight: 800; letter-spacing: .08em; color: var(--primary);
}
.logo-mark span { color: var(--accent); }
.logo-tag { font-size: clamp(9px, 2.4vw, 11px); letter-spacing: .2em; text-transform: uppercase; color: var(--text); font-weight: 600; text-align: center; }

/* ---------- En-tête, LIGNE 2 : le menu (transparent, devient plein quand il se colle en haut) ---------- */
.nav-row { position: sticky; top: 0; z-index: 50; background: transparent; transition: background .2s, box-shadow .2s; }
.nav-row.is-stuck { background: rgba(255, 255, 255, .96); box-shadow: 0 4px 16px rgba(20, 60, 30, .10); backdrop-filter: blur(6px); }
.nav-inner { display: flex; align-items: center; justify-content: center; min-height: 52px; }
.nav-list { display: flex; align-items: center; justify-content: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list a, .nav-label, .nav-linkbtn {
    display: block; padding: 15px 12px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--heading); white-space: nowrap; cursor: pointer; background: none; border: 0; font-family: inherit; text-align: left;
}
.nav-list > li > a:hover, .nav-list > li > a.active, .nav-label:hover { color: var(--primary); text-decoration: none; }
.nav-list > li > a.active { box-shadow: inset 0 -3px 0 var(--accent); }
.has-sub > .nav-label::after, .has-sub > a::after { content: ' \25BE'; font-size: 10px; }
.sub { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.nav-list li:hover > .sub, .nav-list li:focus-within > .sub { display: block; }
.sub a, .sub .nav-linkbtn { width: 100%; padding: 9px 12px; border-radius: 6px; text-transform: none; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.sub a:hover, .sub .nav-linkbtn:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }

/* Bouton « trois traits » : visible seulement sur mobile/tablette, en haut à droite sur la ligne du logo */
.nav-toggle { display: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; border-radius: 8px; }
.nav-toggle:hover { background: var(--primary-soft); }
.burger, .burger::before, .burger::after { display: block; width: 24px; height: 3px; background: var(--primary); border-radius: 3px; content: ''; position: absolute; left: 10px; transition: transform .2s, top .2s, background .2s; }
.burger { top: 20px; }
.burger::before { top: -8px; left: 0; } .burger::after { top: 8px; left: 0; }
.nav-toggle[aria-expanded="true"] .burger { background: transparent; }
.nav-toggle[aria-expanded="true"] .burger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 991px) {
    .logo-row { padding: 18px 56px 14px; }                 /* marges symétriques : le logo reste centré, le bouton a sa place */
    .logo-tag { letter-spacing: .14em; }
    .nav-toggle { display: block; }
    .nav-row { position: relative; background: transparent !important; box-shadow: none !important; backdrop-filter: none; }
    .nav-inner { min-height: 0; padding: 0; }
    .nav-list {
        display: none; position: absolute; top: 0; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-top: 3px solid var(--accent); border-bottom: 1px solid var(--border); box-shadow: 0 14px 24px rgba(20, 60, 30, .12);
        padding: 6px 16px 14px; max-height: calc(100vh - 90px); overflow-y: auto;
    }
    .nav-list.open { display: flex; }
    .nav-list a, .nav-label, .nav-linkbtn { padding: 12px 6px; border-bottom: 1px solid var(--border); }
    .nav-list > li > a.active { box-shadow: none; color: var(--primary); }
    .sub { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
    .sub a, .sub .nav-linkbtn { border-bottom: 1px solid var(--border); border-radius: 0; font-size: 13.5px; }
    .has-sub > .nav-label::after, .has-sub > a::after { content: ''; }
}

/* ---------- Bandeau citation ---------- */
.quote-strip { background: var(--accent-soft); text-align: center; padding: 10px 0; font-size: 14px; color: var(--heading); font-style: italic; border-top: 1px solid rgba(253, 177, 33, .35); border-bottom: 1px solid rgba(253, 177, 33, .35); }
.quote-strip b { font-style: normal; color: var(--primary-dark); font-weight: 700; }

/* ---------- Diaporama d'accueil ---------- */
.hero { position: relative; background: #12301a; overflow: hidden; }
.hero-slide { display: none; position: relative; }
.hero-slide.active { display: block; }
.hero-slide img { display: block; width: 100%; height: clamp(210px, 38vw, 430px); object-fit: cover; }
.hero-caption { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 16px 56px; background: linear-gradient(rgba(10, 30, 15, .30), rgba(10, 30, 15, .50)); }
.hero-caption h2 { color: #fff; font-size: clamp(22px, 5.2vw, 54px); font-weight: 800; margin: 0 0 .25em; text-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.hero-caption p { color: #fff; font-size: clamp(14px, 2.5vw, 26px); margin: 0; font-weight: 600; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: var(--heading); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.hero-arrow:hover { background: var(--accent); }
.hero-prev { left: 12px; } .hero-next { right: 12px; }
.hero-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.hero-dot { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; }
.hero-dot.active { background: var(--accent); transform: scale(1.25); }
@media (max-width: 575px) { .hero-arrow { display: none; } .hero-caption { padding: 12px 18px; } }

/* ---------- Mise en page : contenu à gauche, colonne Newsletter à droite ---------- */
.page { padding: 22px 0 50px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.75rem); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
@media (max-width: 991px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 20px; }

/* La colonne Newsletter reste visible pendant le défilement, puis repart avec le bas du contenu de gauche */
@media (min-width: 992px) {
    .layout > aside { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; }
}

/* ---------- Cartes ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 22px; }
.card-head { position: relative; padding: 15px 22px; border-bottom: 1px solid var(--border); font-weight: 700; color: var(--heading); }
.card-head::after { content: ''; position: absolute; left: 22px; bottom: -1px; width: 46px; height: 3px; background: var(--accent); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.post-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20, 60, 30, .12); }
.post-card .thumb { display: block; background: #e8f0e3; }
.post-card .thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.post-card h3 { font-size: 1.02rem; margin-bottom: .4em; }
.post-card h3 a { color: var(--heading); }
.post-card h3 a:hover { color: var(--primary); }
.post-card p { font-size: 14px; flex: 1; }
.post-card .more { font-weight: 700; font-size: 13px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-title h2 { margin: 0; padding-bottom: 6px; border-bottom: 3px solid var(--accent); }

/* ---------- Accueil ---------- */
.welcome { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: center; }
.welcome img { border-radius: var(--radius); width: 210px; }
@media (max-width: 680px) { .welcome { grid-template-columns: 1fr; text-align: center; } .welcome img { margin: 0 auto; } }

/* ---------- Articles ---------- */
.article-img { width: 100%; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.article h1 { font-size: clamp(1.4rem, 4.5vw, 2rem); }
.meta { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.prose { overflow-wrap: anywhere; line-height: 1.8; }
.prose * { max-width: 100%; }
.prose img { height: auto !important; border-radius: 6px; }
.prose table { display: block; overflow-x: auto; }
.prose iframe { width: 100%; }
.quote-big { font-size: clamp(1.1rem, 3.4vw, 1.5rem); color: var(--heading); line-height: 1.6; text-align: center; font-weight: 500; }
.quote-author { text-align: center; font-weight: 700; color: var(--primary); }
.tile-quote { padding: 26px 22px; text-align: center; color: var(--heading); font-size: 1.02rem; font-style: italic; display: flex; align-items: center; justify-content: center; min-height: 160px; }
.share { margin-top: 18px; }

/* ---------- Boutons, formulaires, alertes ---------- */
.btn { display: inline-block; padding: 10px 20px; border-radius: 8px; border: 1px solid transparent; font: 700 14px var(--font); cursor: pointer; text-align: center; text-decoration: none !important; transition: background .15s; }
.btn-primary { background: var(--primary); color: #fff; } .btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #2b2b2b; border-color: #333; } .btn-accent:hover { background: var(--accent-dark); }
.btn-light { background: var(--primary-soft); color: var(--primary-dark); } .btn-light:hover { background: rgba(23, 151, 49, .18); }
.btn-block { display: block; width: 100%; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; color: var(--heading); margin-bottom: 5px; font-size: 14px; }
.form-control { display: block; width: 100%; padding: 10px 13px; font: 400 15px var(--font); color: var(--heading); background: #fff; border: 1px solid #d3dccf; border-radius: 8px; }
.form-control:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field-error { color: var(--danger); font-size: 13px; margin-top: 4px; }
.alert { padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-size: 14px; border: 1px solid transparent; }
.alert-success { background: #e7f6ea; color: #14602a; border-color: #b9e2c3; }
.alert-danger { background: #fdecec; color: #a11d1d; border-color: #f6c7c7; }
.alert ul { margin: 0; padding-left: 18px; }
.auth-card { max-width: 460px; margin: 0 auto; }

/* ---------- Pagination ---------- */
.pager { margin-top: 26px; display: flex; justify-content: center; }
.pager ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; justify-content: center; }
.pager li a, .pager li span { display: block; min-width: 38px; padding: 8px 12px; text-align: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--heading); font-weight: 600; font-size: 14px; }
.pager li a:hover { border-color: var(--primary); text-decoration: none; color: var(--primary); }
.pager li.active span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager li.disabled span { color: #b9c4b5; background: #f6f9f4; }

/* ---------- Pied de page (vert d'origine) ---------- */
.site-foot { background: var(--primary); color: #fff; padding: 30px 0 22px; text-align: center; font-size: 13.5px; border-top: 5px solid var(--accent); }
.site-foot .logo-mark { color: #fff; } .site-foot .logo-mark span { color: var(--accent); }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; list-style: none; margin: 14px 0; padding: 0; }
.foot-links a { color: #fff; font-weight: 600; }
.foot-links a:hover { color: var(--accent); text-decoration: none; }
.foot-copy { color: rgba(255, 255, 255, .8); font-size: 12.5px; }
.foot-copy a { color: rgba(255, 255, 255, .8); text-decoration: underline; }

/* ==========================================================================
   Rendu téléphone / tablette (ajustements)
   ========================================================================== */
/* 8 entrées de menu sur une seule ligne entre 992 et 1199 px */
@media (min-width: 992px) and (max-width: 1199px) {
    .nav-list a, .nav-label, .nav-linkbtn { padding: 15px 8px; font-size: 11.5px; letter-spacing: .03em; }
}
@media (max-width: 767px) {
    body { font-size: 15.5px; }
    .form-control { font-size: 16px; }                 /* évite le zoom automatique sur iPhone */
    .page { padding: 16px 0 36px; }
    .page-head { margin-bottom: 14px; }
    .card-body { padding: 18px; }
    .card-head { padding: 13px 18px; }
    .card-head::after { left: 18px; }
    .section-title { margin: 26px 0 12px; }
    .btn { padding: 12px 20px; }
    .alert { font-size: 14px; }
    .quote-strip { font-size: 13px; padding: 8px 0; }
    .site-foot { padding: 24px 0 18px; }
    .foot-links { gap: 4px 14px; }
}
@media (max-width: 400px) {
    h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; }
    .container, .page-wrap { padding: 0 12px; }
    .hero-caption { padding: 10px 14px; }
}
