/* Hexagone XR — feuille de style unique */
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/fonts/inter/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/fonts/inter/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/fonts/inter/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('/fonts/space-grotesk/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 600; font-display: swap; src: url('/fonts/space-grotesk/space-grotesk-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('/fonts/space-grotesk/space-grotesk-latin-700-normal.woff2') format('woff2'); }

:root {
  --ink: #0B1220;
  --text: #374151;
  --muted: #4B5563;
  --line: #E3E7ED;
  --line-strong: #C9D0DA;
  --soft: #F3F5F8;
  --white: #FFFFFF;
  --accent: #2747F5;
  --accent-dark: #1A33C4;
  --orange: #FF6A3D;
  --ok: #0A5A45;
  --danger: #B42318;
  --radius: 16px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--white); font-size: 16px; line-height: 1.5; }
body.bg-soft { background: var(--soft); }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* --- Mise en page --- */
.container { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 72px; }
.section--top { padding-top: 32px; }
.section--tight { padding-block: 32px; }
.narrow { max-width: 760px; }
.narrow-form { max-width: 560px; }
.center-block { text-align: center; align-items: center; }
.stack-2, .stack-6, .stack-10, .stack-12, .stack-14, .stack-16, .stack-18, .stack-20, .stack-24, .stack-28, .stack-32, .stack-40 { display: flex; flex-direction: column; }
.stack-2 { gap: 2px; } .stack-6 { gap: 6px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; } .stack-14 { gap: 14px; }
.stack-16 { gap: 16px; } .stack-18 { gap: 18px; } .stack-20 { gap: 20px; } .stack-24 { gap: 24px; } .stack-28 { gap: 28px; }
.stack-32 { gap: 32px; } .stack-40 { gap: 40px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-wrap--between { justify-content: space-between; align-items: flex-end; gap: 16px; }
.gap-24 { gap: 24px; }
.grow { flex: 1 1 220px; min-width: 0; }
.self-start { align-self: flex-start; }
.self-end { align-self: end; }
.pad-top { padding-top: 14px; }
.grid { display: grid; gap: 20px; }
.grid--cats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--stats { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.layout-aside { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-bottom: 96px; }
.layout-aside__main { flex: 999 1 560px; min-width: 0; }
.layout-aside__side { flex: 1 1 320px; min-width: 0; }
.layout-split { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.layout-split > :first-child { flex: 1 1 300px; min-width: 0; }
.layout-split > :last-child { flex: 999 1 480px; min-width: 0; }
.layout-split--reverse > :first-child { flex: 1 1 320px; }

/* --- Typographie --- */
.display { font-family: var(--display); font-size: clamp(38px, 6vw, 64px); line-height: 1.04; font-weight: 600; letter-spacing: -0.03em; max-width: 880px; }
.h1 { font-family: var(--display); font-size: clamp(32px, 4.5vw, 46px); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; }
.h2 { font-family: var(--display); font-size: clamp(28px, 3.5vw, 38px); font-weight: 600; letter-spacing: -0.02em; }
.h3 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.h4 { font-family: var(--display); font-size: 20px; font-weight: 600; }
.kicker { font-size: 14px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 680px; }
.lead--dark { color: #C5CCD8; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.ok { color: var(--ok); font-weight: 600; }
.danger { color: var(--danger); }
.prose { line-height: 1.7; color: var(--text); }
.prose h2 { font-family: var(--display); font-size: 24px; margin: 24px 0 8px; color: var(--ink); }
.prose p, .prose ul { margin: 0 0 12px; }
.big-icon { font-size: 44px; width: 80px; height: 80px; border-radius: 999px; background: var(--white); display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li::before { content: '✓  '; color: var(--ok); font-weight: 700; }

/* --- En-tête / pied --- */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark { font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -0.5px; color: var(--ink); }
.wordmark b { font-weight: 700; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-size: 15px; font-weight: 500; }
.site-nav a:not(.btn), .link-button { color: var(--ink); text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--accent); }
.inline-form { display: inline; margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.badge-count { display: inline-flex; min-width: 22px; height: 22px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; background: var(--orange); color: var(--ink); font-size: 12px; font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); background: var(--white); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-block: 36px; font-size: 14px; color: var(--muted); }
.site-footer a { color: var(--muted); margin-left: 20px; }

/* --- Boutons, champs --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); color: var(--white); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: #1E293B; color: var(--white); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--outline { background: var(--white); border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--ink); color: var(--ink); }
.btn--danger { background: var(--white); border-color: #F3B4AE; color: var(--danger); }
.btn--danger:hover { background: #FEF1F0; color: var(--danger); }
.btn--sm { min-height: 36px; padding: 8px 12px; font-size: 14px; }
.btn--lg { padding: 16px 26px; font-size: 17px; }
.btn--block { width: 100%; }
.label { font-size: 15px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.input { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; font: inherit; color: var(--ink); background: var(--white); min-height: 46px; }
textarea.input { resize: vertical; }
.input.code, textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text); line-height: 1.5; }
.checkbox input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; }

/* --- Cartes --- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card--form { padding: clamp(22px, 4vw, 40px); border-radius: 20px; }
a.card { text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px rgba(11, 18, 32, .06); color: var(--ink); }
.cat-card { display: flex; flex-direction: column; gap: 12px; padding: 26px; }
.cat-card__title { font-family: var(--display); font-size: 21px; font-weight: 600; }
.cat-icon { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.company-card { display: flex; flex-direction: column; gap: 14px; }
.company-card__head { display: flex; align-items: center; gap: 14px; }
.company-card__name { font-weight: 600; font-size: 17px; }
.reseller-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; }
.avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 19px; object-fit: contain; background: var(--white); border: 1px solid var(--line); }
span.avatar { border: 0; }
.avatar--lg { width: 72px; height: 72px; flex-basis: 72px; }
.avatar--xl { width: 96px; height: 96px; flex-basis: 96px; border-radius: 20px; font-size: 36px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 20px; }
.stat__n { font-family: var(--display); font-size: 34px; font-weight: 700; }
.empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); display: flex; flex-direction: column; gap: 16px; align-items: center; color: var(--muted); }
.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.locked__line { display: block; height: 22px; border-radius: 6px; background: var(--line); color: transparent; user-select: none; font-size: 14px; }
.locked__line:nth-child(2) { width: 80%; } .locked__line:nth-child(3) { width: 60%; }

/* --- Puces et étiquettes --- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--soft); color: var(--text); text-decoration: none; }
.chip--link { padding: 8px 14px; font-size: 14px; }
.chip--link:hover { filter: brightness(.96); }
.chip--active { background: var(--ink); color: var(--white); }
.chip--member { background: var(--ink); color: var(--white); font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 9px 15px; border-radius: 10px; font-weight: 500; color: var(--ink); text-decoration: none; }
.tag:hover { border-color: var(--line-strong); color: var(--ink); }
.tag .ok { font-size: 12px; }
.tag--soft { background: var(--soft); border-color: transparent; }
.tone-cons { background: #E0F2FE; color: #075985; }
.tone-rev  { background: #E4E9FE; color: #1A2C8F; }
.tone-edi  { background: #EEE6FD; color: #4A1FA0; }
.tone-dev  { background: #DDF3EC; color: #0A5A45; }
.tone-asso { background: #FDE6DC; color: #8A3110; }
.tone-ok   { background: #DDF3EC; color: var(--ok); font-weight: 600; }
.tone-text-cons { color: #075985; } .tone-text-rev { color: #1A2C8F; } .tone-text-edi { color: #4A1FA0; } .tone-text-dev { color: #0A5A45; } .tone-text-asso { color: #8A3110; }
.status { font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); }
.status--published, .status--confirmed { background: #DDF3EC; color: var(--ok); }
.status--pending, .status--declared { background: #FFF4D6; color: #7A4B00; }
.status--unpublished, .status--rejected { background: #F3F5F8; color: var(--muted); }

/* --- Accueil --- */
.hero { background: var(--soft); border-bottom: 1px solid var(--line); padding-block: 80px 72px; }
.searchbar { display: flex; flex-wrap: wrap; gap: 10px; background: var(--white); border: 1px solid #D5DBE3; border-radius: 14px; padding: 10px; max-width: 920px; }
.searchbar input, .searchbar select { border: 0; padding: 12px 14px; font: inherit; background: transparent; color: var(--ink); min-height: 46px; }
.searchbar input { flex: 3 1 260px; min-width: 0; }
.searchbar select { flex: 1 1 170px; border-left: 1px solid var(--line); }
.searchbar--page { max-width: none; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 32px; background: #E4E9FE; border-radius: var(--radius); color: var(--text); }
.banner__title { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--ink); }
.dark-band { background: var(--ink); color: var(--white); }
.step { display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px solid #263248; border-radius: var(--radius); }
.step__num { font-family: var(--display); font-size: 32px; font-weight: 700; color: #FF8A64; }
.step__title { font-size: 19px; font-weight: 600; }
.list-head { display: flex; justify-content: space-between; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.company-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: 28px 40px; }
.filter { gap: 10px; }
.filter .input { width: auto; }

/* --- Formulaires spécifiques --- */
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 16px 46px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--white); }
.choice input { position: absolute; left: 16px; top: 18px; width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: #F7F8FF; }
.tone-border-cons:has(input:checked) { border-color: #0369A1; background: #F0F9FF; }
.tone-border-edi:has(input:checked) { border-color: #7A3CF0; background: #F8F4FF; }
.tone-border-dev:has(input:checked) { border-color: #0E8A6A; background: #F0FAF6; }
.tone-border-asso:has(input:checked) { border-color: #E0571F; background: #FFF6F2; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); font-weight: 500; }
.pill span::before { content: '+'; margin-right: 6px; color: var(--muted); }
.pill input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pill input:checked + span::before { content: '✓'; color: var(--white); }
.pill input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.info-box { display: flex; flex-direction: column; gap: 6px; background: #E0F2FE; border-radius: 14px; padding: 18px 20px; }
.steps-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.steps-list li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.steps-list span { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.steps-list .is-current { color: var(--ink); font-weight: 600; }
.steps-list .is-current span { background: var(--accent); border-color: var(--accent); color: var(--white); }
.recipient { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.recipient:has(input:checked) { border-color: var(--accent); background: #F7F8FF; }
.recipient input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; }
.report summary { cursor: pointer; padding: 6px 0; }
.report form { padding-top: 12px; }

/* --- Alertes --- */
.alert { border-radius: 12px; padding: 14px 18px; margin-block: 16px; font-size: 15px; }
.alert ul { margin: 0; padding-left: 18px; }
.alert--success { background: #DDF3EC; color: #064434; }
.alert--error { background: #FEF1F0; color: #8A1A10; border: 1px solid #F3B4AE; }
.alert--info { background: #E4E9FE; color: #1A2C8F; }

/* --- Back office --- */
.admin-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-block: 32px 96px; }
.admin-nav { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.admin-nav .kicker { padding: 4px 10px 10px; font-size: 12px; }
.admin-nav a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.admin-nav a:hover { background: var(--soft); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: var(--white); }
.admin-main { flex: 999 1 640px; min-width: 0; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; color: var(--muted); font-size: 13px; background: var(--soft); }
.table tr:last-child td { border-bottom: 0; }
.card .table th { background: transparent; }
.is-muted { opacity: .6; }
details.card summary { cursor: pointer; list-style: none; }

@media (max-width: 720px) {
  .section { padding-block: 48px; }
  .hero { padding-block: 48px; }
  .site-nav { gap: 14px; }
  .searchbar select { border-left: 0; border-top: 1px solid var(--line); }
  .site-footer a { margin: 0 16px 0 0; }
}
