/* =========================================================================
   Rézhau — feuille de style unique (site vitrine + espace client)
   Charte issue du logo : marine profond, bleus acier, lignes de vitesse du « R ».
   ========================================================================= */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  /* Couleurs du logo */
  --navy-950: #040e1f;
  --navy-900: #06142a;
  --navy-800: #0b1f3a;
  --navy-700: #13325a;
  --blue-600: #1f4e8c;
  --blue-500: #2e6bc6;
  --blue-400: #4a8fe0;
  --blue-200: #a8c6ec;
  --blue-100: #dde9f8;
  --blue-50: #f1f6fc;
  /* Neutres */
  --ink: #0d1b2e;
  --text: #3a4a5f;
  --muted: #64748b;
  --line: #dfe6ef;
  --surface: #ffffff;
  --bg: #f7f9fc;
  /* Sémantique */
  --ok: #157f4f;
  --ok-bg: #e5f5ec;
  --warn: #9a5b00;
  --warn-bg: #fff3dc;
  --danger: #b42318;
  --danger-bg: #fdecea;

  --font-head: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(6, 20, 42, .06), 0 1px 3px rgba(6, 20, 42, .08);
  --shadow: 0 10px 30px -12px rgba(6, 20, 42, .25);
  --container: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font: 400 1rem/1.65 var(--font-body);
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue-600); text-underline-offset: .18em; }
a:hover { color: var(--blue-500); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy-900); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--tint { background: var(--bg); }
.section--dark { background: var(--navy-900); color: #c9d6e8; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text); }

/* Sur-titre façon logo : petites capitales espacées, bleu acier */
.kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 700 .78rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-500); margin-bottom: 1rem;
}
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: currentColor; box-shadow: 0 6px 0 -1px currentColor; opacity: .9; }
.section--dark .kicker, .hero .kicker { color: var(--blue-200); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 700 .95rem/1 var(--font-head); letter-spacing: .01em;
  padding: .95rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue-500); color: #fff; box-shadow: 0 8px 20px -8px rgba(46, 107, 198, .7); }
.btn--primary:hover { background: var(--blue-600); color: #fff; }
.btn--dark { background: var(--navy-800); color: #fff; }
.btn--dark:hover { background: var(--navy-700); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--light:hover { background: var(--blue-100); color: var(--navy-900); }
.btn--outline-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn--outline-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.06); }
.btn--sm { padding: .6rem 1rem; font-size: .85rem; }
.btn--block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 76px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { height: 46px; width: auto; }
.brand-word { height: 30px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-tag { font: 600 .58rem/1 var(--font-head); letter-spacing: .14em; color: var(--blue-600); margin-top: .35rem; text-transform: uppercase; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.main-nav a {
  display: block; white-space: nowrap; padding: .55rem .8rem; border-radius: var(--radius-sm);
  font: 600 .93rem/1 var(--font-head); color: var(--ink); text-decoration: none;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue-500); background: var(--blue-50); }
.header-actions { display: flex; gap: .5rem; align-items: center; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: .5rem; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .main-nav, .header-actions { display: none; }
  .site-header.is-open .main-nav, .site-header.is-open .header-actions { display: flex; }
  .site-header.is-open .header-inner { flex-wrap: wrap; height: auto; padding-block: 1rem; }
  .site-header.is-open .main-nav { order: 3; width: 100%; margin: 0; }
  .site-header.is-open .main-nav ul { flex-direction: column; width: 100%; }
  .site-header.is-open .main-nav a { padding: .9rem .6rem; font-size: 1.05rem; }
  .site-header.is-open .header-actions { order: 4; width: 100%; padding-bottom: .5rem; }
  .site-header.is-open .header-actions .btn { flex: 1; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(74,143,224,.28), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(46,107,198,.22), transparent 60%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800) 70%, var(--navy-700));
  color: #c9d6e8;
  padding-block: clamp(4rem, 10vw, 7.5rem) clamp(4rem, 9vw, 6.5rem);
}
/* Lignes de vitesse reprises du « R » du logo */
.hero::before {
  content: ""; position: absolute; z-index: -1; right: -6%; top: 14%; width: 56%; height: 58%;
  background:
    linear-gradient(90deg, transparent, rgba(168,198,236,.18) 30%, rgba(168,198,236,.04)) 0 0 / 100% 14px no-repeat,
    linear-gradient(90deg, transparent 12%, rgba(168,198,236,.14) 40%, rgba(168,198,236,.03)) 0 38px / 100% 14px no-repeat,
    linear-gradient(90deg, transparent 4%, rgba(168,198,236,.10) 35%, rgba(168,198,236,.02)) 0 76px / 100% 14px no-repeat;
  border-radius: 999px 0 0 999px;
  transform: skewX(-12deg);
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--blue-200), var(--blue-400)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #c9d6e8; max-width: 60ch; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-card {
  justify-self: end; width: 100%; max-width: 400px; padding: 1.3rem; border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border: 1px solid rgba(168,198,236,.22); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); backdrop-filter: blur(6px);
}
.hero-card-head { display: flex; align-items: center; gap: .7rem; padding: .2rem .3rem 1rem; font: 700 .8rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-200); }
.hero-card-head img { height: 26px; width: auto; }
.hero-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.hero-card li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: 12px; background: rgba(4,14,31,.45); border: 1px solid rgba(168,198,236,.10); }
.hero-card .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(74,143,224,.18); color: var(--blue-200); }
.hero-card .ic svg { width: 18px; height: 18px; }
.hero-card strong { display: block; color: #fff; font: 700 .9rem/1.2 var(--font-head); }
.hero-card small { display: block; font-size: .78rem; color: #93a6c0; }
.hero-card .st { display: inline-flex; align-items: center; gap: .4rem; font: 700 .7rem/1 var(--font-head); color: #7fdcae; }
.hero-card .st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ccf8e; box-shadow: 0 0 0 4px rgba(60,207,142,.18); }
.hero-pillars { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 2.2rem 0 0; padding: 0; list-style: none; font: 700 .8rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--blue-200); }
.hero-pillars li { display: flex; align-items: center; gap: .55rem; }
.hero-pillars li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-400); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-card { display: none; } }

/* Hero intérieur (pages services, etc.) */
.page-hero { padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 6vw, 4rem); }
.page-hero h1 { max-width: 22ch; font-size: clamp(1.9rem, 4vw, 3rem); }

/* ---------- Fil d'Ariane ---------- */
.breadcrumb { font-size: .85rem; margin-bottom: 1.4rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: .4rem; opacity: .6; }
.breadcrumb a { color: inherit; text-decoration: none; opacity: .8; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }
.hero .breadcrumb { color: var(--blue-200); }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card--link { text-decoration: none; color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s; display: flex; flex-direction: column; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-200); color: inherit; }
.card--link .more { margin-top: auto; padding-top: 1rem; font: 700 .9rem/1 var(--font-head); color: var(--blue-500); display: inline-flex; align-items: center; gap: .4rem; }
.card--link:hover .more svg { transform: translateX(3px); }
.more svg { width: 1em; height: 1em; transition: transform .15s; }

.icon-badge {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem;
  background: linear-gradient(145deg, var(--navy-800), var(--blue-600)); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(11,31,58,.6);
}
.icon-badge svg { width: 26px; height: 26px; }

.feature { display: flex; gap: 1rem; }
.feature .dot { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue-500); }
.feature .dot svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.feature p { margin: 0; font-size: .97rem; }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; }
.check-list svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--blue-500); margin-top: .1rem; }
.section--dark .check-list svg { color: var(--blue-400); }

/* Étapes */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.steps li { counter-increment: step; position: relative; padding: 1.6rem; border-radius: var(--radius); background: rgba(255,255,255,.04); border: 1px solid rgba(168,198,236,.16); }
.steps li::before { content: "0" counter(step); display: block; font: 800 2rem/1 var(--font-head); color: var(--blue-400); margin-bottom: .8rem; }
.steps h3 { font-size: 1.05rem; }
.steps p { margin: 0; font-size: .95rem; }

/* Split image/texte */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.panel {
  border-radius: calc(var(--radius) + 6px); padding: clamp(1.6rem, 4vw, 2.6rem);
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #c9d6e8; position: relative; overflow: hidden;
}
.panel h2, .panel h3 { color: #fff; }
.panel a { color: #fff; }
.panel .check-list svg { color: var(--blue-400); }
.panel::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; opacity: .08;
  background: url("../img/logo-mark-white.png") center / contain no-repeat;
}

/* FAQ */
.faq { display: grid; gap: .8rem; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 1.3rem; }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 0; font: 700 1.02rem/1.4 var(--font-head); color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--blue-500); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 1.1rem; margin: 0; }

/* Bandeau d'appel à l'action */
.cta-band {
  border-radius: calc(var(--radius) + 8px); padding: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(120deg, var(--navy-800), var(--blue-600)); color: #dbe7f6;
  display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; margin-bottom: .3rem; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.cta-band p { margin: 0; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* Articles */
.article-card time, .article-meta { font-size: .85rem; color: var(--muted); }
.tag { display: inline-block; font: 700 .7rem/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-600); background: var(--blue-50); padding: .4rem .6rem; border-radius: 6px; margin-bottom: .9rem; }
.prose { max-width: 740px; font-size: 1.06rem; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .45em; }
.prose blockquote, .prose .note { margin: 1.5em 0; padding: 1.1rem 1.3rem; border-left: 4px solid var(--blue-500); background: var(--blue-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--font-head); color: var(--ink); background: var(--bg); }
.table-scroll { overflow-x: auto; margin: 1.5em 0; }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.field label { display: block; font: 600 .9rem/1.3 var(--font-head); color: var(--ink); margin-bottom: .4rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.input, .field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=password], .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .9rem; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(46,107,198,.15); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: .85rem; margin-top: .35rem; }
.checkbox { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; }
.checkbox input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--blue-500); flex-shrink: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-size: .95rem; border: 1px solid transparent; }
.alert--error { background: var(--danger-bg); color: var(--danger); border-color: #f6c8c3; }
.alert--ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe5cf; }
.alert--info { background: var(--blue-50); color: var(--navy-700); border-color: var(--blue-100); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 1.2rem; }
.contact-info .item { display: flex; gap: .9rem; }
.contact-info .item svg { width: 22px; height: 22px; color: var(--blue-400); flex-shrink: 0; margin-top: .2rem; }
.contact-info strong { display: block; color: #fff; font-family: var(--font-head); }
.contact-info a { color: #fff; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--navy-950); color: #93a6c0; padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { color: #b9c7da; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand img { height: 64px; width: auto; margin-bottom: 1rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 1.2rem; }
address { font-style: normal; }

/* ---------- Espace client ---------- */
.auth-page { min-height: calc(100vh - 76px); display: grid; place-items: center; padding: 3rem var(--gutter); background:
  radial-gradient(900px 400px at 100% 0, rgba(74,143,224,.12), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(1.6rem, 5vw, 2.6rem); box-shadow: var(--shadow); }
.auth-card .logo { height: 70px; width: auto; margin: 0 auto 1.4rem; }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 1.6rem; font-size: .95rem; }
.auth-links { text-align: center; margin-top: 1.2rem; font-size: .9rem; }

.portal { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 76px); background: var(--bg); }
.portal-nav { background: var(--navy-900); color: #b9c7da; padding: 1.5rem 1rem; }
.portal-nav .who { padding: 0 .7rem 1.2rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1rem; }
.portal-nav .who strong { display: block; color: #fff; font-family: var(--font-head); font-size: .98rem; }
.portal-nav .who span { font-size: .82rem; }
.portal-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.portal-nav a, .portal-nav button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .7rem .8rem; border-radius: var(--radius-sm); color: #b9c7da; text-decoration: none; font: 600 .93rem/1 var(--font-head); background: none; border: 0; cursor: pointer; text-align: left; }
.portal-nav a:hover, .portal-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.portal-nav a[aria-current="page"] { background: var(--blue-500); color: #fff; }
.portal-nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.portal-nav form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.portal-main { padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem); min-width: 0; }
.portal-main h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.portal-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.6rem; }
.portal-head h1 { margin: 0; }
@media (max-width: 860px) {
  .portal { grid-template-columns: 1fr; }
  .portal-nav { padding: .8rem; }
  .portal-nav .who { display: none; }
  .portal-nav ul { display: flex; overflow-x: auto; gap: .3rem; }
  .portal-nav a { white-space: nowrap; }
  .portal-nav form { display: none; }
}

.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 1.6rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.stat .label { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font: 800 1.7rem/1.2 var(--font-head); color: var(--ink); margin-top: .3rem; }

.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1.5rem; overflow: hidden; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); }
.box-head h2 { font-size: 1.05rem; margin: 0; }
.box-head a { font-size: .88rem; font-weight: 600; }
.box-body { padding: 1.3rem; }
.empty { padding: 2rem 1.3rem; text-align: center; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font: 700 .76rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .9rem 1.3rem; background: var(--bg); white-space: nowrap; }
.table td { padding: .95rem 1.3rem; border-top: 1px solid var(--line); vertical-align: middle; }
.table td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; }
.table tr:hover td { background: #fbfcfe; }
.table .title { font-weight: 600; color: var(--ink); }
.table .sub { font-size: .83rem; color: var(--muted); }

.badge { display: inline-block; padding: .3rem .6rem; border-radius: 999px; font: 700 .74rem/1 var(--font-head); white-space: nowrap; background: var(--blue-50); color: var(--blue-600); }
.badge--active, .badge--paid, .badge--closed { background: var(--ok-bg); color: var(--ok); }
.badge--pending, .badge--unpaid, .badge--in_progress, .badge--waiting_customer { background: var(--warn-bg); color: var(--warn); }
.badge--overdue, .badge--suspended, .badge--urgent { background: var(--danger-bg); color: var(--danger); }
.badge--terminated, .badge--cancelled { background: #eef1f5; color: var(--muted); }

.thread { display: grid; gap: 1rem; }
.msg { max-width: 760px; padding: 1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.msg--support { background: var(--blue-50); border-color: var(--blue-100); margin-left: auto; }
.msg header { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; color: var(--muted); margin-bottom: .4rem; }
.msg header strong { color: var(--ink); font-family: var(--font-head); }
.msg p { white-space: pre-wrap; margin: 0; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 0; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; color: var(--ink); }

/* Pages d'erreur */
.error-page { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.error-page .code { font: 800 clamp(4rem, 14vw, 8rem)/1 var(--font-head); background: linear-gradient(90deg, var(--navy-800), var(--blue-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Utilitaires */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.todo { background: #fff3dc; color: #7a4a00; padding: 0 .3em; border-radius: 4px; }
.hero-actions--center { justify-content: center; }
.h3 { font-size: 1.2rem; }

/* Espace client — sites et équipe */
.portal-nav .who .role { display: block; margin-top: .35rem; font-size: .75rem; color: var(--blue-200); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1.2rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.filter-bar label { font: 700 .82rem/1 var(--font-head); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.filter-bar select { font: inherit; padding: .5rem .7rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink); min-width: min(100%, 260px); }
.filter-reset { font-size: .88rem; }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.tabs a { padding: .45rem .9rem; border-radius: 999px; font: 600 .85rem/1 var(--font-head); text-decoration: none; color: var(--text); background: #fff; border: 1px solid var(--line); }
.tabs a[aria-current="true"] { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.site-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--navy-700); background: var(--blue-50); border: 1px solid var(--blue-100); padding: .25rem .55rem; border-radius: 6px; white-space: nowrap; }
.site-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-500); }
.site-cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 1.5rem; }
.site-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .8rem; }
.site-card h3 { margin: 0; font-size: 1.05rem; display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.site-card .addr { font-size: .9rem; color: var(--muted); margin: 0; }
.site-card .figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.site-card .figures a { display: block; padding: .6rem .3rem; border-radius: var(--radius-sm); background: var(--bg); text-decoration: none; color: var(--ink); }
.site-card .figures a:hover { background: var(--blue-50); }
.site-card .figures strong { display: block; font: 800 1.3rem/1.1 var(--font-head); }
.site-card .figures span { font-size: .75rem; color: var(--muted); }
.site-card .figures .alert-figure strong { color: var(--warn); }
.site-card .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }
.choice-group { display: grid; gap: .6rem; }
.choice { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--blue-500); background: var(--blue-50); }
.choice input { margin-top: .25rem; accent-color: var(--blue-500); width: 18px; height: 18px; flex-shrink: 0; }
.choice small { display: block; color: var(--muted); }
.site-checklist { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: .6rem; padding-left: 1.9rem; }
.row-actions { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.link-box { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.link-box input { flex: 1; min-width: min(100%, 280px); font: .9rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); }
tr.is-inactive td { opacity: .55; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: .6rem; }
fieldset.field legend { font: 700 1.05rem/1.3 var(--font-head); color: var(--ink); }
.choice-group:has(input[value="all"]:checked) + .site-checklist { opacity: .45; }

/* Photos */
.card--media { padding-top: 0; overflow: hidden; }
.card-media { display: block; margin: 0 calc(-1 * clamp(1.4rem, 3vw, 2rem)) 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--blue-50); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card--link:hover .card-media img { transform: scale(1.04); }
.card--media .icon-badge { margin-top: -26px; position: relative; border: 3px solid #fff; }
.card--media .tag { margin-top: 1.2rem; }
.hero-grid--photo { grid-template-columns: 1.1fr .9fr; }
.hero-photo { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0,0,0,.7); border: 1px solid rgba(168,198,236,.2); aspect-ratio: 4 / 3; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, transparent 55%, rgba(6,20,42,.45)); }
@media (max-width: 960px) { .hero-grid--photo { grid-template-columns: 1fr; } .hero-photo { aspect-ratio: 16 / 9; } }
.photo-frame { margin: 0; border-radius: calc(var(--radius) + 6px); overflow: hidden; box-shadow: var(--shadow); background: var(--blue-50); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame figcaption { padding: .8rem 1rem; font-size: .88rem; color: var(--muted); background: #fff; }
.photo-duo { display: grid; gap: clamp(1rem, 2.5vw, 1.5rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin-bottom: clamp(1rem, 2.5vw, 1.5rem); }
.photo-duo .photo-frame { aspect-ratio: 16 / 10; }
.article-photo { margin-bottom: 2rem; aspect-ratio: 16 / 9; }
.panel-photo { margin: calc(-1 * clamp(1.6rem, 4vw, 2.6rem)) calc(-1 * clamp(1.6rem, 4vw, 2.6rem)) 1rem; aspect-ratio: 16 / 9; overflow: hidden; }
.panel-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Bandeau « partout en Bretagne » */
.region-band { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.6rem; padding: clamp(1.4rem, 3vw, 2rem); border-radius: calc(var(--radius) + 4px); background: var(--bg); border: 1px solid var(--line); }
.region-band > div { flex: 1 1 320px; }
.region-band h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin-bottom: .3rem; }
.region-band p { margin: 0; }
.region-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, var(--navy-800), var(--blue-600)); color: #fff; flex-shrink: 0; }
.region-icon svg { width: 28px; height: 28px; }

/* Test d'éligibilité fibre */
.elig-form { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; max-width: 760px; }
.elig-combo { position: relative; flex: 1 1 360px; }
.elig-combo input { width: 100%; font: inherit; font-size: 1.05rem; padding: 1rem 1.2rem; border-radius: 999px; border: 2px solid transparent; background: #fff; color: var(--ink); box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.elig-combo input:focus { outline: none; border-color: var(--blue-400); }
.elig-suggestions { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + .4rem); margin: 0; padding: .4rem; list-style: none; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; }
.elig-suggestions li { padding: .7rem .9rem; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink); }
.elig-suggestions li small { display: block; color: var(--muted); font-size: .82rem; }
.elig-suggestions li:hover, .elig-suggestions li[aria-selected="true"] { background: var(--blue-50); }
.elig-hint { margin-top: .8rem; font-size: .88rem; color: var(--blue-200); }
.elig-result { max-width: 860px; padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: calc(var(--radius) + 6px); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); border-top: 6px solid var(--muted); }
.elig-result--raccordable, .elig-result--demande { border-top-color: var(--ok); }
.elig-result--en_cours, .elig-result--prevu { border-top-color: #d08a00; }
.elig-result--non_couvert, .elig-result--inconnu, .elig-result--hors_zone, .elig-result--indisponible { border-top-color: var(--blue-500); }
.elig-result-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.elig-result-head h2 { margin: 0; }
.elig-address { margin: 0 0 .2rem; font-size: .9rem; color: var(--muted); }
.elig-badge { width: 60px; height: 60px; flex-shrink: 0; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--blue-500); }
.elig-badge svg { width: 30px; height: 30px; }
.elig-result--raccordable .elig-badge, .elig-result--demande .elig-badge { background: var(--ok); }
.elig-result--en_cours .elig-badge, .elig-result--prevu .elig-badge { background: #d08a00; }
.elig-commune { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--bg); border-radius: var(--radius-sm); }
.elig-commune p { margin: .6rem 0 0; }
.elig-meter { width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--blue-100); appearance: none; -webkit-appearance: none; }
.elig-meter::-webkit-progress-bar { background: var(--blue-100); border-radius: 999px; }
.elig-meter::-webkit-progress-value { background: linear-gradient(90deg, var(--blue-500), var(--ok)); border-radius: 999px; }
.elig-meter::-moz-progress-bar { background: linear-gradient(90deg, var(--blue-500), var(--ok)); border-radius: 999px; }
.elig-next { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.elig-next h3 { margin-bottom: .4rem; }

/* Sous-traitance & mentions RGPD */
.check-grid { display: grid; gap: .5rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
fieldset.field > legend { font: 600 .9rem/1.3 var(--font-head); color: var(--ink); margin-bottom: .6rem; }
.steps-list { padding-left: 1.2rem; display: grid; gap: .8rem; margin: 0 0 1.5rem; }
.steps-list strong { color: #fff; }
.form-notice { font-size: .78rem; line-height: 1.5; color: var(--muted); margin: .4rem 0 0; }
.legal-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 2rem; padding: 0; list-style: none; }
.legal-toc a { display: inline-block; padding: .4rem .8rem; border-radius: 999px; background: var(--blue-50); border: 1px solid var(--blue-100); font-size: .85rem; text-decoration: none; }
.prose dl.legal-dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.5rem; }
.prose dl.legal-dl dt { font-weight: 600; color: var(--ink); }
.prose dl.legal-dl dd { margin: 0; }
@media (max-width: 600px) { .prose dl.legal-dl { grid-template-columns: 1fr; } .prose dl.legal-dl dd { margin-bottom: .6rem; } }
