/* ===========================================================================
   Site public « Capitaine Bastien Martinez » — thème « carte marine »
   Repris du site actuel (papier, encre bleue, accent magenta, Cormorant Garamond /
   Source Sans 3 / Roboto Condensed, mode clair et nuit), complété pour les
   nouvelles sections (offres, piliers, panneau de la carte, journal, références,
   formulaire de contact, pages légales).
   =========================================================================== */

/* ---------- Tokens : carte marine (papier) / carte de nuit ---------- */
:root {
  color-scheme: light;
  --paper: #F4EDDC; --paper2: #EAE0C4; --paper3: #DFD3B3; --water: #DAE8EF; --water2: #C6DBE6;
  /* Phase 6 : --ink3 assombri (#74809A donnait 3,4:1 sur --paper ; #57637B : 5,2:1 sur --paper, 4,6:1 sur --paper2, AA) */
  --ink: #1B2A41; --ink2: #465368; --ink3: #57637B; --line: #C4B99C; --line2: #DCD2B8;
  --accent: #B5246C; --accent-ink: #FFFFFF; --accent-soft: #F3DDE8; --accent2: #1E7F8C;
  /* JOURNAL-ACCUEIL : vert « Valide » foncé (#2E7D4F donnait 4,2:1 sur --ok-soft et 4,3:1 sur --paper ; #24613F : 6,1:1 et 6,3:1, AA) */
  --ok: #24613F; --ok-soft: #DCEFE3; --warn: #96560A; --warn-soft: #F8E7CC;
  --sci: #1E7F8C; --yacht: #B5246C; --sar: #C9511C; --offshore: #6A4C9C; --pax: #2E7D4F; --training: #6E7C93;
  --halo: rgba(244, 237, 220, .85);
  --shadow: 0 1px 2px rgba(27, 42, 65, .08), 0 14px 34px rgba(27, 42, 65, .12);
  --display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  --label: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url%28#n%29'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0F1A2A; --paper2: #182639; --paper3: #213248; --water: #0B1524; --water2: #10203A;
    --ink: #EFE8D8; --ink2: #C3BBA8; --ink3: #979383; --line: #33455C; --line2: #22334A;
    --accent: #F06AA8; --accent-ink: #0F1A2A; --accent-soft: #3A2238; --accent2: #4FC3CF;
    --ok: #5FCB8B; --ok-soft: #173A2A; --warn: #F0B35B; --warn-soft: #3D2E15;
    --sci: #4FC3CF; --yacht: #F06AA8; --sar: #F58A4B; --offshore: #B39BEA; --pax: #63C489; --training: #93A5B8;
    --halo: rgba(15, 26, 42, .85);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0F1A2A; --paper2: #182639; --paper3: #213248; --water: #0B1524; --water2: #10203A;
  --ink: #EFE8D8; --ink2: #C3BBA8; --ink3: #979383; --line: #33455C; --line2: #22334A;
  --accent: #F06AA8; --accent-ink: #0F1A2A; --accent-soft: #3A2238; --accent2: #4FC3CF;
  --ok: #5FCB8B; --ok-soft: #173A2A; --warn: #F0B35B; --warn-soft: #3D2E15;
  --sci: #4FC3CF; --yacht: #F06AA8; --sar: #F58A4B; --offshore: #B39BEA; --pax: #63C489; --training: #93A5B8;
  --halo: rgba(15, 26, 42, .85);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .4);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--noise) repeat, var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:root[lang="zh"] body, :root[lang="zh"] h1, :root[lang="zh"] h2, :root[lang="zh"] h3, :root[lang="zh"] .hook, :root[lang="zh"] .display { font-family: "Source Sans 3", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif; }
:root[lang="zh"] .label, :root[lang="zh"] .navlink, :root[lang="zh"] .btn { letter-spacing: .04em; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.05; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(38px, 4.6vw, 58px); }
h3 { font-size: 24px; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
picture { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-soft); }
[hidden] { display: none !important; }
.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: 20px; }
.label { font-family: var(--label); text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 500; color: var(--ink2); }
.eyebrow { font-family: var(--label); text-transform: uppercase; letter-spacing: .16em; font-size: 12.5px; font-weight: 500; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow svg { width: 16px; height: 16px; }
.lead { font-size: 19px; color: var(--ink2); max-width: 60ch; }
.sec { padding-block: 84px; position: relative; scroll-margin-top: 72px; }
.sec-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 500; padding: 4px 9px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink2); background: var(--paper); white-space: nowrap; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink3)); flex: none; }
.chip.ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; white-space: normal; }
.chip svg { width: 13px; height: 13px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border: 1.5px solid var(--ink); border-radius: 2px; font-family: var(--label); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink); background: transparent; transition: background .15s, color .15s, transform .15s, box-shadow .15s; }
.btn:hover { background: var(--ink); color: var(--paper); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 15px; height: 15px; }
.linkbtn { font-family: var(--label); text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 500; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; text-align: left; }
.linkbtn svg { width: 14px; height: 14px; flex: none; }
/* « Voir sur la carte » / « Voir l'étape sur la carte » : dessin de carte, plus grand (17 octobre 2026 : l'ancienne flèche
   « lien externe » était illisible au téléphone et laissait croire à un autre site) */
.linkbtn svg.ico-carte { width: 18px; height: 18px; }
.linkbtn:hover { text-decoration: underline; }
.cat-sci { --c: var(--sci); } .cat-yacht { --c: var(--yacht); } .cat-sar { --c: var(--sar); } .cat-offshore { --c: var(--offshore); } .cat-pax { --c: var(--pax); } .cat-training { --c: var(--training); }
.plate { position: relative; background: var(--paper); border: 1px solid var(--ink); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line); }
.stamp { display: inline-block; font-family: var(--label); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 700; color: var(--accent); border: 2px solid var(--accent); padding: 7px 12px; border-radius: 3px; box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px var(--accent); transform: rotate(-4deg); opacity: .92; }
.rule { display: flex; align-items: center; gap: 12px; }
.rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.vlinks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; text-decoration: none; }
.skip:focus { left: 8px; }
.erreur { padding: 80px 20px; font-size: 17px; color: var(--ink2); display: flex; flex-direction: column; gap: 10px; }
.erreur code { font-family: var(--label); font-size: 13px; color: var(--ink3); }

/* Apparitions au défilement (état de repos visible) */
.reveal.in { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal.in { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Bordure de carte (tirets alternés) ---------- */
.chart-frame { position: relative; padding: 10px; background: var(--paper); border: 1px solid var(--ink); display: grid; }
.chart-frame picture { display: contents; }
.chart-frame img { width: 100%; height: 100%; object-fit: cover; min-height: 0; min-width: 0; }
.chart-frame::before, .chart-frame::after { content: ""; position: absolute; left: 4px; right: 4px; height: 3px; background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 28px); pointer-events: none; }
.chart-frame::before { top: 4px; } .chart-frame::after { bottom: 4px; }
.chart-frame .edge { position: absolute; top: 4px; bottom: 4px; width: 3px; background: repeating-linear-gradient(180deg, var(--ink) 0 14px, transparent 14px 28px); pointer-events: none; }
.chart-frame .edge.l { left: 4px; } .chart-frame .edge.r { right: 4px; }
.divider { height: 26px; width: 100%; display: block; color: var(--ink); opacity: .55; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .top { background: var(--paper); } }
.top .wrap { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand svg { width: 26px; height: 26px; flex: none; color: var(--accent); }
.brand-name { font-family: var(--display); font-size: 22px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.nav { display: flex; gap: 2px; justify-content: center; flex-wrap: nowrap; min-width: 0; overflow: hidden; }
.navlink { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 500; color: var(--ink2); padding: 8px 8px; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.navlink:hover { color: var(--ink); }
.navlink[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tools { display: flex; gap: 2px; }
.iconbtn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 2px; color: var(--ink2); }
.iconbtn:hover { background: var(--paper2); color: var(--ink); }
.iconbtn svg { width: 20px; height: 20px; }
.drawer { position: fixed; z-index: 29; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 64px); background: var(--paper); border-bottom: 1px solid var(--ink); box-shadow: var(--shadow); padding: 10px 20px 16px; display: flex; flex-direction: column; }
.drawer .navlink { font-size: 15px; padding: 12px 4px; border-bottom: 1px solid var(--line2); }
.drawer .navlink[aria-current="true"] { border-bottom-color: var(--line2); color: var(--accent); }
@media (max-width: 1100px) { .nav { display: none; } }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; padding-block: 56px 40px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg .rhumb { position: absolute; inset: -20%; background: repeating-conic-gradient(from 0deg at 76% 42%, color-mix(in srgb, var(--ink) 9%, transparent) 0 .18deg, transparent .18deg 11.25deg); opacity: .9; }
.hero-bg .chart { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .75; }
.hero-bg .chart use.land { fill: var(--paper2); fill-opacity: .55; stroke: var(--ink); stroke-width: .7px; stroke-opacity: .22; }
.hero-bg .chart .hero-route { fill: none; stroke: var(--accent); stroke-width: 1.7px; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: draw 5.5s cubic-bezier(.4, 0, .3, 1) .8s forwards; }
.hero-bg .chart .hero-port { fill: var(--paper); stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.hero-bg .chart .hero-ship { fill: var(--paper); stroke: var(--ink); stroke-width: 1.6px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
/* vector-effect ne s'hérite pas : sans cette règle, le contour du bateau grossit avec le zoom (tache grise) */
.hero-bg .chart .hero-ship path { vector-effect: non-scaling-stroke; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-bg .chart .hero-route { animation: none; stroke-dashoffset: 0; } }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; z-index: 1; }
.hero-text { display: flex; flex-direction: column; gap: 20px; position: relative; }
.hero-text::before { content: ""; position: absolute; inset: -40px -60px -40px -80px; background: radial-gradient(ellipse at 40% 50%, var(--paper) 30%, transparent 72%); z-index: -1; pointer-events: none; }
.hero h1 { font-size: clamp(54px, 7.4vw, 100px); font-weight: 700; letter-spacing: -.015em; line-height: .95; }
.hook { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(24px, 2.7vw, 34px); line-height: 1.15; color: var(--ink); }
.hero .lead { color: var(--ink); font-size: 18px; max-width: 58ch; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 10px; }
.hero-meta .port { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--ink2); display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .port svg { width: 14px; height: 14px; color: var(--accent); }
.hero-stats { list-style: none; margin: 10px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 36px; }
.hero-stats li { display: flex; flex-direction: column; gap: 4px; }
.hero-stats b { font-family: var(--display); font-size: 36px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-stats span { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: 11.5px; color: var(--ink2); }
.hero-photo { position: relative; margin: 0; }
.hero-photo .rose { position: absolute; width: 54%; aspect-ratio: 1; right: -7%; top: -7%; opacity: .8; z-index: 0; }
.hero-photo .rose svg { width: 100%; height: 100%; display: block; }
.hero-photo .chart-frame { position: relative; aspect-ratio: 3 / 4; max-width: 420px; margin-left: auto; box-shadow: var(--shadow); }
.hero-photo figcaption { font-family: var(--label); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); margin-top: 12px; text-align: right; }
.cartouche { position: relative; padding: 20px 22px; max-width: 420px; margin-left: auto; box-shadow: var(--shadow); }
.cartouche.under-photo { margin-top: 22px; }
.cartouche .label { margin-bottom: 10px; }
.cartouche dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 15px; }
.cartouche dt { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--ink3); padding-top: 3px; }
.cartouche dd { margin: 0; }
.scroll-hint { display: flex; justify-content: center; margin-top: 44px; font-family: var(--label); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--ink3); }
.scroll-hint span { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.scroll-hint i { width: 1px; height: 28px; background: var(--ink3); display: block; animation: dip 1.8s ease-in-out infinite; }
@keyframes dip { 0%, 100% { transform: scaleY(.4); transform-origin: top; } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint i { animation: none; } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-photo .chart-frame { margin-left: 0; max-width: 100%; aspect-ratio: 4 / 5; }
  .hero-photo .rose { width: 46%; right: -8%; top: -10%; }
  .hero-photo figcaption { text-align: left; }
  .cartouche { margin-left: 0; max-width: 100%; }
}

/* ---------- Ce que je propose (offres) & piliers ---------- */
.strengths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.strength { padding: 26px 24px 26px; display: flex; flex-direction: column; gap: 14px; transition: transform .2s, box-shadow .2s; }
.strength:hover { transform: translateY(-3px); box-shadow: var(--shadow), inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line); }
.strength .ico, .pilier .ico { width: 58px; height: 58px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; color: var(--accent); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--line); flex: none; }
.strength .ico svg, .pilier .ico svg { width: 30px; height: 30px; }
.strength h3 { font-size: 27px; }
.strength p { color: var(--ink2); font-size: 15.5px; flex: 1; }
.piliers-head { margin-top: 70px; }
.piliers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.pilier { padding: 22px 20px 24px; display: flex; flex-direction: column; gap: 12px; transition: transform .2s, box-shadow .2s; }
.pilier:hover { transform: translateY(-3px); box-shadow: var(--shadow), inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line); }
.pilier-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pilier .num { font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.pilier .ico { width: 48px; height: 48px; }
.pilier .ico svg { width: 24px; height: 24px; }
.pilier h3 { font-size: 23px; }
.pilier p { color: var(--ink2); font-size: 14.5px; flex: 1; }
.et-aussi { margin-top: 44px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.et-aussi ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.et-aussi li { display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink2); }
.et-aussi li svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.et-aussi li b { color: var(--ink); font-weight: 600; }
@media (max-width: 1100px) { .piliers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .strengths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .piliers { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .strengths { grid-template-columns: 1fr; } }

/* ---------- Chiffres ---------- */
.numbers { background: var(--ink); color: var(--paper); padding-block: 48px; position: relative; overflow: hidden; }
.numbers .rose { position: absolute; right: -40px; top: -70px; width: 320px; height: 320px; opacity: .22; --ink: var(--paper); --paper: transparent; --accent: var(--paper); }
.numbers .rose svg { width: 100%; height: 100%; }
.numbers .wrap { position: relative; }
.numbers .label { color: var(--paper); opacity: .7; margin-bottom: 18px; }
.numgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 24px; }
.num b { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(38px, 4.4vw, 60px); line-height: 1; color: var(--paper); font-variant-numeric: tabular-nums; }
.num span { display: block; margin-top: 8px; font-size: 14.5px; opacity: .8; line-height: 1.3; }
@media (max-width: 960px) { .numgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .numgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== CARTE : début (carte des navigations sur les vraies côtes, phase 4 : public/js/carte.js, données public/geo) ===== */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 500; padding: 6px 10px; min-height: 36px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink2); background: var(--paper); }
.seg button:hover { border-color: var(--ink2); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.zoomctl { display: flex; gap: 4px; }
.zoomctl button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 2px; display: grid; place-items: center; font-size: 20px; line-height: 1; color: var(--ink2); background: var(--paper); }
.zoomctl button:hover { color: var(--ink); border-color: var(--ink2); }
.map-stage { position: relative; aspect-ratio: 16 / 10; background: var(--water); overflow: hidden; touch-action: pan-x pan-y; margin: 5px; cursor: grab; }
.map-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.map-stage.grabbing, .map-stage.grabbing #map { cursor: grabbing; }
.map-stage #map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-stage .compass { position: absolute; right: 12px; top: 10px; width: 74px; height: 74px; pointer-events: none; opacity: .9; }
.map-stage .compass svg { width: 100%; height: 100%; }
/* Échelle en milles (en haut à gauche, hors des graduations du graticule), indice « deux doigts » et état de chargement (au centre) */
.map-scale { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 3px; padding: 4px 8px 6px; background: color-mix(in srgb, var(--paper) 82%, transparent); border-radius: 2px; font-family: var(--label); font-size: 11px; letter-spacing: .06em; color: var(--ink2); pointer-events: none; }
.map-scale i { display: block; height: 5px; border: 1px solid var(--ink); border-top: 0; background: linear-gradient(90deg, var(--ink) 0 50%, transparent 50%); opacity: .8; }
.map-indice, .map-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: color-mix(in srgb, var(--paper) 92%, transparent); border: 1px solid var(--ink); padding: 8px 14px; font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--ink); pointer-events: none; max-width: 80%; text-align: center; }
.map-loading[data-etat="erreur"] { color: var(--warn); text-transform: none; letter-spacing: 0; }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .map-scale, .map-indice, .map-loading { background: var(--paper); } }
.map-note { font-family: var(--label); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); padding: 8px 14px 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; }
.map-attrib { text-transform: none; letter-spacing: .02em; }
/* Fond de carte (carto/fond.js : hachures de côte, terres, traits de côte ; --tiret suit le zoom) */
.fond-carte .land { fill: var(--paper2); stroke: none; }
.fond-carte .coast { fill: none; stroke: var(--ink); stroke-width: .8px; vector-effect: non-scaling-stroke; }
.fond-carte .land-hatch { fill: none; stroke: var(--ink); stroke-width: 6px; stroke-opacity: .13; stroke-dasharray: var(--tiret, 1.2 2.6); vector-effect: non-scaling-stroke; }
.grat line { stroke: var(--ink); stroke-opacity: .14; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.grat text { font-family: var(--label); fill: var(--ink3); paint-order: stroke; stroke: var(--water); stroke-linejoin: round; }
/* Trajets : trait plein = tracé calculé sur les routes maritimes, pointillé = tracé indicatif */
.route .hit { fill: none; stroke: transparent; stroke-width: 16px; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.route .ln { fill: none; stroke: var(--c, var(--accent)); stroke-width: 2.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; transition: opacity .25s, stroke-width .25s; pointer-events: none; }
.route .halo { fill: none; stroke: var(--halo); stroke-width: 6px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.route .draw { fill: none; stroke: var(--c, var(--accent)); stroke-width: 4.5px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; opacity: 0; }
.route.sel .draw { opacity: 1; transition: opacity .6s; }
.route.sel.done .draw { opacity: 0; }
.route.approx .ln { stroke-dasharray: 7 5; }
.route.sel .ln { stroke-width: 4px; }
.map-stage.has-sel .route:not(.sel) .ln { opacity: .22; }
.map-stage.has-sel .route:not(.sel) .halo { opacity: 0; }
.map-stage.has-sel .port:not(.sel) { opacity: .3; }
.route.hidden-cat, .port.hidden-cat { display: none; }
/* Escales : port (cercle), mouillage (cercle sur l'eau), point de passage ou canal (petit point plein) */
.port circle { fill: var(--paper); stroke: var(--c, var(--accent)); vector-effect: non-scaling-stroke; stroke-width: 2px; }
.port.type-mouillage circle { fill: var(--water); }
.port.type-point circle, .port.type-canal circle { fill: var(--c, var(--accent)); stroke: var(--paper); stroke-width: 1.5px; }
.port.sel circle { stroke-width: 2.5px; }
.port text, .place text { font-family: var(--label); fill: var(--ink); paint-order: stroke; stroke: var(--halo); stroke-linejoin: round; font-weight: 500; pointer-events: none; }
.port { cursor: pointer; }
/* Lieux : port d'attache (ancre), formation (carré), mission (triangle) */
.place rect { fill: var(--paper); stroke: var(--training); vector-effect: non-scaling-stroke; stroke-width: 1.5px; }
.place.mission path { fill: var(--paper); stroke: var(--offshore); vector-effect: non-scaling-stroke; stroke-width: 1.5px; stroke-linejoin: round; }
.place { cursor: pointer; }
.shipm { pointer-events: none; }
.map-side { display: flex; flex-direction: column; }
.map-side-body { display: flex; flex-direction: column; gap: 14px; }
.sheet-toggle { display: none; }
.legend { padding: 16px 18px; }
.legend .label { margin-bottom: 8px; }
.legend ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.legend button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 5px 4px; font-size: 14.5px; color: var(--ink); border-radius: 2px; }
.legend button:hover:not(:disabled) { background: var(--paper2); }
.legend button[aria-pressed="false"] { color: var(--ink3); text-decoration: line-through; }
.legend .sw { width: 22px; height: 0; border-top: 3px solid var(--c, var(--ink3)); flex: none; }
.legend .sw.sq { width: 10px; height: 10px; border: 1.5px solid var(--training); }
.legend .sw.tri { width: 0; height: 0; border: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 11px solid var(--offshore); }
.legend .sw.anchor { width: 14px; height: 14px; border: 0; color: var(--accent); }
.legend .sw.anchor svg { width: 14px; height: 14px; display: block; }
.legend .sw.dash { border-top-style: dashed; }
.legend .legend-note { display: flex; align-items: center; gap: 8px; padding: 6px 4px 2px; font-size: 13px; color: var(--ink3); border-top: 1px solid var(--line2); margin-top: 4px; }
.legend .legend-note .sw { width: 18px; border-top-color: var(--ink3); }
.legend .legend-note .sw.dash { margin-left: 8px; }
/* Panneau des trajets : cases à cocher, « × N » ou « total déclaré », « estimation », total, tout afficher / masquer */
.routes-panel { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.routes-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.routes-head .seg button { font-size: 11px; padding: 5px 8px; min-height: 30px; }
.route-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow: auto; }
.route-checks li { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 9px; padding: 4px; border-radius: 2px; }
.route-checks li.sel { background: var(--paper2); }
.route-checks input { accent-color: var(--c, var(--accent)); margin: 0; width: 16px; height: 16px; cursor: pointer; }
.route-checks .sw { width: 18px; height: 0; border-top: 3px solid var(--c, var(--accent)); display: block; cursor: pointer; }
.route-checks .sw.dash { border-top-style: dashed; }
.route-checks .sw.pts { border-top: 0; height: 6px; background: radial-gradient(circle, var(--c, var(--accent)) 2.5px, transparent 3px) 0 50% / 9px 6px repeat-x; }   /* escales seulement : des points, pas de trait */
.route-checks .rname { text-align: left; font-size: 14px; line-height: 1.3; color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 2px 0; }
.route-checks .rname:hover span { text-decoration: underline; }
.route-checks .rname small { font-family: var(--label); font-size: 11px; letter-spacing: .06em; color: var(--ink3); font-variant-numeric: tabular-nums; }
.route-checks .rname small.rot { color: var(--ink2); }
.route-checks .rname small.est { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 1px 5px; border-radius: 2px; margin-top: 2px; }
.route-checks li:has(input:not(:checked)) .rname { color: var(--ink3); }
.total { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 10px; border-top: 1px solid var(--line); padding-top: 10px; flex-wrap: wrap; }
.total b { font-family: var(--display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.total small { font-family: var(--label); font-size: 11px; color: var(--ink3); letter-spacing: .06em; }
.detail { padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.detail h3 { font-size: 25px; }
.detail p { color: var(--ink2); font-size: 15px; }
.detail-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14.5px; }
.detail-facts dt { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--ink3); padding-top: 3px; }
.detail-facts dd { margin: 0; }
.detail-facts b { font-family: var(--display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-facts i { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink3); font-size: 12px; }
.detail .note-distance { font-size: 14px; color: var(--ink3); font-style: italic; }
.detail .mention { font-family: var(--label); font-size: 12px; letter-spacing: .04em; color: var(--ink3); border-left: 2px solid var(--line); padding-left: 10px; }
.detail .ports { display: flex; flex-wrap: wrap; gap: 6px; }
.detail .ports span { font-family: var(--label); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border: 1px solid var(--line); color: var(--ink2); }
.detail .ports span i { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--ink3); }
.detail-photo { border: 1px solid var(--line); padding: 3px; background: var(--paper); }
.detail-photo img { width: 100%; height: auto; }
/* Accueil : « Plus de N milles nautiques » sous le nom, lien vers la carte (sections.js, rendreStatsHero) */
.hero-stats li.milles a { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; }
.hero-stats li.milles b small { font-family: var(--label); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); vertical-align: 7px; }
.hero-stats li.milles a:hover span { text-decoration: underline; color: var(--accent); }
@media (max-width: 960px) {
  .map-layout { grid-template-columns: 1fr; position: relative; }
  .map-stage { aspect-ratio: 4 / 3; }
  /* Boutons d'au moins 44 px sur écran tactile */
  .seg button, .routes-head .seg button { min-height: 44px; padding-inline: 12px; }
  .zoomctl button { width: 44px; height: 44px; }
  .route-checks li { min-height: 44px; }
  .route-checks input { width: 20px; height: 20px; }
  .legend button { min-height: 44px; }
  .map-note { flex-direction: column; gap: 6px; }
  /* Feuille repliable en bas de carte */
  /* Fermée : seule la barre « Trajets et distances » reste visible au bas de la carte ; ouverte : la feuille
     recouvre le bas de la carte (contenu masqué quand elle est fermée, donc hors du parcours clavier) */
  .map-side { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; max-height: 72%; background: var(--paper); border: 1px solid var(--ink); box-shadow: var(--shadow); }
  .map-side:not(.open) { box-shadow: none; }
  .map-side:not(.open) .map-side-body { display: none; }
  .sheet-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; width: 100%; font-family: var(--label); text-transform: uppercase; letter-spacing: .12em; font-size: 12.5px; font-weight: 500; color: var(--ink); flex: none; }
  .map-side.open .sheet-toggle { border-bottom: 1px solid var(--line); }
  .sheet-toggle svg { width: 18px; height: 18px; transition: transform .3s; }
  .map-side.open .sheet-toggle svg { transform: rotate(180deg); }
  .map-side-body { overflow: auto; padding: 10px; }
  .route-checks { max-height: none; }
  @media (prefers-reduced-motion: reduce) { .sheet-toggle svg { transition: none; } }
}
/* ===== CARTE : fin ===== */

/* ---------- Navires ---------- */
.vessels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.vessel { display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.vessel:hover { transform: translateY(-3px); box-shadow: var(--shadow), inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--line); }
.vessel.flash, .frise-item.flash .log-body { box-shadow: 0 0 0 4px var(--accent-soft), inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--accent); }
.vessel-plate { position: relative; margin: 6px 6px 0; background: var(--paper2); border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; overflow: hidden; }
.vessel-plate .sound { position: absolute; inset: 0; width: 100%; height: 100%; }
.vessel-plate .ship { position: absolute; left: 6%; right: 6%; top: 8%; bottom: 20%; display: grid; place-items: center; }
.vessel-plate .ship svg { width: 100%; height: 100%; display: block; }
.vessel-plate .ship .ship-fallback { width: 34%; height: auto; aspect-ratio: 1; color: var(--ink3); opacity: .55; }
.vessel-plate .photo { position: absolute; inset: 0; }
.vessel-plate .photo picture, .vessel-plate .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vessel-plate .scalebar { position: absolute; left: 10%; right: 10%; bottom: 8%; display: flex; align-items: center; gap: 8px; font-family: var(--label); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); }
.vessel-plate .scalebar::before, .vessel-plate .scalebar::after { content: ""; flex: 1; height: 1px; background: var(--ink2); }
.vessel-plate .scalebar i { width: 1px; height: 8px; background: var(--ink2); }
.vessel-plate.has-photo .scalebar { color: #F4EDDC; text-shadow: 0 0 2px rgba(0, 0, 0, .95), 0 1px 3px rgba(0, 0, 0, .8); }   /* texte clair sur photo, en clair comme en nuit (avant : var(--paper), sombre en mode nuit) */
.vessel-plate.has-photo .scalebar::before, .vessel-plate.has-photo .scalebar::after, .vessel-plate.has-photo .scalebar i { background: #F4EDDC; box-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.vessel-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.vessel-name { font-family: var(--display); font-style: italic; font-size: 30px; font-weight: 600; line-height: 1.05; }
.vessel-type { color: var(--ink2); font-size: 15px; margin-top: -2px; }
.specs { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 14.5px; }
.specs dt { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--ink3); padding-top: 3px; }
.specs dd { margin: 0; color: var(--ink); }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs button { width: 64px; height: 46px; border: 1px solid var(--line); padding: 2px; background: var(--paper); }
.thumbs picture, .thumbs img { width: 100%; height: 100%; object-fit: cover; }
/* vidéo d'un navire : vignette (affiche) avec un rond « lecture » ; lecteur dans la visionneuse (15 octobre 2026) */
.thumbs button.thumb-video { position: relative; }
.badge-lecture { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(15, 26, 42, .82); border: 2px solid #F4EDDC; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); pointer-events: none; }
.badge-lecture::after { content: ""; position: absolute; left: 8px; top: 6px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #F4EDDC; }
.vessel-body .vlinks { margin-top: auto; padding-top: 8px; }
@media (max-width: 960px) { .vessels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .vessels { grid-template-columns: 1fr; } }

/* ---------- Parcours ---------- */
.career-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; }
.career-grid > section > .label { margin-bottom: 18px; }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 84px 1fr; gap: 16px; position: relative; padding-bottom: 30px; }
.tl-item::before { content: ""; position: absolute; left: 84px; top: 10px; bottom: 0; width: 1px; background: var(--line); transform: translateX(-9px); }
.tl-item:last-child::before { display: none; }
.tl-year { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); padding-top: 0; position: relative; font-variant-numeric: tabular-nums; line-height: 1.2; }
.tl-year::after { content: ""; position: absolute; right: -4px; top: 9px; width: 11px; height: 11px; background: var(--c, var(--ink)); border: 2px solid var(--paper); border-radius: 50%; transform: translateX(50%); box-shadow: 0 0 0 1px var(--c, var(--ink)); }
.tl-body { display: flex; flex-direction: column; gap: 6px; }
.tl-period { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--ink3); }
.tl-body h3 { font-size: 26px; }
.tl-role { font-weight: 600; color: var(--ink); }
.tl-vessels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tl-vessels button { font-family: var(--display); font-style: italic; font-size: 17px; color: var(--accent); padding: 2px 9px; border: 1px solid var(--line); border-radius: 2px; }
.tl-vessels button:hover { border-color: var(--accent); }
.tl-body ul { margin: 6px 0 0; padding: 0; list-style: none; color: var(--ink2); font-size: 15.5px; display: flex; flex-direction: column; gap: 4px; }
.tl-body li { padding-left: 14px; position: relative; }
.tl-body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border: 1px solid var(--c, var(--accent)); transform: rotate(45deg); }
.training-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.training-list li { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line2); font-size: 15px; color: var(--ink2); }
.training-list li:first-child { border-top: 0; padding-top: 0; }
.training-list b { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.side-block { display: flex; flex-direction: column; gap: 24px; margin-top: 36px; }
.side-block h3 { font-size: 22px; margin-bottom: 8px; }
.side-block ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; color: var(--ink2); font-size: 15.5px; }
.side-block p { color: var(--ink2); font-size: 15.5px; }
.skills-title { margin-top: 48px; }
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; margin-top: 18px; }
.skill h3 { font-size: 22px; margin-bottom: 8px; }
.skill ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--ink2); font-size: 15.5px; }
.skill li { padding-left: 14px; position: relative; }
.skill li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border: 1px solid var(--accent); transform: rotate(45deg); }
.skill-item { display: flex; gap: 10px; align-items: flex-start; }
.skill-ico { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 2px; }
.skill-txt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.skill-txt p { font-size: 14.5px; color: var(--ink3); }
.schema { margin: 6px 0 2px; border: 1px solid var(--line); background: var(--paper2); padding: 6px; }
.schema img { width: 100%; height: auto; display: block; }
.schema-modele:empty { display: none; }   /* emplacement rempli en phase 5 par la bibliothèque de schémas */
/* Légende HTML d'un schéma de la bibliothèque (legende() d'un modèle → <figcaption>) : les phrases
   à la taille du texte du site, qui se replient et suivent le zoom du navigateur */
.schema-legende { margin: 8px 2px 2px; font-size: 14.5px; line-height: 1.45; color: var(--ink2); }
.schema .schema-legende > * + * { margin-top: 6px; }
.schema .schema-legende p { margin: 0; font-size: inherit; color: inherit; }
.schema .schema-legende ul, .schema .schema-legende ol { display: block; margin: 0; padding: 0 0 0 18px; font-size: inherit; color: inherit; }
.schema .schema-legende ul { list-style: disc; }
.schema .schema-legende ol { list-style: decimal; }
.schema .schema-legende li { padding-left: 0; margin: 3px 0 0; }
.schema .schema-legende li::before { content: none; }
.schema .schema-legende li.schema-avec-icone { list-style: none; display: flex; gap: 8px; align-items: flex-start; margin-left: -18px; }
.schema-icone { flex: none; width: 30px; height: 20px; margin-top: 1px; }
.schema-icone svg { display: block; width: 100%; height: 100%; }
.schema .schema-legende b { color: var(--ink); font-weight: 600; }
.schema .schema-legende .schema-note { font-style: italic; font-size: 13.5px; }
.schema .schema-legende .schema-alerte { border-left: 3px solid var(--warn); background: var(--warn-soft); color: var(--ink); padding: 4px 8px 4px 10px; }
.schema-tableau { border-collapse: collapse; font-size: 14px; }
.schema-tableau caption { text-align: left; font-weight: 600; color: var(--ink); padding-bottom: 2px; }
.schema-tableau th, .schema-tableau td { border-bottom: 1px solid var(--line); padding: 2px 14px 2px 0; text-align: left; font-variant-numeric: tabular-nums; }
.schema-tableau thead th { color: var(--ink); font-weight: 600; }
/* Sur téléphone, le schéma prend toute la largeur de la compétence (sous le losange et l'icône) :
   le SVG mesure l'écran − 54 px (306 px sur un écran de 360) au lieu de − 98 px (262 px).
   Valeurs liées à .skill li (retrait de 14 px), .skill-ico (20 px) et .skill-item (écart de 10 px). */
@media (max-width: 860px) {
  .skill-txt > .schema { margin-left: -14px; }
  .skill-ico + .skill-txt > .schema { margin-left: -44px; }
}
.skill.compact { grid-column: 1 / -1; border-top: 1px solid var(--line2); padding-top: 14px; }
.skill.compact h3 { font-size: 17px; color: var(--ink2); }
.skill.compact ul { flex-direction: row; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; }
@media (max-width: 860px) { .career-grid { grid-template-columns: 1fr; gap: 36px; } .tl-item { grid-template-columns: 64px 1fr; } .tl-item::before { left: 64px; } .skills { grid-template-columns: 1fr; } }

/* ---------- Titres ---------- */
.titles-group { margin-bottom: 34px; }
.titles-group .label { margin-bottom: 10px; }
.tbl-wrap { overflow-x: auto; }
table.titles { width: 100%; border-collapse: collapse; font-size: 15px; table-layout: fixed; }
table.titles th:nth-child(2) { width: 150px; } table.titles th:nth-child(3) { width: 250px; }
table.titles th { text-align: left; font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 500; color: var(--ink3); padding: 8px 10px; border-bottom: 1px solid var(--ink); }
table.titles td { padding: 10px; border-bottom: 1px solid var(--line2); vertical-align: top; }
table.titles td:nth-child(2) { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink2); }
table.titles td:last-child { white-space: nowrap; }
@media (max-width: 600px) { table.titles { table-layout: auto; } table.titles th:nth-child(2), table.titles th:nth-child(3) { width: auto; } table.titles td:last-child { white-space: normal; } }

/* ---------- Galerie ---------- */
.gallery { columns: 3; column-gap: 20px; }
.gallery figure { break-inside: avoid; margin: 0 0 20px; }
.gallery button { display: block; width: 100%; padding: 6px; background: var(--paper); border: 1px solid var(--ink); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--line); text-align: left; transition: transform .2s, box-shadow .2s; }
.gallery button:hover { transform: translateY(-3px); box-shadow: var(--shadow), inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--line); }
.gallery img { width: 100%; height: auto; display: block; }
.gallery .video-only { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.gallery .video-only svg { width: 40px; height: 40px; color: var(--ink3); }
.gallery figcaption { font-size: 14px; color: var(--ink2); margin-top: 8px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 560px) { .gallery { columns: 1; } }

/* ---------- Journal de bord (frise verticale) ---------- */
.frise { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; position: relative; }
.frise::before { content: ""; position: absolute; left: 47px; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.frise-item { display: grid; grid-template-columns: 96px 1fr; gap: 18px; position: relative; align-items: start; }
.log-date { position: relative; z-index: 1; font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--accent); background: var(--paper); border: 2px solid var(--accent); padding: 8px 6px; text-align: center; align-self: start; transform: rotate(-4deg); line-height: 1.25; }
.log-date b { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none; }
.log-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 22px 22px 22px; background: repeating-linear-gradient(180deg, transparent 0 27px, var(--line2) 27px 28px), var(--paper); background-position: 0 6px; }
.log-body h3 { font-size: 25px; }
.log-body p { color: var(--ink2); font-size: 15.5px; }
.log-body .meteo { display: flex; gap: 8px; align-items: center; font-family: var(--label); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.log-body .meteo svg { width: 16px; height: 16px; color: var(--accent2); flex: none; }
.log-body blockquote { margin: 4px 0 0; font-family: var(--display); font-style: italic; font-size: 21px; line-height: 1.3; border-left: 2px solid var(--accent); padding-left: 12px; }
.log-medias { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 6px; }
.log-medias button { border: 1px solid var(--line); padding: 3px; background: var(--paper); }
.log-medias img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
@media (max-width: 480px) { .frise::before { display: none; } .frise-item { grid-template-columns: 1fr; } .log-date { justify-self: start; } }

/* ---------- Références (fil de cartes) ---------- */
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.ref { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 12px; }
.ref-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.avatar { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; overflow: hidden; background: var(--paper2); font-family: var(--display); font-weight: 700; font-size: 16px; flex: none; }
.avatar picture, .avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.who b { font-size: 16px; }
.who span { font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; color: var(--ink3); }
.chip.src { margin-left: auto; }
.stars { display: flex; gap: 2px; }
.stars svg { width: 16px; height: 16px; color: var(--line); }
.stars svg.on { color: var(--warn); }
.ref-text { font-size: 16px; line-height: 1.5; color: var(--ink); }
.ref-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--label); font-size: 12px; color: var(--ink3); letter-spacing: .06em; border-top: 1px solid var(--line2); padding-top: 10px; margin-top: auto; }
.refs-empty { padding: 34px 28px; display: flex; align-items: center; gap: 22px; }
.refs-empty svg { width: 42px; height: 42px; color: var(--accent); flex: none; }
.refs-empty p { font-family: var(--display); font-size: 25px; font-style: italic; line-height: 1.3; }
@media (max-width: 860px) { .refs { grid-template-columns: 1fr; } }

/* ---------- Soutien ---------- */
.pay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.pay-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pay-card h3 { font-size: 26px; }
.pay-card p { color: var(--ink2); font-size: 15px; }
.pay-card .qr-mini { width: 132px; height: 132px; background: #fff; padding: 6px; border: 1px solid var(--line); }
.pay-card .qr-mini img, .pay-card .qr-mini canvas { width: 118px; height: 118px; display: block; }
@media (max-width: 900px) { .pay { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pay { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: start; }
.contact-body { display: flex; flex-direction: column; gap: 18px; }
.contact-form { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.contact-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.contact-form fieldset:disabled { opacity: .55; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--label); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: var(--ink2); }
.field input, .field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px; width: 100%; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 14.5px; color: var(--ink2); min-height: 1.3em; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--warn); }
.contact-links { margin-top: 4px; gap: 12px 22px; }
.contact-side { display: flex; flex-direction: column; gap: 18px; }
.qr-card { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 18px; }
.qr-box { width: 172px; height: 172px; background: #fff; padding: 8px; display: grid; place-items: center; flex: none; }
.qr-box img, .qr-box canvas { width: 156px; height: 156px; display: block; }
.qr-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.qr-text p { color: var(--ink2); font-size: 14.5px; }
.qr-url { font-family: var(--label); font-size: 13px; letter-spacing: .02em; color: var(--ink); word-break: break-all; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Pied de page ---------- */
.foot { border-top: 1px solid var(--ink); padding-block: 22px 36px; color: var(--ink3); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 3px; background: repeating-linear-gradient(90deg, var(--ink) 0 14px, transparent 14px 28px); }
.foot b { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 18px; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Réglages, partage, visionneuse, pages légales ---------- */
.popover { position: fixed; z-index: 40; right: max(12px, calc((100vw - 1180px) / 2 + 20px)); top: calc(env(safe-area-inset-top, 0px) + 70px); width: min(300px, calc(100vw - 24px)); background: var(--paper); border: 1px solid var(--ink); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.popover fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.popover legend { padding: 0; margin-bottom: 8px; }
.popover label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 2px; cursor: pointer; font-size: 15px; }
.popover label:hover { background: var(--paper2); }
.popover input { accent-color: var(--accent); margin: 0; }
.popover .close-row { display: flex; justify-content: flex-end; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(8, 14, 24, .72); display: grid; place-items: center; padding: 20px; }
.modal { background: var(--paper); border: 1px solid var(--ink); box-shadow: var(--shadow); padding: 24px; width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.modal h3 { font-size: 26px; }
.modal p { color: var(--ink2); font-size: 14.5px; }
.modal .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lightbox { background: transparent; border: 0; box-shadow: none; width: min(1100px, 100%); max-height: 100%; gap: 12px; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; margin: auto; border: 6px solid var(--paper); box-shadow: var(--shadow); }
.lightbox video { display: block; max-width: 100%; max-height: calc(100vh - 180px); width: auto; height: auto; margin: auto; border: 6px solid var(--paper); box-shadow: var(--shadow); background: #000; }
.lightbox figcaption { color: #EFE8D8; font-family: var(--display); font-size: 22px; font-style: italic; }
.lightbox .row button { color: #EFE8D8; border-color: #EFE8D8; }
.lightbox .row button:hover { background: #EFE8D8; color: #0F1A2A; }
.modal.legal { width: min(860px, 100%); max-height: calc(100vh - 40px); text-align: left; align-items: stretch; overflow: hidden; padding: 0; gap: 0; }
.legal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.legal-head h2 { font-size: 30px; }
.legal-body { overflow: auto; padding: 20px 24px 28px; font-size: 15.5px; line-height: 1.55; }
.legal-body h3 { font-size: 24px; margin: 22px 0 8px; }
.legal-body h4 { font-size: 18px; margin: 16px 0 6px; font-family: var(--display); }
.legal-body p { margin: 0 0 10px; color: var(--ink); }
.legal-body ul, .legal-body ol { margin: 0 0 10px; padding-left: 22px; }
.legal-body li { margin-bottom: 4px; }
.legal-body blockquote { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--warn); background: var(--warn-soft); color: var(--ink); }
.legal-body code { font-family: var(--label); font-size: .92em; background: var(--paper2); padding: 1px 5px; border-radius: 2px; }
.legal-body table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 12px; }
.legal-body th, .legal-body td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.legal-body th { font-family: var(--label); text-transform: uppercase; font-size: 11.5px; letter-spacing: .08em; color: var(--ink3); border-bottom: 1px solid var(--ink); }
.legal-body a { color: var(--accent); }
.legal-body .legal-brouillon { margin: 0 0 16px; padding: 8px 12px; border: 1px dashed var(--warn); background: var(--warn-soft); color: var(--ink); font-size: 14px; }
.legal-body .legal-brouillon strong { color: var(--warn); font-family: var(--label); text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; margin-right: 6px; }
@media (max-width: 600px) {   /* tableaux des pages légales : une carte par ligne, chaque case précédée du titre de sa colonne */
  .legal-body .tbl-wrap { overflow: visible; }
  .legal-body table, .legal-body tbody, .legal-body tr, .legal-body td { display: block; width: 100%; }
  .legal-body thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .legal-body tr { border: 1px solid var(--line2); border-left: 3px solid var(--accent); padding: 6px 10px; margin-bottom: 12px; background: var(--paper); }
  .legal-body td { border-bottom: 0; padding: 4px 0; }
  .legal-body td[data-label]::before { content: attr(data-label); display: block; font-family: var(--label); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; color: var(--ink3); }
}
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 14px; font-family: var(--label); letter-spacing: .08em; text-transform: uppercase; font-size: 12px; z-index: 60; max-width: calc(100vw - 32px); word-break: break-all; }
@media (prefers-reduced-motion: reduce) { .btn, .vessel, .strength, .pilier, .gallery button { transition: none; } }

/* Prochaines étapes (sous les titres) */
.next-steps { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; gap: 8px; }
.next-steps li { counter-increment: etape; position: relative; padding: 10px 12px 10px 46px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--ink2); font-size: 15px; line-height: 1.45; }
.next-steps li::before { content: counter(etape); position: absolute; left: 12px; top: 9px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--ink3); font-family: var(--label); font-size: 12px; line-height: 20px; text-align: center; color: var(--ink2); }
