/* ==========================================================================
   Portfolio Pierre Vergeat — styles partagés (charte PORTFOLIO_HOME_VALIDE)
   Modifier une couleur ou une police : uniquement dans :root ci-dessous.
   ========================================================================== */

/* ---------- Polices hébergées localement ---------- */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2-variations"), url("../fonts/bricolage-grotesque.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("../fonts/dm-sans.woff2") format("woff2-variations"), url("../fonts/dm-sans.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/instrument-serif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/jetbrains-mono-500.woff2") format("woff2");
}

:root {
  /* Couleurs */
  --cream: #F6F1E7;
  --ink: #230C27;
  --ink-2: #30163A;
  --violet: #6C3CE1;
  --lavender: #E4DBF7;
  --lilac: #B9A2FF;
  --yellow: #EFE37A;
  --white: #FFFFFF;
  --orange: #FFA179;
  --red: #D42E33;
  --green: #1C9966;

  /* Typographies */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "DM Sans", system-ui, sans-serif;

  /* Mise en page */
  --gutter: 80px;
  --max: 1280px;
  --section-y: 120px;

  /* Bordures et ombres pleines */
  --line: 1.5px solid var(--ink);
  --line-bold: 3px solid var(--ink);
  --shadow-s: 0 5px 0 var(--ink);
  --shadow-m: 0 8px 0 var(--ink);
  --shadow-l: 0 10px 0 var(--ink);

  /* Animation */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1024px) {
  :root { --gutter: 40px; --section-y: 96px; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --section-y: 72px; }
}

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 10px 18px; border-radius: 100px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Conteneur ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Typo utilitaires ---------- */
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.96;
  font-variation-settings: "opsz" 96;
}
.display .serif {
  font-size: 1.14em;
  letter-spacing: -0.03em;
  color: var(--violet);
}

/* ---------- Pilules et boutons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px;
  border: var(--line);
  border-radius: 100px;
  font: 500 15px/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.pill--solid { background: var(--ink); color: var(--cream); }
a.pill:hover:not(.pill--solid) { background: var(--ink); color: var(--cream); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 100px;
  font: 500 15px/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.btn--violet { background: var(--violet); color: var(--cream); padding: 13px 22px; box-shadow: 0 4px 0 var(--ink); }
.btn--yellow { background: var(--yellow); color: var(--ink); padding: 16px 28px; box-shadow: var(--shadow-s); }
.btn--ghost-light { border: 2.5px solid var(--cream); color: var(--cream); padding: 14px 26px; }
.btn--ghost-light:hover { background: var(--cream); color: var(--violet); }

/* Bouton « touche » : monte au survol, s'enfonce au clic */
.btn--violet:hover, .btn--yellow:hover { transform: translateY(-2px); }
.btn--violet:hover { box-shadow: 0 6px 0 var(--ink); }
.btn--yellow:hover { box-shadow: 0 7px 0 var(--ink); }
.btn--violet:active, .btn--yellow:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* ---------- Navigation ---------- */
.site-nav {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 28px;
}
.logo {
  display: inline-flex; align-items: center; gap: 15px;
  font: 600 24px/1.2 var(--font-display);
  color: var(--violet);
  text-decoration: none;
  white-space: nowrap;
}
.logo img { width: 31px; height: 18px; }
.nav-links { display: flex; gap: 10px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
/* Horloge : heure de Bayonne + ce que je fais à ce moment-là */
.clock { padding: 10px 16px; gap: 10px; --dot: #2FBF71; }
.clock[data-state="off"] { --dot: var(--red); }
.clock::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--dot); flex: none;
  box-shadow: 0 0 0 0 var(--dot);
}
.clock[data-state="on"]::before { animation: clock-pulse 2.4s ease-out infinite; }
@keyframes clock-pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(47, 191, 113, 0); }
}
.clock time { font-size: 12px; }
.clock__status { font: 500 14px/1.2 var(--font-body); }

.nav-toggle { display: none; }

@media (max-width: 1180px) {
  .clock { display: none; }
}
@media (max-width: 760px) {
  .site-nav { padding-top: 20px; }
  .nav-links, .nav-right .btn { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    border: var(--line); border-radius: 100px; padding: 9px 18px;
    font: 500 15px/1.2 var(--font-body);
  }
  .site-nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: calc(100% + 12px); left: 0; right: 0;
    background: var(--cream); border: var(--line-bold); border-radius: 28px;
    box-shadow: var(--shadow-m); padding: 16px;
  }
  .site-nav.is-open .nav-links .pill { justify-content: center; padding: 14px 20px; font-size: 18px; }
}

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: var(--cream); }
.site-footer .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 40px;
}
.site-footer p { font-size: 16px; opacity: .8; }
.site-footer .mono { opacity: .6; }
.site-footer .pill { border-color: var(--cream); }
.site-footer .pill:hover { background: var(--cream); color: var(--ink); }
@media (max-width: 760px) {
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .2s !important;
    scroll-behavior: auto !important;
  }
}
