/*
 * Site d'un écosystème — feuille unique, sans framework.
 * Les couleurs et les polices viennent de la console (variables posées dans
 * <head>) : --primary, --on-primary, --secondary, --on-secondary, --accent,
 * --ink, --bg, --font-heading, --font-body.
 */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --primary: #1e3a8a; --on-primary: #fff; --secondary: #b45309; --on-secondary: #fff; --accent: #0369a1;
    --ink: #0f172a; --bg: #fff; --muted: #475569; --line: #e2e8f0; --soft: #f8fafc;
    --radius: 14px; --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
    --font-heading: system-ui, sans-serif; --font-body: system-ui, sans-serif;
    --header-h: 72px;
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)); }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; flex-shrink: 0; }

/* Boutons (contraste AA : texte calculé d'après la luminance par la console). */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.25rem; border-radius: 999px;
    border: 2px solid transparent; font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn-lg { padding: .85rem 1.6rem; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { background: var(--secondary); color: var(--on-secondary); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-ghost { border-color: rgba(255, 255, 255, .75); color: #fff; background: rgba(255, 255, 255, .08); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; padding-top: env(safe-area-inset-top); }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { height: 44px; width: auto; max-width: 160px; object-fit: contain; }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font: 800 1.3rem var(--font-heading); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text strong { font-family: var(--font-heading); font-size: 1.2rem; letter-spacing: .04em; }
.brand-sub { font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a { display: block; padding: .55rem .85rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .97rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.4rem; cursor: pointer; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: inline-block; }
@media (max-width: 900px) {
    .nav-toggle { display: inline-grid; place-items: center; }
    .site-nav { position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top)) 0 auto 0; background: #fff; border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px rgba(15, 23, 42, .12); display: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
    .site-nav.is-open { display: block; }
    .site-nav ul { flex-direction: column; padding: .75rem 16px 1rem; }
    .site-nav a { padding: .85rem 1rem; border-radius: 10px; }
    .brand-sub { display: none; }
}

/* Héros */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden;
    background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--secondary) 55%, transparent), transparent 60%),
                linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #000)); }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, color-mix(in srgb, var(--primary) 92%, #000), color-mix(in srgb, var(--ink) 70%, transparent)); opacity: .6; }
.hero-inner { padding: clamp(4.5rem, 12vw, 9rem) 16px clamp(4rem, 10vw, 7.5rem); max-width: 1200px; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 8vw, 5.2rem); letter-spacing: .02em; margin-bottom: .15em; }
.kicker { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; padding: .35rem .8rem; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); }
.hero-name { font: 600 clamp(1.05rem, 2.2vw, 1.4rem)/1.35 var(--font-heading); max-width: 46ch; opacity: .95; }
.hero-lead { font-size: clamp(1.05rem, 1.8vw, 1.2rem); max-width: 62ch; opacity: .92; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section:nth-of-type(even) { background: var(--soft); }
.section-head { max-width: 760px; margin-bottom: 2.25rem; }
.section-head h2::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; margin-top: .6rem; background: var(--secondary); }
.section-lead { color: var(--muted); font-size: 1.12rem; }
.section-more { margin-top: 2rem; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose blockquote { margin: 1.5em 0; padding: .5em 1.2em; border-left: 4px solid var(--secondary); color: var(--muted); }
.about-grid { display: grid; gap: 3rem; }
.about-grid.has-image { grid-template-columns: 1.2fr 1fr; align-items: center; }
.about-title { font-size: 1.35rem; color: var(--primary); }
.about-figure { margin: 0; }
.about-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .about-grid.has-image { grid-template-columns: 1fr; } }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.stats-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: .25rem; border-top: 4px solid var(--primary); }
.stat-icon { color: var(--secondary); font-size: 1.5rem; }
.stat-value { font: 800 2.4rem/1.1 var(--font-heading); color: var(--primary); }
.stat-label { color: var(--muted); font-weight: 600; }

.members-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.member-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; transition: transform .2s, box-shadow .2s; }
.member-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15, 23, 42, .1); }
.member-logo { height: 72px; display: flex; align-items: center; }
.member-logo img { max-height: 72px; width: auto; max-width: 180px; object-fit: contain; }
.member-initials { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; font: 800 1.15rem var(--font-heading);
    background: color-mix(in srgb, var(--primary) 12%, #fff); color: var(--primary); }
.member-body { flex: 1; }
.member-title { font-size: 1.35rem; margin-bottom: .2rem; }
.member-name { font-weight: 600; color: var(--ink); margin-bottom: .6rem; }
.member-text { color: var(--muted); font-size: .98rem; }
.member-place { display: flex; gap: .4rem; align-items: center; color: var(--muted); font-size: .92rem; }
.member-link { align-self: flex-start; }
.badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .02em; padding: .25rem .6rem; border-radius: 999px;
    background: color-mix(in srgb, var(--secondary) 14%, #fff); color: color-mix(in srgb, var(--secondary) 70%, #000); }
.badge-outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.counters { display: flex; gap: 1.5rem; margin: .8rem 0 0; padding-top: .8rem; border-top: 1px dashed var(--line); }
.counters div { display: flex; flex-direction: column-reverse; }
.counters dt { font-size: .8rem; color: var(--muted); text-transform: capitalize; }
.counters dd { margin: 0; font: 800 1.4rem var(--font-heading); color: var(--primary); }

.features-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.feature { padding: 1.6rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 1rem;
    background: color-mix(in srgb, var(--primary) 10%, #fff); color: var(--primary); }
.feature p { color: var(--muted); margin-bottom: .5rem; }
.more { font-weight: 600; display: inline-flex; gap: .3rem; align-items: center; }

.news-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.news-card { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.news-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-body { padding: 1.25rem 1.4rem 1.5rem; }
.news-body h3 a { color: var(--ink); text-decoration: none; }
.news-body h3 a:hover { color: var(--primary); }
.stretched::after { content: ""; position: absolute; inset: 0; }
.news-date { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: .4rem; }

.testimonials-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.testimonial { margin: 0; padding: 1.6rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); height: 100%; }
.testimonial blockquote { margin: 0 0 1rem; font-size: 1.05rem; }
.testimonial blockquote::before { content: "“"; display: block; font: 800 3rem/1 var(--font-heading); color: var(--secondary); }
.testimonial figcaption { display: flex; align-items: center; gap: .75rem; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

.faq-list { display: grid; gap: .75rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 1.25rem; }
.faq-item summary { cursor: pointer; padding: 1rem 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; min-height: 44px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; color: var(--primary); line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-answer { color: var(--muted); padding-bottom: .5rem; }

.partners-grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; }
.partners-grid img { max-height: 56px; width: auto; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.partners-grid a:hover img { filter: none; opacity: 1; }

.section-contact { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, #fff), #fff) !important; }
.contact-band { display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center; }
@media (max-width: 760px) { .contact-band { grid-template-columns: 1fr; } }
.contact-details { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .6rem; }
.contact-details li { display: flex; gap: .6rem; align-items: flex-start; }
.contact-details .icon { color: var(--primary); margin-top: .3em; }

/* Pages intérieures */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, #fff), var(--bg)); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.page-lead { color: var(--muted); font-size: 1.15rem; max-width: 65ch; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
.crumbs a { color: var(--muted); }
.article-body { padding-top: 2rem; padding-bottom: 4rem; }
.article-figure { margin: 0 0 1.5rem; }
.article-figure img { border-radius: var(--radius); }
.article-lead { font-size: 1.2rem; font-weight: 500; }
.status-page { text-align: center; padding: 6rem 0; }
.status-code { font: 800 5rem/1 var(--font-heading); color: var(--primary); margin: 0 0 .5rem; }
.status-icon { font-size: 3rem; color: var(--primary); }

/* Formulaire */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form-card { padding: clamp(1.25rem, 3vw, 2rem); }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row.two { grid-template-columns: 1fr; } }
.field { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: .65rem .85rem; border: 1px solid #94a3b8; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: #b91c1c; }
.field.check { flex-direction: row; align-items: flex-start; gap: .6rem; }
.field.check input { width: 22px; min-height: 22px; height: 22px; margin-top: .2rem; flex-shrink: 0; }
.field.check label { font-weight: 400; }
.field-error { color: #b91c1c; font-size: .88rem; margin: 0; }
.field.check .field-error { flex-basis: 100%; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.25rem; display: flex; gap: .6rem; align-items: flex-start; }
.alert .icon { margin-top: .3em; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Pied de page */
.site-footer { background: color-mix(in srgb, var(--ink) 96%, var(--primary)); color: #cbd5e1; padding: 3.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); }
.site-footer a { color: #e2e8f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-logo { max-height: 52px; width: auto; margin-bottom: 1rem; }
.footer-logo.is-light { background: #fff; padding: 6px 10px; border-radius: 10px; }
.footer-title { font: 800 1.4rem var(--font-heading); color: #fff; }
.footer-heading { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.social { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; gap: .5rem; }
.social a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); font-size: 1.1rem; }
.social a:hover { background: var(--secondary); color: var(--on-secondary); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; }
.footer-bottom p { margin: 0; }
.powered { opacity: .75; }

@media print { .site-header, .site-footer, .hero-actions, .nav-toggle { display: none !important; } body { color: #000; } }
