/* acrevon.fr : carnet d'ingénieur. Palette tirée du logo (fond #e9edf0, bleu acier, marine). */

@font-face { font-family: "Literata"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/literata-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 400; font-style: italic; font-display: swap; src: url(fonts/literata-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "Literata"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/literata-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-weight: 600; font-style: normal; font-display: swap; src: url(fonts/caveat-latin-600-normal.woff2) format("woff2"); }

:root {
  --paper: #e9edf0;
  --paper-2: #dde4ea;
  --ink: #1b2733;
  --muted: #475669;
  --accent: #274a78;       /* marine du logo */
  --accent-ink: #ffffff;
  --steel: #6697bf;        /* bleu acier du logo : traits et décor, jamais du texte */
  --hand: #365f8d;         /* annotations manuscrites */
  --rule: #b2c1cf;
  --good: #1d6b3a;
  --bad: #9b2c2c;
  --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.35 0 0 0 0 0.4 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --handf: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  color-scheme: light;
}
/* Sombre pensé à part : papier du logo sombre (#353332), bleu clair du logo en accent */
:root[data-theme="dark"] {
  --paper: #353332; --paper-2: #3e3c3a; --ink: #ebeff3; --muted: #b3bec9;
  --accent: #b9d4ee; --accent-ink: #1d2733; --steel: #7ea6cd; --hand: #a5c6e6; --rule: #5a5855;
  --good: #8fd3a8; --bad: #f0a3a3; --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.92 0 0 0 0 0.95 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #353332; --paper-2: #3e3c3a; --ink: #ebeff3; --muted: #b3bec9;
    --accent: #b9d4ee; --accent-ink: #1d2733; --steel: #7ea6cd; --hand: #a5c6e6; --rule: #5a5855;
    --good: #8fd3a8; --bad: #f0a3a3; --grain-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.92 0 0 0 0 0.95 0 0 0 .035 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background-color: var(--paper);
  /* grain de papier discret */
  background-image: var(--grain-img);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--accent-ink); padding: .5rem .8rem; z-index: 10; }
.skip:focus { top: 1rem; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--paper-2); padding: .05em .3em; border-radius: 3px; }
.small { font-size: .88rem; color: var(--muted); }

/* ---------- mise en page asymétrique ---------- */
.shell { display: block; max-width: 74rem; margin: 0 auto; padding: 0 1rem; }
.side { padding: 1rem 0; }
.brand { display: block; width: 9.5rem; }
.logo { width: 100%; height: auto; display: block; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
.nav ul { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; }
.nav a { font-family: var(--mono); font-size: .85rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--steel); }
.tools { margin-top: .8rem; display: flex; gap: 1rem; align-items: center; font-family: var(--mono); font-size: .82rem; }
.theme-btn { display: none; font: inherit; color: var(--ink); background: none; border: 1px solid var(--rule); border-radius: 3px; padding: .15rem .6rem; cursor: pointer; }
.js .theme-btn { display: inline-flex; }
.theme-btn:hover { border-color: var(--steel); }
.col { padding-bottom: 3rem; min-width: 0; }

@media (min-width: 62rem) {
  .shell { display: grid; grid-template-columns: 13rem minmax(0, 1fr); column-gap: 3.5rem; padding: 0 2rem; }
  .side { position: sticky; top: 0; align-self: start; height: 100vh; padding: 2.2rem 0; display: flex; flex-direction: column; }
  .brand { width: 100%; }
  .nav ul { flex-direction: column; gap: .35rem; margin-top: 2rem; }
  .nav a { font-size: .9rem; }
  .tools { margin-top: auto; flex-wrap: wrap; }
}
main { max-width: 44rem; }
@media (min-width: 62rem) { main { margin-right: 11rem; } } /* marge droite pour les annotations */

section { padding: 2.2rem 0 .4rem; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; margin: 0 0 .6rem; }
h1 { font-size: clamp(2.3rem, 6vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: 1.55rem; padding-bottom: .55rem; position: relative; margin-bottom: 1rem; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 5.5rem; height: .45rem; background: var(--steel); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 7' preserveAspectRatio='none'%3E%3Cpath d='M1 4 C12 1 20 6 32 3.5 S52 1.5 62 4 S80 5 87 2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 7' preserveAspectRatio='none'%3E%3Cpath d='M1 4 C12 1 20 6 32 3.5 S52 1.5 62 4 S80 5 87 2' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat; }
h3 { font-size: 1.1rem; margin-bottom: .1rem; }
.subhead { margin-top: 2.2rem; font-size: 1.2rem; }
p { margin: 0 0 1rem; }
.kicker { color: var(--muted); margin: 0 0 .4rem; letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; }
.lead { font-size: 1.25rem; line-height: 1.5; max-width: 34rem; }

/* annotations manuscrites */
.hand, .margin, .note { font-family: var(--handf); font-weight: 600; color: var(--hand); font-size: 1.3rem; line-height: 1.15; }
.margin { display: block; font-size: 1.15rem; margin-top: .15rem; }
.margin.inline { display: inline; margin-left: .4rem; font-size: 1.1rem; font-weight: 600; }
@media (min-width: 62rem) {
  .hl dd { position: relative; }
  .margin:not(.inline) { position: absolute; left: calc(100% + 1.2rem); top: -.1rem; width: 9.5rem; transform: rotate(-1.6deg); padding-left: 1.2rem;
    background: no-repeat left .35rem / .95rem .7rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 14'%3E%3Cpath d='M18 7 C12 6 6 8 2 7 M2 7 L7 2 M2 7 L7 12' fill='none' stroke='%236697bf' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}

/* ---------- hero ---------- */
.hero { display: grid; gap: 1.6rem; padding-top: 1.2rem; }
.portrait { margin: 0; justify-self: start; width: min(100%, 20rem); transform: rotate(-2deg); }
.portrait img { display: block; width: 100%; height: auto; border: .55rem solid #f6f8f9; box-shadow: 0 1px 0 var(--rule); background: #f6f8f9; }
:root[data-theme="dark"] .portrait img { border-color: #eceff1; background: #eceff1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .portrait img { border-color: #eceff1; background: #eceff1; } }
.portrait figcaption { margin-top: .4rem; padding-left: .3rem; }
@media (min-width: 40rem) { .hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 2.5rem; } .portrait { margin-top: 3.4rem; } }
.actions { display: flex; flex-wrap: wrap; gap: .8rem 1.4rem; align-items: center; margin-top: 1.4rem; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: .9rem; padding: .6rem 1.1rem; border: 0; border-radius: 2px; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.12); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: progress; }
.alt { font-family: var(--mono); font-size: .88rem; }

/* ---------- listes ---------- */
.log, .plain, .steps { list-style: none; padding: 0; margin: 0; }
.log li { display: grid; grid-template-columns: 7.5rem 1fr; gap: .2rem 1rem; padding: .75rem 0; border-top: 1px dashed var(--rule); }
.log li:first-child { border-top: 0; }
.when { color: var(--muted); font-size: .82rem; margin: .25rem 0 0; }
.step { display: grid; grid-template-columns: 8.5rem 1fr; gap: .2rem 1.2rem; padding: 1rem 0; border-top: 1px dashed var(--rule); }
.step:first-child { border-top: 0; padding-top: .2rem; }
.step p { margin-bottom: .4rem; }
.org { color: var(--muted); font-style: italic; margin: 0 0 .4rem; }
@media (max-width: 34rem) { .log li, .step { grid-template-columns: 1fr; } .when { margin-top: 0; } }
.skills { margin: 0; }
.skillgroup { display: grid; grid-template-columns: 8.5rem 1fr; gap: .1rem 1.2rem; padding: .5rem 0; }
@media (max-width: 34rem) { .skillgroup { grid-template-columns: 1fr; } }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .5rem; }
.tags li { border: 1px solid var(--rule); border-radius: 2px; padding: .05rem .5rem; background: var(--paper-2); }
.plain li { padding: .25rem 0; }

/* ---------- projets ---------- */
.project { display: grid; gap: 1rem; padding: 1.3rem 0; border-top: 1px dashed var(--rule); }
.project:first-of-type { border-top: 0; padding-top: 0; }
.shot { width: 100%; height: auto; border: 1px solid var(--rule); display: block; }
.plink { margin: .2rem 0 0; font-family: var(--mono); font-size: .88rem; }
@media (min-width: 40rem) { .project:has(.shot) { grid-template-columns: minmax(0, 1fr) 15rem; align-items: start; } }

/* ---------- homelab ---------- */
.schema { margin: 1.2rem 0 1.5rem; }
.sketch { width: 100%; height: auto; display: block; overflow: visible; }
.sketch .ink path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sketch .ink path.again { stroke: var(--steel); stroke-width: 1.2; opacity: .8; }
.sketch .ink path.dash { stroke-dasharray: 6 6; stroke: var(--hand); }
.sketch text { fill: var(--ink); font-family: var(--mono); font-size: 13px; }
.sketch text.c { text-anchor: middle; }
.sketch text.b { font-size: 15px; font-weight: 400; }
.sketch text.s { font-family: var(--handf); font-weight: 600; font-size: 17px; fill: var(--hand); }
.sketch text.note { font-family: var(--handf); font-weight: 600; font-size: 20px; fill: var(--hand); transform: rotate(-4deg); transform-origin: 660px 270px; }
.hls { margin: 0; }
.hl { padding: .7rem 0; border-top: 1px dashed var(--rule); }
.hl:first-child { border-top: 0; }
.hl dt { font-weight: 600; }
.hl dd { margin: .1rem 0 0; }
.tech { font-weight: 400; color: var(--muted); margin-left: .5rem; }

/* ---------- formulaire ---------- */
.contact { display: grid; gap: .2rem; max-width: 34rem; margin-top: 1.2rem; }
.contact p { margin: 0 0 .9rem; }
.contact label { display: block; font-family: var(--mono); font-size: .82rem; color: var(--muted); margin-bottom: .25rem; }
.contact input[type=text], .contact input[type=email], .contact textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper-2); border: 1px solid var(--rule); border-bottom: 2px solid var(--steel); border-radius: 2px; padding: .55rem .7rem; }
.contact textarea { resize: vertical; min-height: 9rem; }
.hint { font-size: .88rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.6em; font-weight: 600; }
.status.good { color: var(--good); }
.status.bad { color: var(--bad); }
.elsewhere { margin-top: 1.6rem; }

.foot { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); max-width: 44rem; }
.foot p { margin: 0 0 .3rem; font-size: .88rem; color: var(--muted); }
.simple { padding-top: 3rem; }
.linkbtn { font: inherit; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }

/* ---------- impression : page CV propre ---------- */
@media print {
  :root, :root[data-theme="dark"] { --paper: #fff; --ink: #000; --muted: #333; --accent: #000; --rule: #999; --steel: #666; --paper-2: #fff; color-scheme: light; }
  body,   .side, .skip, .noprint, .foot p.small, .tools, .contact, .hero .actions { display: none !important; }
  .shell { display: block; padding: 0; max-width: none; }
  main { max-width: none; margin: 0; }
  h2::after { display: none; }
  section { padding-top: 1rem; }
  a { color: #000; text-decoration: none; }
  .cv a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #333; }
  .step, .project { break-inside: avoid; }
  .step { grid-template-columns: 5.5cm 1fr; }
  .portrait, .shot { display: none; }
}
