/* La Fabrique du Commun — feuille de styles du site */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --navy: #022C5A;
  --navy-2: #1C4775;
  --orange: #FE7D04;
  --orange-text: #D96A00;
  --orange-pale: #FFE3C7;
  --yellow: #FECB04;
  --yellow-pale: #FFF1B8;
  --green: #1AA36D;
  --green-dark: #12784F;
  --green-pale: #DDF3E9;
  --green-ink: #CFEFE1;
  --amber: #FDB004;
  --gray: #F4F6F8;
  --gray-2: #E4EAF2;
  --muted: #3E5470;
  --on-navy: #D5DEE8;
  --white: #FFFFFF;
  --radius: 28px;
  --gap: 16px;
  --section-gap: clamp(40px, 6vw, 72px);
  --pad: clamp(26px, 4vw, 40px);
  --pad-lg: clamp(28px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
h1, h2, h3, h4, p { margin: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* En-tête */
.site-header .wrap {
  padding-top: 18px; padding-bottom: 8px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px;
}
.site-logo img { height: clamp(56px, 8vw, 88px); width: auto; }
.site-nav {
  flex: 1 1 420px; min-width: 0;
  display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  font-weight: 500; font-size: 16px; white-space: nowrap; scrollbar-width: thin;
}
.site-nav a { text-decoration: none; padding: 10px 8px; border-bottom: 3px solid transparent; }
.site-nav a:first-child { margin-left: auto; }
.site-nav a:hover { color: var(--green-dark); }
.site-nav a[aria-current="page"] { font-weight: 700; border-bottom-color: var(--orange); }

main.wrap { padding-top: 12px; padding-bottom: 80px; display: flex; flex-direction: column; gap: var(--section-gap); }
.group { display: flex; flex-direction: column; gap: var(--gap); }
.group--tight { margin-top: calc(var(--gap) - var(--section-gap)); }

/* Tuiles */
.tile { border-radius: var(--radius); padding: var(--pad); }
.tile--lg { padding: var(--pad-lg); }
.tile--navy { background: var(--navy); color: var(--white); }
.tile--orange { background: var(--orange); color: var(--navy); }
.tile--green { background: var(--green-dark); color: var(--white); }
.tile--yellow { background: var(--yellow); color: var(--navy); }
.tile--yellow-pale { background: var(--yellow-pale); color: var(--navy); }
.tile--orange-pale { background: var(--orange-pale); color: var(--navy); }
.tile--gray { background: var(--gray); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--lg { gap: 20px; }

.kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.kicker--yellow { color: var(--yellow); }
.kicker--mint { color: var(--green-ink); }
.kicker--gold { color: #7A5E00; }
.kicker--green { color: var(--green-dark); }
.pill {
  align-self: flex-start; display: inline-block;
  font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px;
}
.pill--orange { background: var(--orange); color: var(--navy); }
.pill--navy { background: var(--navy); color: var(--white); }
.pill--green { background: var(--green-dark); color: var(--white); }
.pill--yellow { background: var(--yellow); color: var(--navy); }
.nowrap { white-space: nowrap; }

.h1 { font-size: clamp(36px, 5.4vw, 68px); line-height: 1.04; font-weight: 800; letter-spacing: -0.02em; max-width: 980px; }
.h2 { font-size: clamp(30px, 3.8vw, 44px); line-height: 1.1; font-weight: 800; max-width: 960px; }
.h2--sm { font-size: clamp(28px, 3.4vw, 40px); }
.h3 { font-size: clamp(24px, 2.8vw, 30px); line-height: 1.15; font-weight: 800; }
.h3--sm { font-size: 24px; }
.hl-yellow { color: var(--yellow); }
.hl-orange { color: var(--orange-text); }
.hl-green { color: var(--green-dark); }
.lead { font-size: clamp(21px, 2.4vw, 30px); line-height: 1.25; font-weight: 700; }
.text-on-navy { color: var(--on-navy); }
.text-muted { color: var(--muted); }
.t16 { font-size: 16px; }
.t17 { font-size: 17px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-family: inherit; font-weight: 600; font-size: 16px;
  padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer; line-height: 1.2;
}
.btn--navy { background: var(--navy); color: var(--white); }
.btn--white { background: var(--white); color: var(--navy); }
.btn--outline { background: var(--white); color: var(--navy); border: 3px solid var(--navy); padding: 10px 20px; }
.btn--lg { font-size: 18px; font-weight: 700; padding: 18px 30px; }
.btn:hover { filter: brightness(1.08); }
.btn svg { flex: 0 0 auto; }

/* Ouverture */
.hero { display: flex; flex-direction: column; gap: 20px; }
.hero .lead { color: var(--green); }
.hero p.text-on-navy { font-size: 19px; }

/* Diagnostic */
.diag-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 40px; padding: 16px 4px 0; }
.counter { flex: 0 1 380px; min-width: 240px; display: flex; flex-direction: column; gap: 8px; }
.counter__labels { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 15px; font-weight: 600; }
.counter__bar { height: 12px; border-radius: 999px; background: var(--gray-2); overflow: hidden; }
.counter__fill { height: 100%; width: 0; background: var(--orange); transition: width .6s ease; }
.diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--gap); }
.diag-tile { display: flex; flex-direction: column; gap: 14px; }
.diag-tile .h3 { margin-top: 4px; }
.diag-tile .diag-foot { padding-top: 10px; }
.diag-tile__ask { font-size: 15px; font-weight: 700; }
.diag-tile p { font-size: 16px; }
.diag-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 20px; }
.diag-foot .btn { flex: 0 0 auto; margin-left: auto; padding: 13px 20px; }
.dots { flex: 1 1 220px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 600; }
.dots li { display: flex; align-items: center; gap: 10px; }
.dots li::before { content: ""; flex: 0 0 10px; height: 10px; border-radius: 50%; background: currentColor; }
.dots--yellow li::before { background: var(--yellow); }
.dots--navy li::before { background: var(--navy); }

.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.band__body { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.band__body p { font-size: 18px; max-width: 760px; }
.band > .btn { flex: 0 0 auto; margin-left: auto; }

/* Onglets */
.tabs { display: flex; flex-direction: column; gap: 24px; }
.tablist { display: flex; flex-wrap: wrap; gap: 10px; }

.tab {
  font-family: inherit; font-size: 15px; font-weight: 700; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  background: var(--white); color: var(--navy); border: 3px solid var(--tab-color, var(--navy));
}
.tab[aria-selected="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
@media (max-width: 760px) {
  /* Téléphone : libellés courts (sans « Notre ») pour que les cinq onglets restent visibles sur deux lignes */
  .tablist { gap: 8px 5px; }
  .tab { font-size: 13.5px; padding: 7px 11px; border-width: 2.5px; white-space: nowrap; }
  .tab__pre { display: none; }
  .tabs.tile--lg { padding-inline: 20px; }
  .tab__word { text-transform: capitalize; }
}.tabpanel { display: flex; flex-direction: column; gap: 16px; }
.tabpanel[hidden] { display: none; }
.tabpanel p { font-size: 18px; }
.summary-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.summary {
  flex: 0 1 720px; min-width: 0; margin: 0;
  background: var(--green-pale); border-radius: 16px; padding: 16px 20px; font-size: 17px !important; font-weight: 700;
}
.summary-row .btn { flex: 0 0 auto; }

/* Cycle */
.cycle { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 56px; }
.cycle__text { flex: 999 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.cycle__text p + p { font-size: 17px; color: var(--muted); }
.cycle__card {
  flex: 1 1 320px; max-width: 420px; min-width: 0; border-radius: 24px; padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--card-bg, var(--navy)); color: var(--card-fg, var(--white)); transition: background .25s ease;
}
.cycle__steps { display: flex; flex-wrap: nowrap; gap: 6px; }
.step-btn {
  /* les 6 pastilles tiennent toujours sur une ligne : elles rétrécissent si la place manque */
  flex: 0 1 40px; min-width: 0; aspect-ratio: 1; border-radius: 50%; padding: 0; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 800;
  background: var(--white); color: var(--navy); border: 3px solid var(--dot);
}
.step-btn[aria-pressed="true"] { background: var(--dot); color: var(--dot-fg); border-color: var(--white); }
.cycle__title { font-size: 26px; line-height: 1.15; font-weight: 800; }
.cycle__desc { font-size: 17px; }
.cycle__next { font-size: 16px; font-weight: 700; }

/* Citation */
.quote { padding: clamp(36px, 6.5vw, 88px) clamp(28px, 6vw, 80px); }
.quote p { max-width: 1060px; font-size: clamp(34px, 5.4vw, 68px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
.quote mark {
  background: var(--navy); color: var(--yellow); padding: 0 .18em; border-radius: .18em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* Actions */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 0 4px; }
.actions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--gap); }
.action { border-radius: 24px; padding: 28px 30px; display: flex; flex-direction: column; gap: 12px; }
.action p { font-size: 16px; }
.action__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid currentColor; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 15px; }
.action__foot a { font-weight: 600; }
.action--navy .action__foot { border-top-color: #355B86; }
.action--green .action__foot { border-top-color: #4E9B80; }
.action--orange .action__foot { border-top-color: #B85A00; }
.action--soon .btn { margin-top: auto; align-self: flex-end; }

/* Blog */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }
.card { text-decoration: none; background: var(--gray); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; }
.card__img { aspect-ratio: 16 / 9; background: var(--yellow-pale); object-fit: cover; width: 100%; }
.card__img--b { background: var(--orange-pale); }
.card__img--c { background: var(--green-pale); }
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 8px; }
.card__meta { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-dark); }
.card__title { font-size: 21px; line-height: 1.25; font-weight: 700; }
.card__lead { font-size: 16px; color: var(--muted); }
.empty { background: var(--gray); border-radius: 24px; padding: 28px; font-size: 17px; color: var(--muted); }

/* Pages intérieures */
.page-hero { display: flex; flex-direction: column; gap: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.chip { text-decoration: none; font-weight: 600; font-size: 16px; background: var(--white); border: 3px solid var(--chip, var(--navy)); padding: 9px 18px; border-radius: 999px; }
.split { display: flex; flex-wrap: wrap; gap: var(--gap); }
.split > * { flex: 1 1 340px; min-width: 0; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.mini { background: var(--gray); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.mini h3 { font-size: 21px; font-weight: 800; }
.mini p { font-size: 16px; }
.agenda { display: flex; flex-direction: column; }
.agenda__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 16px 0; border-bottom: 1px solid #D5DEE8; }
.agenda__row:last-child { border-bottom: 0; }
.agenda__date { flex: 0 0 180px; font-size: 20px; font-weight: 700; color: var(--green-dark); }
.agenda__what { flex: 1 1 260px; font-size: 17px; }

/* Formulaire */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: 16px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  font: inherit; font-size: 17px; padding: 12px 14px; border: 2px solid #C5D0DC; border-radius: 12px; background: var(--white); color: var(--navy); width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: 16px; }
.choice { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.choice--box { background: var(--white); border-radius: 12px; padding: 12px 14px; }
.choice input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--navy); }
.row { display: flex; flex-wrap: wrap; gap: var(--gap); }
.row > .field { flex: 1 1 220px; }
.hint { font-size: 14px; color: var(--muted); }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--muted); }
.consent input { margin-top: 3px; width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--navy); }
.form-status { font-weight: 600; border-radius: 12px; padding: 14px 16px; }
.form-status--ok { background: var(--green-pale); }
.form-status--err { background: #FDE2E2; color: #7A1010; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Textes légaux et articles */
.prose { max-width: 820px; display: flex; flex-direction: column; gap: 14px; }
.prose h2 { font-size: 26px; font-weight: 800; margin-top: 18px; }
.prose p, .prose li { font-size: 17px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose a { color: var(--green-dark); font-weight: 600; }
.sources { font-size: 15px; color: var(--muted); }

/* Pied de page */
.site-footer { background: var(--navy); color: var(--white); }
.site-footer .wrap { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; font-size: 16px; }
.site-footer .col { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: var(--on-navy); }
.site-footer a.strong { color: var(--white); }
.footer-logo { background: var(--white); border-radius: 16px; padding: 12px 16px; align-self: flex-start; }
.footer-logo img { height: 52px; width: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Très petits écrans : un bouton ne dépasse jamais de son bloc */
@media (max-width: 380px) {
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .band > .btn, .summary-row .btn { flex-shrink: 1; }
}

/* Bloc « Actualités et ressources » : même famille que les cartes d'actions, en bandeau */
.action--wide { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.action--wide__body { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.action--wide > .btn { flex: 0 0 auto; margin-left: auto; }

/* Formulaires Nous rejoindre et Contact */
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23022C5A' stroke-width='2.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.profiles .choice--box { border: 2px solid transparent; cursor: pointer; font-weight: 600; }
.profiles .choice--box:has(input:checked) { border-color: var(--navy); }
.tile--white-soft { background: var(--white); padding: 16px 18px; border-radius: 18px; }

/* Ouvertures sans fond (accueil, Nos actions) */
.hero--plain, .page-hero--plain { padding: 12px 4px 4px; }

/* Phrase de synthèse des onglets : aussi large que les paragraphes */
.summary-row .summary { flex: 1 1 100%; }

/* Cartes d'actions avec bouton en bas */
.action__btn { margin-top: auto; align-self: flex-end; }

/* Pages d'actions */
.intertitre { font-size: 20px; font-weight: 800; }
.tile--navy .intertitre { color: var(--accent-orange, var(--yellow)); }
.intertitre--green { color: var(--green-dark); }
.mini h3 { line-height: 1.2; }
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 4px; }
.timeline__step { background: var(--white); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; border-top: 6px solid var(--step); font-size: 16px; }
.timeline__step strong { font-size: 18px; }
.timeline__when { font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Retour à la ligne réservé aux grands écrans (questions du diagnostic) */
.br-wide { display: none; }
@media (min-width: 1000px) { .br-wide { display: block; } }

/* Menu : bouton et liste déroulante sur téléphone */
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .site-header .wrap { position: relative; flex-wrap: nowrap; padding-bottom: 12px; }
  .site-logo img { height: 56px; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto; cursor: pointer;
    font: inherit; font-size: 16px; font-weight: 700; color: var(--navy);
    background: var(--white); border: 2.5px solid var(--navy); border-radius: 999px; padding: 9px 16px;
  }
  .menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
    display: block; width: 18px; height: 2.5px; border-radius: 2px; background: currentColor; position: relative;
    transition: transform .2s ease, background .2s ease;
  }
  .menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle__bars::before { top: -6px; }
  .menu-toggle__bars::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] { background: var(--navy); color: var(--white); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  html.js .site-nav {
    display: none; position: absolute; z-index: 20; top: calc(100% - 4px); left: 20px; right: 20px;
    flex-direction: column; gap: 0; padding: 8px; overflow: visible; white-space: normal;
    background: var(--white); border-radius: 20px; box-shadow: 0 14px 40px rgba(2, 44, 90, .18);
  }
  html.js .site-nav.is-open { display: flex; }
  html.js .site-nav a { margin-left: 0; padding: 14px 16px; font-size: 17px; border-bottom: 0; border-left: 4px solid transparent; border-radius: 12px; }
  html.js .site-nav a + a { border-top: 1px solid var(--gray-2); border-top-left-radius: 0; border-top-right-radius: 0; }
  html.js .site-nav a[aria-current="page"] { border-left-color: var(--orange); background: var(--gray); }
}

/* Actualités et ressources : fiches de veille */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { font: inherit; font-size: 14px; font-weight: 700; color: var(--navy); background: var(--white); border: 2px solid var(--navy); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.filter[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.fiches { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: var(--gap); }
.fiche { border-radius: 24px; padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; background: var(--gray); }
.fiche--navy { background: var(--soft-navy, #D9E6F4); }
.fiche--orange { background: var(--soft-orange, #FFDCBC); }
.fiche--green { background: var(--soft-green, #D2EEDF); }
.fiche--yellow { background: var(--soft-yellow, #FFEDA3); }
.fiche__theme { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); opacity: .75; }
.fiche__title { font-size: 21px; font-weight: 800; line-height: 1.2; }
.fiche__meta { font-size: 14px; color: var(--muted); font-weight: 600; }
.fiche__resume, .fiche__why { font-size: 16px; }
.fiche__deadline { align-self: flex-start; font-size: 14px; font-weight: 700; background: var(--white); border-radius: 999px; padding: 5px 12px; }
.fiche__foot { margin-top: auto; padding-top: 6px; display: flex; justify-content: flex-end; }
