/* Abaque — système visuel du portfolio */
@font-face{font-family:"Archivo";font-style:normal;font-weight:100 900;font-stretch:62% 125%;font-display:swap;
  src:url("../fonts/archivo-normal-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Archivo";font-style:normal;font-weight:100 900;font-stretch:62% 125%;font-display:swap;
  src:url("../fonts/archivo-normal-latin-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+A720-A7FF}
@font-face{font-family:"Archivo";font-style:italic;font-weight:100 900;font-stretch:62% 125%;font-display:swap;
  src:url("../fonts/archivo-italic-latin.woff2") format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2212}

:root{
  --paper:#eef2ee;
  --paper-deep:#e3eae4;
  --grid-fine:rgba(47,111,94,.11);
  --grid-major:rgba(47,111,94,.24);
  --green:#2f6f5e;
  --ink:#14211d;
  --ink-soft:#3b4a45;
  --cobalt:#1f4fb4;
  --cobalt-deep:#163a86;
  --ochre:#a3550b;
  --line:1.5px;
  --gutter:clamp(16px,4vw,56px);
  --step:8px;
  --f-body:"Archivo",system-ui,sans-serif;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
body{
  margin:0;background-color:var(--paper);color:var(--ink);
  font-family:var(--f-body);font-size:1.0625rem;line-height:1.55;font-stretch:100%;
  background-image:
    linear-gradient(var(--grid-major) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid-major) 1px,transparent 1px),
    linear-gradient(var(--grid-fine) 1px,transparent 1px),
    linear-gradient(90deg,var(--grid-fine) 1px,transparent 1px);
  background-size:40px 40px,40px 40px,8px 8px,8px 8px;
  background-position:-1px -1px;
  font-variant-numeric:tabular-nums lining-nums;
}
::selection{background:var(--cobalt);color:#fff}
a{color:inherit;text-decoration-thickness:1.5px;text-underline-offset:.22em}
a:hover{color:var(--cobalt)}
:focus-visible{outline:2.5px solid var(--cobalt);outline-offset:3px}
html{scrollbar-color:var(--green) var(--paper-deep)}
img{max-width:100%;display:block}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Cartouche (en-tête façon plan) */
.cartouche{
  display:grid;grid-template-columns:1fr auto auto auto auto;
  border-bottom:var(--line) solid var(--ink);background:var(--paper);
  font-size:.8125rem;letter-spacing:.07em;text-transform:uppercase;font-stretch:75%;font-weight:550;
}
.cartouche .cv{color:var(--cobalt);font-weight:700}
.cartouche > *{padding:14px var(--gutter);border-left:var(--line) solid var(--ink);display:flex;align-items:center;gap:.6em}
.cartouche > :first-child{border-left:0;font-weight:700}
.cartouche .sheet{color:var(--green)}
.cartouche a{text-decoration:none}
.cartouche a:hover{text-decoration:underline}
.cartouche .mail{text-transform:none;letter-spacing:.02em;font-stretch:85%;font-weight:650;color:var(--cobalt)}
@media (max-width:960px){
  .cartouche{grid-template-columns:1fr auto auto auto}
  .cartouche .sheet{display:none}
  .cartouche > :first-child{display:block}
  .cartouche .sep{display:none}
  .cartouche .role{display:block}
}
@media (max-width:760px){
  .cartouche{grid-template-columns:1fr auto auto}
  .cartouche a[href^="tel"]{display:none}
}

/* Planche d'accueil */
.planche{
  display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);
  min-height:min(calc(100svh - 50px), 960px);
  border-bottom:var(--line) solid var(--ink);
}
.identite{
  display:flex;flex-direction:column;gap:clamp(20px,3vh,32px);
  padding:clamp(40px,7vh,72px) var(--gutter) var(--gutter);
  border-right:var(--line) solid var(--ink);
}
.identite h1{
  margin:0;font-size:clamp(3.25rem,6.2vw,5.75rem);line-height:.92;font-weight:820;font-stretch:118%;letter-spacing:-.025em;
}
.identite .titre{margin:0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;max-width:34ch;color:var(--ink-soft)}
.identite .titre strong{color:var(--ink);font-weight:650}
.devise{margin:0;font-size:clamp(1.375rem,2.1vw,1.875rem);line-height:1.3;font-style:italic;font-weight:500;max-width:22ch}
.devise::after{content:"";display:block;width:4.5em;height:3px;background:var(--cobalt);margin-top:.55em}

.portes{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:auto}
.porte{
  display:flex;flex-direction:column;gap:6px;padding:18px 18px 20px;text-decoration:none;
  background:var(--paper);border:var(--line) solid var(--ink);border-top-width:8px;
  transition:transform .35s cubic-bezier(.16,1,.3,1),background-color .2s;
}
.porte--naval{border-top-color:var(--cobalt)}
.porte--energie{border-top-color:var(--ochre)}
.porte b{font-size:clamp(1.125rem,1.45vw,1.375rem);font-stretch:100%;font-weight:750;line-height:1.3;display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.porte span{font-size:.9375rem;color:var(--ink-soft);line-height:1.4}
.porte svg{flex:none;width:22px;height:22px;transition:transform .35s cubic-bezier(.16,1,.3,1)}
.porte:hover{transform:translateY(-3px);background:#fff;color:var(--ink)}
.porte:hover svg{transform:translateX(4px)}
.porte--naval:hover b{color:var(--cobalt)}
.porte--energie:hover b{color:var(--ochre)}

/* Abaque */
.abaque{display:flex;flex-direction:column;padding:clamp(24px,4vh,40px) var(--gutter) var(--gutter);min-width:0}
.abaque-tete{display:flex;justify-content:space-between;align-items:baseline;gap:16px;flex-wrap:wrap}
.abaque-tete h2{margin:0;font-size:1rem;font-weight:700;font-stretch:112%;letter-spacing:.04em;text-transform:uppercase}
.abaque-tete p{margin:0;font-size:.875rem;color:var(--ink-soft)}
.nomogramme{flex:1;min-height:340px;width:100%;margin-top:8px}
.nomogramme .axe{stroke:var(--ink);stroke-width:1.5}
.nomogramme .graduation{stroke:var(--ink);stroke-width:1.2}
.nomogramme .graduation--mineure{stroke-width:.8}
.nomogramme .cote{font-family:var(--f-body);font-size:13px;font-stretch:75%;font-weight:520;letter-spacing:.03em;fill:var(--ink);paint-order:stroke;stroke:var(--paper);stroke-width:5px;stroke-linejoin:round}
.nomogramme #echelles{isolation:isolate}
.nomogramme .titre-echelle{font-family:var(--f-body);font-size:14px;font-weight:650;font-stretch:75%;letter-spacing:.09em;fill:var(--ink);text-transform:uppercase}
.nomogramme .sous-titre{font-family:var(--f-body);font-size:13px;font-stretch:75%;letter-spacing:.04em;fill:var(--green)}
.nomogramme .reglette{stroke:var(--cobalt);stroke-width:3.5;stroke-linecap:round}
.nomogramme .point{fill:var(--cobalt)}
.nomogramme .point-ecart{fill:var(--paper);stroke:var(--cobalt);stroke-width:3}
.nomogramme .valeur-ecart{font-family:var(--f-body);font-size:52px;font-weight:820;font-stretch:112%;fill:var(--cobalt)}

.nomogramme--etroit .cote{font-size:15px}
.nomogramme--etroit .titre-echelle{font-size:14px}
.nomogramme--etroit .sous-titre{font-size:14px}
.nomogramme--etroit .valeur-ecart{font-size:44px}
.lecture{display:flex;flex-direction:column;gap:14px;border-top:var(--line) solid var(--ink);padding-top:16px}
.lecture p{margin:0;max-width:62ch;font-size:1rem}
.lecture .source{font-size:.875rem;color:var(--ink-soft);margin-top:4px}
.cas{display:flex;align-self:flex-start;border:var(--line) solid var(--ink)}
.cas button{
  font:inherit;font-size:.875rem;font-weight:650;font-stretch:108%;letter-spacing:.02em;
  padding:10px 14px;border:0;border-left:var(--line) solid var(--ink);background:var(--paper);color:var(--ink);cursor:pointer;
}
.cas button:first-child{border-left:0}
.cas button:hover{background:#fff}
.cas button em{font-style:normal;font-weight:800;margin-left:.3em}
.cas button[aria-pressed="true"]{background:var(--cobalt);color:#fff}
.lectures{display:none;margin:0;font-size:.9375rem;line-height:1.5;color:var(--ink-soft)}
.lectures a{color:var(--cobalt);font-weight:650;white-space:nowrap}

/* Méthode (sous la planche) */
.methode{padding:clamp(56px,9vh,96px) var(--gutter);display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:var(--gutter)}
.methode h2{margin:0;font-size:clamp(1.75rem,3vw,2.5rem);line-height:1.05;font-weight:800;font-stretch:115%;letter-spacing:-.015em;max-width:14ch}
.preuves{list-style:none;margin:0;padding:0;border-top:var(--line) solid var(--ink)}
.preuves li{display:grid;grid-template-columns:9.5rem minmax(0,1fr);gap:24px;padding:18px 0;border-bottom:1px solid var(--grid-major)}
.preuves .val{font-size:1.75rem;font-weight:800;font-stretch:110%;line-height:1;color:var(--cobalt)}
.preuves .val small{font-size:.9375rem;font-weight:500;font-stretch:100%;letter-spacing:0;color:var(--ink-soft);line-height:1.4}
.preuves .val small::before{content:" · "}
@media (min-width:561px){.preuves .val small{display:block;margin-top:6px}.preuves .val small::before{content:none}}
.preuves .val--energie{color:var(--ochre)}
.preuves b{display:block;font-weight:700}
.preuves span{color:var(--ink-soft);font-size:.9375rem}

/* Pied de planche */
.pied{display:grid;grid-template-columns:1fr auto auto;border-top:var(--line) solid var(--ink);font-size:.875rem}
.pied > *{padding:18px var(--gutter);margin:0}
.pied > :nth-child(n+2){border-left:var(--line) solid var(--ink)}
.pied > :last-child{color:var(--green)}
.pied-cv a{color:var(--cobalt);font-weight:650}

@media (max-width:960px){
  .planche{grid-template-columns:1fr;min-height:0}
  .identite{border-right:0;border-bottom:var(--line) solid var(--ink);gap:18px;padding-top:32px;padding-bottom:40px}
  .lectures{display:block}
  .portes{margin-top:8px}
  .nomogramme{min-height:360px}
  .methode{grid-template-columns:1fr}
}
@media (max-width:560px){
  .cartouche{grid-template-columns:1fr auto}
  .cartouche .sheet,.cartouche .cv,.cartouche a[href^="tel"]{display:none}
  .cartouche .sep{display:none}
  .cartouche .role{display:block}
  .cartouche > :first-child{display:block}
  .identite h1{font-size:3rem}
  .devise{font-size:1.25rem}
  .devise::after{margin-top:.4em}
  .portes{grid-template-columns:1fr}
  .lecture{grid-template-columns:1fr}
  .cas{width:100%}
  .cas{flex-direction:column}
  .cas button{text-align:left;border-left:0;border-top:var(--line) solid var(--ink);padding:10px 12px}
  .cas button:first-child{border-top:0}
  .preuves li{grid-template-columns:1fr;gap:6px}
  .preuves .val{font-size:1.375rem}
  .pied{grid-template-columns:1fr}
  .pied > :nth-child(n+2){border-left:0;border-top:1px solid var(--grid-major)}
}

@media print{
  body{background:#fff}
  .cas{display:none}
  .porte{break-inside:avoid}
}

@media (prefers-reduced-motion:reduce){
  .porte,.porte svg{transition:none}
  .porte:hover{transform:none}
  .porte:hover svg{transform:none}
}

a[href^="tel"]{white-space:nowrap}

/* ===== Pages variantes (naval, énergie) ===== */

.ouverture{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);border-bottom:var(--line) solid var(--ink)}
.ouverture-texte{display:flex;flex-direction:column;gap:20px;padding:clamp(40px,6vh,64px) var(--gutter) var(--gutter);border-right:var(--line) solid var(--ink)}
.ouverture h1{margin:0;font-size:clamp(2rem,3.5vw,3.25rem);line-height:1.04;font-weight:820;font-stretch:112%;letter-spacing:-.02em;max-width:22ch;text-wrap:balance}
.variante--naval .ouverture h1{border-bottom:6px solid var(--cobalt);padding-bottom:.25em}
.variante--energie .ouverture h1{border-bottom:6px solid var(--ochre);padding-bottom:.25em}
.accroche{margin:0;font-size:clamp(1.0625rem,1.35vw,1.25rem);line-height:1.5;max-width:58ch}
.dispo-ligne{margin:0;font-weight:650;color:var(--ink)}
.actions{display:flex;flex-wrap:wrap;gap:12px;margin:0}
.bouton{display:inline-flex;align-items:center;min-height:44px;padding:10px 18px;border:var(--line) solid var(--ink);background:var(--paper);font-weight:650;text-decoration:none;transition:background-color .2s}
.bouton:hover{background:#fff;color:var(--ink)}
.bouton--plein{background:var(--cobalt);border-color:var(--cobalt);color:#fff}
.bouton--plein:hover{background:var(--cobalt-deep);color:#fff}

.case-droite{display:flex;flex-direction:column;gap:28px;padding:clamp(32px,5vh,56px) var(--gutter)}
.cotes{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.abaque--case{padding:0}
.abaque--case .nomogramme{flex:none;min-height:0;height:480px}
.abaque--case .lecture{border-top:var(--line) solid var(--ink);padding-top:12px}
.abaque--case .lecture p{font-size:.9375rem}
.cotes strong{font-weight:700}
.autre{margin:28px 0 0;max-width:360px}
.autre .porte{width:100%}
/* La règle des deux familles : une page naval ne prend pas d'ocre */
.variante--naval .etude--energie{--fam:var(--cobalt)}
.variante--naval .val--energie{color:var(--cobalt)}
.cotes li{display:grid;grid-template-columns:9rem minmax(0,1fr);gap:20px;padding:18px 0;border-bottom:1px solid var(--grid-major)}
.cotes li:first-child{border-top:var(--line) solid var(--ink)}
.ouverture-texte .cotes{margin-top:12px}
.cotes .val,.etude-cote .val{font-size:1.875rem;font-weight:800;font-stretch:110%;line-height:1;color:var(--cobalt)}
.variante--energie .cotes .val{color:var(--ochre)}
.cotes .val small,.etude-cote .val small{display:block;margin-top:6px;font-size:.9375rem;font-weight:500;font-stretch:100%;color:var(--ink-soft);line-height:1.35}
.etude-cote .val--energie{color:var(--ochre)}

.etudes,.competences,.formation,.terrain,.appel{padding:clamp(48px,8vh,88px) var(--gutter);border-bottom:var(--line) solid var(--ink)}
.etudes > h2,.competences h2,.formation h2,.terrain h2,.appel h2{margin:0 0 28px;font-size:clamp(1.75rem,3vw,2.5rem);line-height:1.05;font-weight:800;font-stretch:115%;letter-spacing:-.015em}
.etude{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:var(--gutter);padding:32px 0;border-top:var(--line) solid var(--ink)}
.etude-cote{display:flex;flex-direction:column;gap:14px}
.etude-ref{font-size:.75rem;font-stretch:75%;font-weight:550;letter-spacing:.08em;text-transform:uppercase;color:var(--green)}
.etude--naval{--fam:var(--cobalt)}
.etude--energie{--fam:var(--ochre)}
.etude-cote::before{content:"";display:block;width:3rem;height:6px;background:var(--fam)}
.etude-corps{max-width:72ch}
.etude-corps h3{margin:0 0 6px;font-size:clamp(1.25rem,1.8vw,1.625rem);line-height:1.2;font-weight:750;font-stretch:105%}
.etude-cadre{margin:0 0 14px;font-size:.9375rem;color:var(--ink-soft)}
.etude-corps > p{margin:0 0 14px}
.etapes{margin:0 0 16px;padding:0;list-style:none}
.etapes li{position:relative;padding:6px 0 6px 22px;border-top:1px solid var(--grid-major)}
.etapes li::before{content:"";position:absolute;left:0;top:1.05em;width:12px;height:1.5px;background:var(--fam)}
.etude-resultat{font-weight:600}
.etude-outils{font-size:.875rem;color:var(--ink-soft)}
.etude-figure{margin:20px 0 0;border:var(--line) solid var(--ink);background:#fff}
.etude-figure img{width:100%;height:auto;max-height:420px;object-fit:cover}
.etude-figure .rang{display:flex}
.etude-figure .vue + .vue{border-left:var(--line) solid var(--ink)}
.etude-figure .rang + .rang{border-top:var(--line) solid var(--ink)}
.etude-figure .vue{flex:var(--r) 1 0;min-width:0;background:#fff;display:flex;flex-direction:column}
.etude-figure .vue img{max-height:none;object-fit:initial}
.vue-note{display:block;margin-top:auto;padding:6px 12px;border-top:1px solid var(--grid-major);font-size:.8125rem;font-stretch:88%;font-weight:600;line-height:1.35}
.schema{display:block;width:100%;height:auto;padding:8px 12px 0}
.schema .corps{fill:none;stroke:var(--ink);stroke-width:1.5}
.schema .plaque{stroke:var(--ink);stroke-width:4}
.schema .tubes line{stroke:var(--cobalt);stroke-width:1;opacity:.55}
.schema .eau{fill:none;stroke:var(--cobalt);stroke-width:1.5}
.schema .eau-fleche{fill:none;stroke:var(--cobalt);stroke-width:2.5}
.schema .huile{fill:none;stroke:var(--ink-soft);stroke-width:1.5}
.schema .huile-fleche{fill:none;stroke:var(--ink-soft);stroke-width:2;stroke-dasharray:none}
.schema-txt{font-size:15px;font-weight:650;font-stretch:88%;fill:var(--ink)}
.schema .repere{fill:#fff;stroke:var(--ink);stroke-width:1.5}
.schema .repere-trait{stroke:var(--ink);stroke-width:1}
.schema .repere-num{font-size:15px;font-weight:750;text-anchor:middle;fill:var(--ink)}
.pdc{list-style:none;margin:0;padding:6px 12px 12px;border-top:1px solid var(--grid-major)}
.pdc li{display:grid;grid-template-columns:1.75rem minmax(0,1fr) auto;column-gap:10px;align-items:baseline;padding:6px 0 0;font-size:.875rem;line-height:1.35}
.pdc b{font-weight:750}
.pdc-val{font-weight:650;white-space:nowrap}
.pdc i{grid-column:2 / -1;display:block;height:6px;margin-top:4px;background:linear-gradient(90deg,var(--cobalt) var(--p),var(--paper-deep) var(--p))}
.etude-figure figcaption{padding:8px 12px;border-top:var(--line) solid var(--ink);font-size:.8125rem;font-stretch:88%;color:var(--ink-soft)}

.terrain{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,9fr);gap:var(--gutter)}
.terrain h2{margin:0}
.terrain div{max-width:72ch}
.terrain p{margin:0 0 12px}

.competences table{width:100%;border-collapse:collapse;border-top:var(--line) solid var(--ink)}
.competences th,.competences td{text-align:left;vertical-align:top;padding:14px 0;border-bottom:1px solid var(--grid-major)}
.competences th{width:30%;padding-right:24px;font-weight:700}
.competences td{color:var(--ink-soft)}
.formation-liste{list-style:none;margin:0;padding:0;border-top:var(--line) solid var(--ink)}
.formation-liste li{padding:12px 0;border-bottom:1px solid var(--grid-major)}

.appel{text-align:left}
.appel h2{max-width:24ch}

@media (max-width:960px){
  /* Sur écran étroit, les trois preuves remontent juste sous le titre */
  .ouverture{display:flex;flex-direction:column;gap:18px;padding:28px var(--gutter) 36px}
  .ouverture-texte{display:contents}
  .ouverture h1{order:2}
  .case-droite{display:contents}
  .cotes{order:3;padding:0}
  .abaque--case{order:7;margin-top:12px;border-top:var(--line) solid var(--ink);padding-top:20px}
  .accroche{order:4}
  .dispo-ligne{order:5}
  .ouverture .actions{order:6}
  .cotes li{grid-template-columns:6.5rem minmax(0,1fr);gap:12px;padding:10px 0;font-size:.9375rem;line-height:1.4}
  .cotes .val{font-size:1.375rem}
  .cotes .val small{font-size:.8125rem;margin-top:3px}
  .etude,.terrain{grid-template-columns:1fr;gap:16px}
  .etude-cote{flex-direction:row;align-items:flex-end;justify-content:space-between;flex-wrap:wrap}
  .etude-cote::before{flex-basis:100%}
}
@media (max-width:560px){
  .ouverture h1{font-size:1.875rem}
  .competences th,.competences td{display:block;width:auto;padding:4px 0}
  .competences th{padding-top:14px;border-bottom:0}
  .bouton{flex:1 1 auto;justify-content:center}
  .etude-figure .rang{flex-direction:column}
  .etude-figure .vue{flex:none}
  .etude-figure .vue + .vue{border-left:0;border-top:var(--line) solid var(--ink)}
  .pdc li{grid-template-columns:1.25rem minmax(0,1fr)}
  .pdc-val{grid-column:2}
  .schema-txt{font-size:21px}
}
