/* ==========================================================
   EURO FINAV — feuille de style
   Palette : marine lagon, turquoise récif, jaune soleil, hibiscus
   ========================================================== */
:root {
  --ink: #06283a;
  --ink-2: #0c3d52;
  --lagon: #0e7c86;
  --turq: #2ec4b6;
  --sun: #ffb238;
  --sun-d: #e99a17;
  --hib: #d93a58;
  --foam: #f2f8f7;
  --mist: #e1eeee;
  --line: #cfdfe0;
  --text: #12303c;
  --muted: #56707b;
  --white: #ffffff;
  --ok: #148a5c;
  --warn: #b26a00;

  --f-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --wave: 30px 4px 30px 4px;
  --shadow: 0 18px 40px -22px rgba(6, 40, 58, .45);
  --wrap: 1180px;
  --hdr: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6;
  color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--lagon); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.1; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.015em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 2.4rem); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: .6rem 1rem; z-index: 200; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  --bg: var(--sun); --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: 700 1rem/1 var(--f-body); padding: .95rem 1.5rem; border-radius: 999px; border: 2px solid var(--bg);
  background: var(--bg); color: var(--fg); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); color: var(--fg); background: #ffc35f; border-color: #ffc35f; }
.btn:active { transform: translateY(0); }
.btn.ghost { --bg: transparent; --fg: var(--white); border-color: rgba(255, 255, 255, .6); }
.btn.ghost:hover { background: rgba(255, 255, 255, .14); border-color: var(--white); color: var(--white); }
.btn.dark { --bg: var(--ink); --fg: var(--white); }
.btn.dark:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--white); }
.btn.line { --bg: transparent; --fg: var(--ink); border-color: var(--line); }
.btn.line:hover { background: var(--foam); border-color: var(--lagon); color: var(--ink); }
.btn.danger { --bg: transparent; --fg: var(--hib); border-color: #f0c2cb; }
.btn.danger:hover { background: #fdeef1; border-color: var(--hib); color: var(--hib); }
.btn.sm { padding: .6rem 1rem; font-size: .92rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Barre d'information + en-tête ---------- */
.topbar { background: var(--ink); color: rgba(255,255,255,.88); font-size: .88rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: .4rem 1.5rem; flex-wrap: wrap; padding-block: .5rem; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--sun); }
.topbar span { display: inline-flex; align-items: center; gap: .45rem; }
.topbar svg { width: 16px; height: 16px; color: var(--turq); }
@media (max-width: 720px) { .topbar .t-hide { display: none; } .topbar .wrap { justify-content: center; } }

.hdr { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.hdr.scrolled { box-shadow: 0 10px 30px -18px rgba(6,40,58,.55); }
.hdr .wrap { display: flex; align-items: center; gap: 1rem; min-height: var(--hdr); }
.brand { display: inline-flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: .15rem; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav > li { position: relative; }
.nav a, .sub-toggle { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink); text-decoration: none; font: 700 .93rem/1 var(--f-body); padding: .8rem .62rem; border-radius: 10px; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nav a:hover, .sub-toggle:hover, .has-sub.open > .sub-toggle { background: var(--foam); color: var(--lagon); }
.nav a[aria-current="page"] { color: var(--lagon); box-shadow: inset 0 -3px 0 var(--sun); border-radius: 0; }
.sub-toggle svg { width: 14px; height: 14px; transition: transform .2s; }
.has-sub.open > .sub-toggle svg { transform: rotate(180deg); }
.sub { position: absolute; left: 0; top: 100%; min-width: 290px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .5rem; box-shadow: var(--shadow); list-style: none; margin: .3rem 0 0; display: none; }
.has-sub.open > .sub, .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a { display: flex; width: 100%; font-weight: 600; padding: .65rem .8rem; white-space: normal; }
.sub small { display: block; color: var(--muted); font-weight: 500; font-size: .82rem; margin-top: .15rem; }
.nav .nav-login { margin-left: .4rem; border: 2px solid var(--line); border-radius: 999px; padding: .65rem 1.1rem; }
.nav .nav-login:hover { border-color: var(--lagon); }
.nav .btn { margin-left: .2rem; padding: .75rem 1.2rem; font-size: .95rem; color: var(--ink); }
.nav .btn[aria-current] { box-shadow: none; border-radius: 999px; color: var(--ink); }
.burger { display: none; margin-left: auto; background: none; border: 2px solid var(--line); color: var(--ink); width: 48px; height: 48px; border-radius: 14px; cursor: pointer; }
.burger:hover { background: var(--foam); }
.burger svg { width: 26px; height: 26px; margin: auto; }

@media (max-width: 1340px) {
  .burger { display: grid; place-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100svh - 76px); flex-direction: column; align-items: stretch; gap: .15rem; background: #fff; padding: .8rem 1.2rem 2rem; margin: 0; border-top: 1px solid var(--line); overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .18s ease; z-index: 99; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a, .sub-toggle { width: 100%; justify-content: space-between; padding: 1rem .9rem; font-size: 1.05rem; border-bottom: 1px solid var(--mist); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: none; background: var(--foam); }
  .sub { position: static; display: none; border: 0; box-shadow: none; padding: 0 0 .4rem .8rem; margin: 0; min-width: 0; background: transparent; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.open > .sub { display: block; }
  .sub small { display: none; }
  .nav .nav-login { margin: .8rem 0 0; justify-content: center; border: 2px solid var(--line); border-radius: 999px; }
  .nav .btn { margin: .5rem 0 0; justify-content: center; padding: 1rem; }
}

/* ---------- Hero à slides ---------- */
.hero { position: relative; height: calc(100svh - 118px); min-height: 600px; max-height: 820px; background: var(--ink); color: var(--white); overflow: hidden; }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.slide.on { opacity: 1; visibility: visible; transition: opacity .9s ease; z-index: 1; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 8s ease-out; }
.slide.on img { transform: scale(1); }
.slide::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 40, 58, .92) 0%, rgba(6, 40, 58, .72) 38%, rgba(6, 40, 58, .12) 78%),
    linear-gradient(0deg, rgba(6, 40, 58, .85) 0%, rgba(6, 40, 58, 0) 34%);
}
.slide-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 178px; }
.slide-copy .wrap > * { max-width: 38rem; }
.slide h1 { color: var(--white); margin-bottom: .45em; text-wrap: balance; font-size: clamp(2rem, min(4.3vw, 7vh), 3.7rem); line-height: 1.06; }
.slide p { font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: rgba(255, 255, 255, .92); max-width: 34rem; }
.slide .cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.slide.on h1, .slide.on p, .slide.on .cta { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.slide.on p { animation-delay: .12s; }
.slide.on .cta { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

.hero-tabs { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; padding-bottom: 1.4rem; }
.hero-tabs .wrap { display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; }
.tab {
  position: relative; text-align: left; background: none; border: 0; color: rgba(255, 255, 255, .72); cursor: pointer;
  font: 600 .95rem/1.25 var(--f-body); padding: 1.05rem .2rem .2rem; border-radius: 4px;
}
.tab::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .28); border-radius: 3px; }
.tab::after { content: ''; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--sun); border-radius: 3px; }
.tab:hover { color: var(--white); }
.tab.on { color: var(--white); }
.tab.on::after { width: 100%; }
.hero.playing .tab.on::after { animation: fill var(--dur, 7s) linear both; }
@keyframes fill { from { width: 0; } to { width: 100%; } }
.arrows { position: absolute; z-index: 5; right: max(1.2rem, calc((100% - var(--wrap)) / 2)); bottom: 96px; display: flex; gap: .6rem; }
.arrow { width: 50px; height: 50px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); background: rgba(6, 40, 58, .35); color: var(--white); display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(4px); transition: .15s; }
.arrow:hover { background: var(--sun); border-color: var(--sun); color: var(--ink); }
.arrow svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .hero { min-height: 600px; }
  .slide::after { background: linear-gradient(0deg, rgba(6, 40, 58, .96) 0%, rgba(6, 40, 58, .78) 45%, rgba(6, 40, 58, .28) 100%); }
  .slide-copy { bottom: 128px; }
  .hero-tabs .wrap { display: flex; overflow-x: auto; scrollbar-width: none; gap: 1rem; }
  .hero-tabs .wrap::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; min-width: 98px; }
  .arrows { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .slide img, .slide.on h1, .slide.on p, .slide.on .cta { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Bandeau de confiance ---------- */
.trust { background: var(--ink); color: var(--white); }
.trust .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2.5rem; padding-block: 1.6rem; }
.trust p { margin: 0; font-size: .98rem; color: rgba(255, 255, 255, .86); display: flex; gap: .8rem; align-items: flex-start; }
.trust svg { flex: none; width: 26px; height: 26px; color: var(--turq); margin-top: .1rem; }
.trust b { color: var(--white); }
@media (max-width: 860px) { .trust .wrap { grid-template-columns: 1fr; gap: 1rem; } }

/* ---------- Sections ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec-head { max-width: 44rem; margin-bottom: 2.4rem; }
.sec-head p { font-size: 1.12rem; color: var(--muted); }
.bg-foam { background: var(--foam); }
.bg-ink { background: var(--ink); color: rgba(255, 255, 255, .9); }
.bg-ink h2, .bg-ink h3 { color: var(--white); }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.feat { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1.3rem; }
.feat li { display: grid; grid-template-columns: 46px 1fr; gap: 1rem; }
.feat .ic { width: 46px; height: 46px; border-radius: 14px 4px 14px 4px; background: var(--mist); color: var(--lagon); display: grid; place-items: center; }
.feat svg { width: 24px; height: 24px; }
.feat h3 { margin: 0 0 .15em; font-size: 1.12rem; }
.feat p { margin: 0; color: var(--muted); font-size: .99rem; }

/* Maquette du suivi de dossier */
.mock { background: var(--white); border-radius: var(--wave); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 1.6rem; position: relative; }
.mock-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.2rem; }
.mock-top h3 { margin: 0; }
.mock-top small { color: var(--muted); }
.mock .bar { height: 8px; background: var(--mist); border-radius: 8px; overflow: hidden; margin: .4rem 0 1.4rem; }
.mock .bar i { display: block; height: 100%; width: 62%; background: linear-gradient(90deg, var(--turq), var(--lagon)); border-radius: 8px; }

/* ---------- Badges de statut ---------- */
.badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; font-weight: 700; padding: .28rem .7rem; border-radius: 999px; background: var(--mist); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.draft { background: #eceff1; color: #52646d; }
.badge.submitted, .badge.review { background: #dff0fb; color: #0b5d8f; }
.badge.info { background: #fff0d1; color: var(--warn); }
.badge.study { background: #e6e3fb; color: #4b3fb0; }
.badge.favorable { background: #d8f3e6; color: var(--ok); }
.badge.unfavorable { background: #fbe0e5; color: #b3243f; }
.badge.closed { background: #e6eaec; color: #3b4d56; }

/* ---------- Frise / timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 1.25rem 2rem; }
.tl li::before { content: ''; position: absolute; left: 6px; top: 1.15rem; bottom: -.15rem; width: 2px; background: var(--line); }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::before { display: none; }
.tl li::after { content: ''; position: absolute; left: 0; top: .32rem; width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--turq); }
.tl li.done::after { background: var(--turq); }
.tl li.now::after { background: var(--sun); border-color: var(--sun); box-shadow: 0 0 0 5px rgba(255, 178, 56, .3); }
.tl li.todo::after { border-color: var(--line); }
.tl li.todo .t { color: var(--muted); font-weight: 500; }
.tl .t { font-weight: 700; color: var(--ink); line-height: 1.3; }
.tl .d { font-size: .88rem; color: var(--muted); }
.tl .n { font-size: .95rem; margin-top: .25rem; background: var(--foam); border-radius: 10px; padding: .55rem .8rem; }

/* ---------- Secteurs (mosaïque) ---------- */
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1rem; }
.tile { position: relative; overflow: hidden; border-radius: var(--wave); min-height: 250px; color: var(--white); text-decoration: none; display: flex; align-items: flex-end; isolation: isolate; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.tile::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(6, 40, 58, .92) 5%, rgba(6, 40, 58, 0) 65%); }
.tile:hover img { transform: scale(1.06); }
.tile div { padding: 1.3rem 1.4rem; }
.tile h3 { color: var(--white); margin: 0 0 .2em; }
.tile p { margin: 0; font-size: .96rem; color: rgba(255, 255, 255, .88); }
.t-a { grid-column: span 5; min-height: 340px; }
.t-b { grid-column: span 7; min-height: 340px; }
.t-c, .t-d, .t-e { grid-column: span 4; }
.t-plain { background: var(--mist); color: var(--ink); align-items: flex-start; }
.t-plain::after { display: none; }
.t-plain h3 { color: var(--ink); }
.t-plain p { color: var(--muted); }
.t-plain.dk { background: var(--ink-2); }
.t-plain.dk h3 { color: var(--white); }
.t-plain.dk p { color: rgba(255, 255, 255, .8); }
.t-plain.sn { background: #ffe7b5; }
.t-plain.sn p { color: #5b4514; }
.t-f, .t-g, .t-h, .t-i { grid-column: span 3; min-height: 200px; }
@media (max-width: 900px) {
  .t-a, .t-b, .t-c, .t-d, .t-e { grid-column: span 6; min-height: 260px; }
  .t-f, .t-g, .t-h, .t-i { grid-column: span 6; min-height: 190px; }
}
@media (max-width: 560px) { .mosaic > * { grid-column: span 12 !important; min-height: 210px; } }

/* ---------- Territoires ---------- */
.terr { display: flex; flex-wrap: wrap; gap: .7rem; }
.terr > span { display: inline-flex; align-items: center; gap: .55rem; padding: .65rem 1.05rem; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; font-weight: 600; color: var(--white); }
.terr small { color: rgba(255, 255, 255, .62); font-weight: 500; }

/* ---------- Étapes ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: st; }
.steps li { counter-increment: st; background: var(--white); border: 1px solid var(--line); border-radius: var(--wave); padding: 1.6rem 1.4rem 1.4rem; position: relative; }
.steps li::before { content: counter(st); position: absolute; top: -18px; left: 1.3rem; width: 38px; height: 38px; border-radius: 50%; background: var(--sun); color: var(--ink); font: 800 1.15rem/38px var(--f-display); text-align: center; }
.steps h3 { margin: .4rem 0 .35em; }
.steps p { margin: 0; color: var(--muted); font-size: .98rem; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Appel à l'action ---------- */
.cta-band { background: linear-gradient(120deg, var(--lagon), var(--ink) 75%); color: var(--white); border-radius: var(--wave); padding: clamp(2rem, 5vw, 3.6rem); display: flex; gap: 2rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin: 0 0 .3em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .88); max-width: 34rem; }

/* ---------- Pages internes ---------- */
.page-head { background: var(--ink); color: var(--white); padding: clamp(2.6rem, 6vw, 4.2rem) 0 clamp(2.4rem, 5vw, 3.4rem); position: relative; overflow: hidden; }
.page-head::after { content: ''; position: absolute; right: -80px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(46, 196, 182, .12); }
.page-head h1 { color: var(--white); font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: .3em; }
.page-head p { color: rgba(255, 255, 255, .85); max-width: 40rem; font-size: 1.15rem; margin: 0; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }

.notice { display: flex; gap: .9rem; background: #fff6de; border: 1px solid #f3d88f; border-left: 5px solid var(--sun); padding: 1rem 1.2rem; border-radius: 12px; font-size: .97rem; }
.notice svg { flex: none; width: 24px; height: 24px; color: var(--sun-d); margin-top: .1rem; }
.notice p { margin: 0; }
.notice.info { background: #e8f6f5; border-color: #b6e1dd; border-left-color: var(--turq); }
.notice.info svg { color: var(--lagon); }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.15rem 2.4rem 1.15rem 0; font: 700 1.12rem/1.35 var(--f-display); color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--lagon); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 2.4rem 1.2rem 0; color: var(--muted); margin: 0; }

/* Simulateur */
.sim { background: var(--white); border: 1px solid var(--line); border-radius: var(--wave); padding: 1.6rem; box-shadow: var(--shadow); }
.sim output { display: block; font: 800 clamp(2rem, 5vw, 3rem)/1 var(--f-display); color: var(--ink); margin: .3rem 0 .2rem; }
.sim .row { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
.sim label b { float: right; color: var(--lagon); }
input[type=range] { width: 100%; accent-color: var(--lagon); height: 32px; }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field label, .lbl { font-weight: 700; font-size: .95rem; color: var(--ink); }
.field .hint { font-size: .86rem; color: var(--muted); margin: 0; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 12px; padding: .8rem .95rem; min-height: 48px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 130px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #9fbdc0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lagon); box-shadow: 0 0 0 4px rgba(14, 124, 134, .18); }
.field.err input, .field.err select, .field.err textarea { border-color: var(--hib); }
.field .msg { color: var(--hib); font-size: .88rem; font-weight: 600; min-height: 0; margin: 0; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; margin-bottom: 1rem; }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: .15rem; accent-color: var(--lagon); flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1.2rem; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.counter { text-align: right; font-size: .82rem; color: var(--muted); }
.alert { padding: .8rem 1rem; border-radius: 12px; font-weight: 600; font-size: .95rem; margin-bottom: 1rem; }
.alert.err { background: #fdeef1; color: #a3213b; border: 1px solid #f2c3cc; }
.alert.ok { background: #e2f6ec; color: #0e6b47; border: 1px solid #b4e3cb; }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--lagon); font-weight: 700; cursor: pointer; padding: .5rem .7rem; border-radius: 8px; font-size: .9rem; }
.pw-wrap input { padding-right: 5.4rem; }
.strength { height: 5px; border-radius: 5px; background: var(--mist); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; background: var(--hib); transition: width .2s, background .2s; }

/* ---------- Pages d'authentification ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { position: relative; background: var(--ink); color: var(--white); padding: 2.2rem clamp(1.6rem, 4vw, 3.4rem); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; }
.auth-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.auth-side::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(6, 40, 58, .95) 8%, rgba(6, 40, 58, .55) 60%, rgba(6, 40, 58, .8)); }
.auth-side .brand { background: #fff; align-self: flex-start; padding: .6rem .9rem; border-radius: 14px 4px 14px 4px; }
.auth-side .brand img { height: 34px; }
.auth-side h2 { color: var(--white); font-size: clamp(1.7rem, 3vw, 2.5rem); max-width: 28rem; }
.auth-side ul { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .6rem; }
.auth-side li { display: flex; gap: .7rem; align-items: flex-start; color: rgba(255, 255, 255, .92); }
.auth-side li svg { width: 22px; height: 22px; color: var(--turq); flex: none; margin-top: .15rem; }
.auth-main { padding: 2.2rem clamp(1.4rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; }
.auth-box { width: min(440px, 100%); margin: 0 auto; }
.auth-box h1 { font-size: 2.1rem; margin-bottom: .3em; }
.auth-box .sub { color: var(--muted); margin-bottom: 1.6rem; }
.auth-foot { text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: .97rem; }
.auth-back { display: inline-block; margin-bottom: 1.6rem; font-weight: 600; font-size: .95rem; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { min-height: 220px; padding-block: 1.4rem; }
  .auth-side ul, .auth-side .brand { background: #fff; align-self: flex-start; padding: .6rem .9rem; border-radius: 14px 4px 14px 4px; }
.auth-side .brand img { height: 34px; }
.auth-side h2 { display: none; }
  .auth-main { padding-block: 2rem 3rem; justify-content: flex-start; }
}

/* ---------- Pied de page ---------- */
.ftr { background: var(--ink); color: rgba(255, 255, 255, .78); padding: 3.4rem 0 1.6rem; font-size: .96rem; }
.ftr .brand { background: #fff; padding: .6rem .9rem; border-radius: 14px 4px 14px 4px; }
.ftr .brand img { height: 36px; }
.ftr a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.ftr a:hover { color: var(--sun); text-decoration: underline; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; }
.ftr h4 { color: var(--white); font-size: 1rem; margin-bottom: .8em; }
.ftr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.ftr .legal { border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 2.2rem; padding-top: 1.4rem; font-size: .86rem; color: rgba(255, 255, 255, .62); display: grid; gap: .5rem; }
.ftr .legal p { margin: 0; max-width: 62rem; }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ftr-grid { grid-template-columns: 1fr; } }

/* ==========================================================
   Espace membre & administration
   ========================================================== */
body.app { background: var(--foam); }
.app-hdr { position: sticky; top: 0; z-index: 60; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); height: 68px; display: flex; align-items: center; }
.app-hdr .wrap { width: min(1320px, 100% - 2rem); display: flex; align-items: center; gap: 1rem; }
.app-hdr .grow { flex: 1; }
.app-hdr .who { font-size: .93rem; color: var(--ink); text-align: right; line-height: 1.25; }
.app-hdr .who small { display: block; color: var(--muted); }
.app-hdr .btn.ghost { --fg: var(--ink); border-color: var(--line); }
.app-hdr .btn.ghost:hover { background: var(--foam); color: var(--ink); border-color: var(--lagon); }
.bell { position: relative; background: var(--foam); border: 0; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.bell:hover { background: var(--mist); color: var(--ink); }
.bell svg { width: 21px; height: 21px; }
.bell .dot { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--hib); color: #fff; font: 700 .72rem/20px var(--f-body); text-align: center; }
.shell { width: min(1320px, 100% - 2rem); margin: 0 auto; display: grid; grid-template-columns: 236px 1fr; gap: 2rem; padding: 1.6rem 0 4rem; align-items: start; }
.side { position: sticky; top: 84px; display: grid; gap: .3rem; }
.side a { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: 14px 4px 14px 4px; color: var(--ink-2); text-decoration: none; font-weight: 700; }
.side a svg { width: 22px; height: 22px; flex: none; }
.side a:hover { background: var(--mist); color: var(--ink); }
.side a.on { background: var(--ink); color: var(--white); }
.side .sep { height: 1px; background: var(--line); margin: .6rem 0; }
.main { min-width: 0; }
.main > h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .25em; }
.main > .lead { color: var(--muted); margin-bottom: 1.6rem; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 1.4rem; }
.card + .card { margin-top: 1.2rem; }
.card h2 { font-size: 1.3rem; margin-bottom: .6em; }
.card h3 { font-size: 1.05rem; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.head-row h2 { margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem 1.2rem; }
.kpi b { display: block; font: 800 2rem/1.1 var(--f-display); color: var(--ink); }
.kpi span { color: var(--muted); font-size: .92rem; }
.kpi.hi { background: var(--ink); border-color: var(--ink); }
.kpi.hi b { color: var(--sun); }
.kpi.hi span { color: rgba(255, 255, 255, .78); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.plist { display: grid; gap: .8rem; }
.prow { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; align-items: center; padding: 1.1rem 1.2rem; background: var(--white); border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.prow:hover { border-color: var(--lagon); transform: translateY(-2px); color: inherit; }
.prow h3 { margin: 0; font-size: 1.12rem; }
.prow .meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.prow .amt { font: 800 1.15rem var(--f-display); color: var(--ink); text-align: right; }
@media (max-width: 620px) { .prow { grid-template-columns: 1fr; } .prow .amt { text-align: left; } }
.empty { text-align: center; padding: 2.6rem 1rem; background: var(--white); border: 2px dashed var(--line); border-radius: 20px; }
.empty h3 { margin-bottom: .3em; }
.empty p { color: var(--muted); max-width: 30rem; margin: 0 auto 1.2rem; }

/* Assistant de création */
.wizard-steps { display: flex; gap: .5rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.wizard-steps span { flex: 1 1 140px; padding: .7rem .9rem; border-radius: 14px 4px 14px 4px; background: var(--mist); color: var(--muted); font-weight: 700; font-size: .93rem; }
.wizard-steps span.on { background: var(--ink); color: var(--white); }
.wizard-steps span.done { background: #d5f0ec; color: var(--lagon); }
.wiz-actions { display: flex; gap: .7rem; justify-content: space-between; flex-wrap: wrap; margin-top: 1.4rem; }
.wiz-actions > div { display: flex; gap: .7rem; flex-wrap: wrap; }
.recap { display: grid; grid-template-columns: 200px 1fr; gap: .5rem 1.2rem; margin: 0; }
.recap dt { color: var(--muted); font-weight: 600; }
.recap dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 620px) { .recap { grid-template-columns: 1fr; gap: 0; } .recap dd { margin-bottom: .7rem; } }
.fin-box { background: var(--foam); border-radius: 14px; padding: 1rem 1.2rem; margin-top: .4rem; display: grid; gap: .3rem; font-size: .96rem; }
.fin-box b { color: var(--ink); }

.detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.2rem; align-items: start; }
.detail .card + .card { margin-top: 0; }
.detail > div { display: grid; gap: 1.2rem; }
@media (max-width: 1000px) { .detail { grid-template-columns: 1fr; } }

.chat { display: grid; gap: .7rem; max-height: 420px; overflow-y: auto; padding: .3rem .2rem .8rem; }
.bub { max-width: 88%; padding: .7rem 1rem; border-radius: 16px 16px 16px 4px; background: var(--mist); font-size: .97rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.bub small { display: block; color: var(--muted); font-size: .78rem; margin-top: .3rem; }
.bub.me { justify-self: end; background: var(--ink); color: var(--white); border-radius: 16px 16px 4px 16px; }
.bub.me small { color: rgba(255, 255, 255, .65); }
.chat-form { display: flex; gap: .6rem; margin-top: .8rem; }
.chat-form textarea { min-height: 52px; height: 52px; }
@media (max-width: 520px) { .chat-form { flex-direction: column; } .chat-form textarea { height: 90px; } }

.notif { display: flex; gap: .9rem; padding: 1rem 1.1rem; background: var(--white); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: inherit; align-items: flex-start; }
.notif.new { border-left: 5px solid var(--sun); }
.notif small { color: var(--muted); display: block; }
.notif + .notif { margin-top: .6rem; }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--mist); vertical-align: middle; }
th { font-size: .82rem; color: var(--muted); font-weight: 700; background: var(--foam); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: var(--foam); }
.filters { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input { flex: 1 1 220px; }
.filters select { flex: 0 1 220px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: var(--white); padding: .9rem 1.3rem; border-radius: 14px; font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; z-index: 300; max-width: calc(100% - 2rem); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #a3213b; }

/* Navigation mobile de l'espace membre */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding-bottom: 96px; gap: 1rem; }
  .side { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; background: var(--white); border-top: 1px solid var(--line); padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom)); box-shadow: 0 -10px 30px -18px rgba(6, 40, 58, .6); }
  .side a { flex-direction: column; gap: .15rem; font-size: .72rem; padding: .5rem .2rem; text-align: center; border-radius: 12px; }
  .side .sep, .side .hide-m { display: none; }
  .app-hdr .who { display: none; }
}
.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* Ajustements espace membre */
.main:focus, #view:focus { outline: none; }
.main h1 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
.head-row h1 { margin: 0; }

.btn svg { width: 18px; height: 18px; flex: none; }
.app-hdr .wrap { min-width: 0; }
.app-hdr .brand, .app-hdr .bell, .app-hdr .btn { flex: none; }
@media (max-width: 520px) {
  .app-hdr .brand span { display: none; }
  .app-hdr .wrap { gap: .7rem; }
  .prow h3 { font-size: 1.05rem; }
}

/* Logo dans l'espace membre */
.app-hdr .brand img { height: 36px; }
@media (max-width: 520px) { .app-hdr .brand img { height: 30px; } .brand img { height: 34px; } }
@media (max-width: 520px) { .app-hdr .brand span { display: none; } }

/* ---------- Sections denses ---------- */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .three, .four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .two, .three, .four { grid-template-columns: 1fr; } }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--wave); padding: 1.5rem; }
.box h3 { margin-bottom: .4em; }
.box p { color: var(--muted); font-size: .99rem; }
.box p:last-child { margin-bottom: 0; }
.box .ico { width: 48px; height: 48px; border-radius: 14px 4px 14px 4px; background: var(--mist); color: var(--lagon); display: grid; place-items: center; margin-bottom: 1rem; }
.box .ico svg { width: 26px; height: 26px; }
.box ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .96rem; }
.box ul li + li { margin-top: .3rem; }
.box .more { display: inline-block; margin-top: .9rem; font-weight: 700; }
.box.dark { background: var(--ink-2); border-color: var(--ink-2); }
.box.dark h3 { color: #fff; } .box.dark p, .box.dark ul { color: rgba(255,255,255,.82); }
.box.gold { background: #fff3d6; border-color: #f4dc9c; }
.box.gold p, .box.gold ul { color: #5b4514; }
.figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.fig { padding: 1.2rem 1.3rem; border-left: 4px solid var(--sun); background: rgba(255,255,255,.07); border-radius: 4px 16px 16px 4px; }
.fig b { display: block; font: 800 2.3rem/1 var(--f-display); color: #fff; }
.fig span { color: rgba(255,255,255,.82); font-size: .97rem; }
@media (max-width: 860px) { .figs { grid-template-columns: repeat(2, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; }
.chips span { background: var(--mist); color: var(--ink-2); font-weight: 600; font-size: .88rem; padding: .3rem .75rem; border-radius: 999px; }
.checklist { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .55rem; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: .6rem; color: var(--text); font-size: .98rem; }
.checklist svg { width: 22px; height: 22px; color: var(--ok); margin-top: .1rem; }
.lead-big { font-size: 1.18rem; color: var(--muted); max-width: 48rem; }
.img-card { border-radius: var(--wave); overflow: hidden; position: relative; min-height: 320px; }
.img-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote { font: 700 clamp(1.3rem, 2.4vw, 1.8rem)/1.3 var(--f-display); color: #fff; max-width: 40rem; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; background: #fff3d6; color: #7a5200; padding: .2rem .6rem; border-radius: 6px; }
.anchor-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.anchor-nav a { padding: .55rem 1rem; border: 2px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--ink); }
.anchor-nav a:hover { border-color: var(--lagon); background: var(--foam); }
.stage { scroll-margin-top: 100px; }
.ex-card { display: grid; gap: .3rem; }
.ex-card .amt { font: 800 1.5rem var(--f-display); color: var(--ink); }
.terr-card { display: grid; gap: .3rem; }
.terr-card .flag { font-size: 2rem; line-height: 1; }

/* Correctifs en-tête */
.hdr .wrap { width: min(1320px, 100% - 2rem); }
.nav a.btn { background: var(--sun); border: 2px solid var(--sun); color: var(--ink); padding: .7rem 1.15rem; border-radius: 999px; }
.nav a.btn:hover { background: #ffc35f; border-color: #ffc35f; color: var(--ink); }
.nav a.btn[aria-current] { box-shadow: none; }
@media (max-width: 1340px) { .nav a.btn { justify-content: center; } }

/* ---------- Défilement : bouton pause, mouvement réduit ---------- */
.arrows { gap: .5rem; }
@media (prefers-reduced-motion: reduce) {
  .slide img { transform: none !important; }
  .slide { transition: opacity .6s ease !important; }
  .slide.on { transition: opacity .6s ease !important; }
}

/* ---------- Section application mobile ---------- */
.app-sec { background: linear-gradient(180deg, #fff 0%, var(--foam) 100%); overflow: hidden; }
.app-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.8rem; }
@media (max-width: 640px) { .app-cards { grid-template-columns: 1fr; } }
.app-card { position: relative; background: #fff; border: 2px solid var(--line); border-radius: var(--wave); padding: 1.5rem; display: flex; flex-direction: column; gap: .3rem; transition: border-color .2s, box-shadow .2s, transform .2s; }
.app-card h3 { margin: .2rem 0 .1rem; }
.app-card p { color: var(--muted); font-size: .96rem; flex: 1; margin-bottom: .8rem; }
.app-card.is-rec { border-color: var(--lagon); box-shadow: 0 18px 40px -24px rgba(14, 124, 134, .7); transform: translateY(-3px); }
.app-card .rec { position: absolute; top: -12px; left: 1rem; background: var(--lagon); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; }
.ac-ico { width: 52px; height: 52px; border-radius: 16px 4px 16px 4px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.ac-ico svg { width: 28px; height: 28px; }
.phone-wrap { display: grid; place-items: center; padding: 1rem 0; }
.phone { width: min(290px, 78vw); aspect-ratio: 9 / 18.5; background: #0b2f42; border-radius: 40px; padding: 11px; box-shadow: 0 40px 70px -30px rgba(6, 40, 58, .7), inset 0 0 0 2px #1d4a60; position: relative; transform: rotate(3deg); display: flex; flex-direction: column; }
.phone::before { content: ''; position: absolute; top: 18px; left: 50%; width: 78px; height: 20px; background: #0b2f42; border-radius: 12px; transform: translateX(-50%); z-index: 2; }
.ph-bar { background: #fff; border-radius: 30px 30px 0 0; padding: 38px 18px 12px; }
.ph-bar img { height: 26px; width: auto; }
.ph-body { background: var(--foam); flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ph-hello { font: 800 1.15rem var(--f-display); color: var(--ink); }
.ph-card { background: #fff; border-radius: 14px; padding: 11px 12px; display: grid; gap: 2px; border: 1px solid var(--line); }
.ph-card b { font-size: .8rem; color: var(--ink); } .ph-card span { font-size: .7rem; color: var(--muted); }
.ph-main { background: linear-gradient(135deg, var(--lagon), var(--ink)); border: 0; padding: 16px 14px; }
.ph-main b { color: #fff; font-size: .95rem; } .ph-main span { color: rgba(255, 255, 255, .85); }
.ph-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-steps { display: flex; gap: 6px; margin-top: auto; } .ph-steps i { flex: 1; height: 6px; border-radius: 6px; background: var(--line); } .ph-steps i.on { background: var(--sun); }
.ph-nav { background: #fff; border-radius: 0 0 30px 30px; padding: 12px 18px 16px; display: flex; justify-content: space-between; align-items: center; }
.ph-nav i { width: 20px; height: 20px; border-radius: 6px; background: var(--mist); } .ph-nav i.c { width: 34px; height: 34px; border-radius: 12px; background: var(--sun); margin-top: -18px; }
html.is-standalone [data-hide-standalone] { display: none !important; }

html.is-standalone [data-install-hide-when-installed] { display: none !important; }

.nav .sub-toggle[aria-current="page"] { color: var(--lagon); box-shadow: inset 0 -3px 0 var(--sun); border-radius: 0; }
@media (max-width: 1340px) { .nav .sub-toggle[aria-current="page"] { box-shadow: none; background: var(--foam); } }
