/* Layout: a recruiter's control sheet. Shipping-label hero, KPI tiles,
   a Gantt of parallel flows, a comic strip, then contact. */
:root {
  --ground: #E9EDF2;      /* cool steel paper */
  --panel: #FFFFFF;
  --ink: #12203B;         /* navy, same as the blazer */
  --ink-2: #4B5872;
  --line: #C5CDD8;
  --signal: #C2652A;      /* muted copper accent, used sparingly */
  --signal-text: #9A4A1A;
  --deep: #1C2A45;        /* softened navy for the comic band */
  --band-soft: #DCE3EC;   /* pale steel for the contact band */
  --on-signal: #FFFFFF;
  --flow-edu: #12203B;
  --flow-work: #C2652A;
  --flow-asso: #13806A;
  --chip-bg: #DDE3EB;

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --f-comic: "Patrick Hand", "Comic Sans MS", "Chalkboard SE", cursive;

  --r: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0C1424; --panel: #142038; --ink: #E7ECF4; --ink-2: #9DA9BF; --line: #2A3858;
    --signal: #E08A55; --signal-text: #F0A577; --on-signal: #1A0E05; --deep: #101B30; --band-soft: #16223B;
    --flow-edu: #8FA8D6; --flow-work: #E08A55; --flow-asso: #3FC4A2; --chip-bg: #1E2B48;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0C1424; --panel: #142038; --ink: #E7ECF4; --ink-2: #9DA9BF; --line: #2A3858;
  --signal: #E08A55; --signal-text: #F0A577; --on-signal: #1A0E05; --deep: #101B30; --band-soft: #16223B;
  --flow-edu: #8FA8D6; --flow-work: #E08A55; --flow-asso: #3FC4A2; --chip-bg: #1E2B48;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.05; margin: 0; text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--f-mono); }
.small { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; border-radius: 3px; }

.wrap {
  max-width: 72rem; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Top bar ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--panel); }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 1.5rem; min-height: 3.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 600; }
.brand-code {
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .1em;
  background: var(--ink); color: var(--panel); padding: .2rem .45rem; border-radius: 3px;
}
.nav { display: flex; gap: 1.25rem; margin-left: auto; font-size: .9rem; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button {
  font: 500 .78rem var(--f-mono); letter-spacing: .06em; padding: .3rem .7rem;
  border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--panel); }

/* ---------- Hero: shipping label ---------- */
.hero { padding-block: 3rem 2rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem; align-items: stretch; }
.label {
  background: var(--panel); border: 2px solid var(--ink); border-radius: var(--r);
  padding: 1.5rem 1.75rem 1.25rem; display: flex; flex-direction: column; gap: 1.1rem;
  position: relative; min-width: 0;
}
.label-head {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--ink-2); border-bottom: 2px dashed var(--line); padding-bottom: .9rem;
}
.status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--flow-asso); font-family: var(--f-body); }
.status i { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); }
.label h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; font-stretch: 72%;
  text-transform: uppercase; letter-spacing: -.01em; line-height: .92;
}
.label-title { font-size: 1.02rem; color: var(--ink-2); font-weight: 500; }
.label-rows { margin: 0; display: grid; gap: 0; border: 1px solid var(--line); border-radius: 4px; }
.label-rows div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: .55rem .8rem; }
.label-rows div + div { border-top: 1px solid var(--line); }
.label-rows dt { font: 500 .72rem/1.9 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.label-rows dd { margin: 0; font-weight: 600; }
.pitch { max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem;
  border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink);
  font: 600 .95rem var(--f-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-main { background: var(--signal); border-color: var(--signal); color: var(--on-signal); }
.btn-small { padding: .4rem .85rem; font-size: .82rem; }
.barcode {
  height: 2.4rem; margin-top: auto;
  background: repeating-linear-gradient(90deg,
    var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px,
    var(--ink) 8px 11px, transparent 11px 12px, var(--ink) 12px 13px, transparent 13px 17px);
  opacity: .85;
}

.portrait { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; border: 2px solid var(--ink); background: #DCDFE3; min-height: 20rem; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.stamp {
  position: absolute; right: 1rem; bottom: 1.25rem; transform: rotate(-9deg);
  border: 3px solid #C8102E; color: #C8102E; background: rgba(255,255,255,.78);
  font: 600 .78rem/1.2 var(--f-mono); letter-spacing: .1em; text-align: center;
  padding: .45rem .7rem; border-radius: 6px;
}
.stamp b { font-size: 1.15rem; letter-spacing: .04em; }

/* ---------- Sections ---------- */
.band { padding-block: 3rem; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; font-stretch: 80%; text-transform: uppercase; }
.sec-head p { color: var(--ink-2); }
.sub { font-size: 1.35rem; font-weight: 700; font-stretch: 85%; margin-top: 2.75rem; margin-bottom: 1rem; text-transform: uppercase; }
.sub-text { color: var(--ink-2); margin: -.5rem 0 1rem; }

/* ---------- KPI tiles ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--panel); padding: 1.25rem 1.4rem; display: flex; flex-direction: column; gap: .3rem; }
.kpi-val {
  font: 800 clamp(2.4rem, 5vw, 3.4rem)/1 var(--f-display); font-stretch: 70%;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.kpi-label { font-weight: 600; }
.kpi-detail { font: 400 .78rem var(--f-mono); color: var(--ink-2); }

/* ---------- Gantt ---------- */
.gantt-box { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.gantt { min-width: 44rem; padding: 1rem 1.25rem 1.25rem; font-size: .85rem; }
.g-row { display: grid; grid-template-columns: 15rem 1fr; align-items: center; }
.g-row.g-group .g-track { height: 2.2rem; }
.g-group .g-name { font: 500 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.g-name { padding-right: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-track { position: relative; height: 2rem; }
.g-axis .g-track { height: 1.6rem; border-bottom: 1px solid var(--line); }
.g-tick { position: absolute; top: 0; font: 500 .72rem var(--f-mono); color: var(--ink-2); transform: translateX(-50%); }
.g-grid { position: absolute; inset: 0; pointer-events: none; }
.g-bar {
  position: absolute; top: .55rem; height: .9rem; border-radius: 3px; min-width: 6px;
  transition: opacity .2s ease;
}
.g-bar.etudes { background: var(--flow-edu); }
.g-bar.entreprise { background: var(--flow-work); }
.g-bar.asso { background: var(--flow-asso); }
.g-bar.next { background: repeating-linear-gradient(-45deg, transparent 0 5px, color-mix(in srgb, var(--signal) 35%, transparent) 5px 10px); border: 2px dashed var(--signal); top: .4rem; height: 1.2rem; }
.g-bar.open::after { content: "›"; position: absolute; right: -0.9rem; top: -0.45rem; font-size: 1.2rem; color: var(--flow-edu); }
.g-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--signal); }
.g-today span { position: absolute; top: -.1rem; right: .35rem; font: 600 .66rem var(--f-mono); color: var(--signal-text); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.g-row.dim .g-bar, .g-row.dim .g-name { opacity: .22; }
.g-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; font-size: .8rem; color: var(--ink-2); }
.g-legend span::before { content: ""; display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; background: var(--c); }

/* ---------- Filters + experiences ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1.75rem 0 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font: 500 .85rem var(--f-body); padding: .4rem .9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.xp-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.xp {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .55rem; min-width: 0;
  border-top: 4px solid var(--c);
}
.xp.entreprise { --c: var(--flow-work); }
.xp.asso { --c: var(--flow-asso); }
.xp-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; font: 500 .75rem var(--f-mono); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.xp h4 { margin: 0; font: 700 1.12rem/1.25 var(--f-body); }
.xp-org { color: var(--ink-2); font-weight: 500; }
.xp ul { margin: .2rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .93rem; }
.xp-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: .4rem; }
.tag-mini { font: 500 .7rem var(--f-mono); padding: .15rem .5rem; border-radius: 3px; background: var(--chip-bg); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }

.edu-list { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.edu { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.edu-date { font: 500 .85rem var(--f-mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.edu h4 { margin: 0 0 .15rem; font: 700 1.05rem var(--f-body); }
.edu p { color: var(--ink-2); font-size: .93rem; }

.tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.track { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; }
.track h4 { margin: 0; font: 800 1.25rem var(--f-display); font-stretch: 85%; text-transform: uppercase; color: var(--ink); }
.track p { font-size: .95rem; }
.track-count { font: 500 .75rem var(--f-mono); color: var(--ink-2); margin-top: auto; }

/* ---------- Comic strip ---------- */
.band-bd { background: var(--deep); color: #EEF2F7; padding-block: 3.5rem; }
.band-bd .sec-head p { color: #AEB9CC; }
.band-bd .bd-grid { gap: 1.5rem; }
.bd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.bd-panel { margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.bd-frame {
  position: relative; aspect-ratio: 320 / 220; max-width: 100%;
  border: 3px solid #111; border-radius: 4px; overflow: hidden; background: #fff;
  box-shadow: 5px 5px 0 rgba(0,0,0,.35);
}
.bd-frame svg { width: 100%; height: 100%; display: block; }
.bd-frame.has-img { aspect-ratio: 3 / 2; }
.bd-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bd-frame.has-img .bd-place { top: auto; bottom: 0; border-bottom: 0; border-top: 2px solid #111; }
.bd-place {
  position: absolute; left: 0; top: 0; background: #FFE066; color: #111;
  font: 600 .72rem var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  padding: .25rem .5rem; border-right: 2px solid #111; border-bottom: 2px solid #111;
}
.bd-bubble {
  position: absolute; right: 4%; top: 13%; max-width: 54%;
  background: #fff; color: #111; border: 2.5px solid #111; border-radius: 18px;
  padding: .35rem .65rem; font: 400 clamp(.95rem, 1.5vw, 1.12rem)/1.15 var(--f-comic);
}
.bd-bubble::after {
  content: ""; position: absolute; left: 22%; bottom: -13px; width: 16px; height: 16px;
  background: #fff; border-right: 2.5px solid #111; border-bottom: 2.5px solid #111;
  transform: skewX(25deg) rotate(45deg);
}
/* Bulles sur illustrations : taille et position proportionnelles à la case */
.bd-frame.has-img { container-type: inline-size; }
.bd-frame.has-img .bd-bubble {
  top: 3%; right: 3%; left: auto; max-width: 42%;
  font-size: clamp(.72rem, 3.9cqw, 1.15rem); padding: .3em .6em; border-radius: 1em;
}
.bd-frame.has-img .bd-bubble[data-cote="g"] { left: 3%; right: auto; }
.bd-frame.has-img .bd-bubble::after { left: 18%; width: .8em; height: .8em; bottom: -.55em; }
.bd-frame.has-img .bd-bubble[data-cote="g"]::after { left: auto; right: 18%; transform: skewX(-25deg) rotate(45deg); }
.bd-panel figcaption { font-size: .9rem; color: #C9D2E0; }
.bd-num { font: 600 .75rem var(--f-mono); color: var(--signal); margin-right: .4rem; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.skill-col h3 { margin-bottom: .9rem; }
.lang-row { display: grid; gap: .3rem; margin-bottom: 1rem; }
.lang-top { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; }
.lang-top span:last-child { font: 500 .8rem var(--f-mono); color: var(--ink-2); }
.cefr { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.cefr i { height: .5rem; border-radius: 2px; background: var(--chip-bg); }
.cefr i.on { background: var(--ink); }
.cefr-scale { display: grid; grid-template-columns: repeat(6, 1fr); font: 400 .62rem var(--f-mono); color: var(--ink-2); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); font-size: .92rem; }

/* ---------- Contact ---------- */
.band-contact { background: var(--band-soft); color: var(--ink); border-top: 1px solid var(--line); }
.contact-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.band-contact h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; font-stretch: 72%; text-transform: uppercase; margin-bottom: .75rem; }
.contact-card { background: var(--panel); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--r); padding: 1.3rem 1.4rem; display: grid; gap: .4rem; min-width: 0; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .6rem; }
.mail { font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }

.foot { padding-block: 1.5rem; font-size: .8rem; color: var(--ink-2); }

.id-row { display: flex; align-items: center; gap: 1rem; }
.avatar { display: none; width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 2px solid var(--ink); flex: none; }
.swipe-hint { display: none; margin: 0 0 .5rem; }
.more { margin-top: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { display: none; }
  .avatar { display: block; }
  .swipe-hint { display: block; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xp-list, .tracks, .skills, .contact-in { grid-template-columns: 1fr; }
  .bd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .lang { margin-left: auto; }
}
@media (max-width: 560px) {
  .bd-grid { grid-template-columns: 1fr; }
  .label { padding: 1.2rem 1.1rem 1rem; }
  .label-rows div { grid-template-columns: 1fr; gap: 0; }
  .edu { grid-template-columns: 1fr; gap: .2rem; }
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .g-bar { transition: none; }
}
