/* =========================================================
   CV Maryam Bianchi — feuille de style écran
   Palette : #FFFBF7 / #FAD4AE / #614B34 / #6B3702 / #E0AD79 / #AD865E
   ========================================================= */

/* ---------- Polices auto-hébergées (SIL Open Font License 1.1) ----------
   Variables, sous-ensemble latin + latin étendu. 165 Ko au total.
   Auto-hébergées plutôt que servies par Google Fonts : pas de requête
   vers un serveur tiers, donc pas de transfert d'IP hors UE.            */
@font-face {
  font-family: "Manrope";
  src: url("./Manrope.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("./Inter.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs */
  --c-bg:            #FFFBF7;
  --c-surface:       #FFFFFF;
  --c-primary:       #FAD4AE;
  --c-primary-soft:  #FDECDC;
  --c-secondary:     #E0AD79;
  --c-muted:         #AD865E;
  --c-text:          #614B34;
  --c-text-soft:     rgba(97, 75, 52, .78);
  --c-accent:        #6B3702;
  --c-border:        rgba(224, 173, 121, .45);

  /* Typographie */
  --font-heading: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rayons */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 100px;

  /* Espacements */
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  /* Divers */
  --wrap: 1060px;
  --wrap-narrow: 720px;
  --header-h: 62px;
  --shadow-soft: 0 2px 10px rgba(97, 75, 52, .06);
}

/* ---------- Reset ciblé ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -.01em;
}

p  { margin: 0 0 var(--space-4); }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

img, svg { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Conteneurs ---------- */
.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-accent);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 247, .92);
  border-bottom: 1px solid var(--c-border);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: blur(10px); }
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--c-bg); }
}

/* Le header grandit quand le menu est ouvert : les ancres doivent suivre. */
.site-header:has(.site-nav.is-open) { box-shadow: 0 4px 14px rgba(97, 75, 52, .07); }

.header-inner {
  min-height: var(--header-h);
  display: flex;
  flex-wrap: wrap;              /* le panneau de menu passe à la ligne, dans le flux */
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-4);
  row-gap: 0;                   /* sinon le panneau fermé laisse une bande vide */
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--c-text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  min-height: 44px;
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.header-name { font-size: .95rem; }

/* Bouton menu (mobile) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-4) var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid var(--c-secondary);
  border-radius: var(--radius-pill);
  color: var(--c-text);
  font: 600 .9rem/1 var(--font-body);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--c-primary-soft); }

/* Icône : trois barres qui deviennent une croix à l'ouverture */
.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 12px;
  flex: none;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle-bars::before { top: 1px; }
.nav-toggle-bars::after  { top: 9px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  top: 5px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  top: 5px;
  transform: rotate(-45deg);
}

/* Panneau de navigation : dans le flux, jamais en superposition */
.site-nav {
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height .25s ease, visibility .25s;
}
.site-nav.is-open {
  max-height: 24rem;
  visibility: visible;
}

.site-nav ul {
  padding: var(--space-3) 0 var(--space-4);
  margin-top: var(--space-2);
  border-top: 1px solid rgba(224, 173, 121, .35);
}
.site-nav a {
  display: block;
  padding: var(--space-3) var(--space-2);
  margin-inline: calc(var(--space-2) * -1);
  color: var(--c-text);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.site-nav a:hover { background: var(--c-primary-soft); }
.site-nav a[aria-current="true"] { color: var(--c-accent); }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .header-inner { flex-wrap: nowrap; }
  .site-nav {
    flex-basis: auto;
    max-height: none;
    overflow: visible;
    visibility: visible;
    transition: none;
  }
  .site-nav ul {
    display: flex;
    gap: var(--space-5);
    padding: 0;
    margin-top: 0;
    border-top: 0;
  }
  .site-nav a {
    padding: var(--space-2) 0;
    margin-inline: 0;
    border-bottom: 2px solid transparent;
    font-size: .93rem;
    border-radius: 0;
  }
  .site-nav a:hover { background: none; color: var(--c-accent); }
  .site-nav a[aria-current="true"] { border-bottom-color: var(--c-secondary); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding: clamp(2.5rem, 8vw, 4.5rem) 0 clamp(2rem, 6vw, 3.5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto -20%;
  width: 90vw;
  height: 90vw;
  max-width: 780px;
  max-height: 780px;
  background: radial-gradient(circle at 35% 45%, rgba(250, 212, 174, .55), rgba(250, 212, 174, 0) 62%);
  pointer-events: none;
}
.hero-inner { position: relative; }

.monogram {
  width: clamp(88px, 22vw, 116px);
  margin-bottom: var(--space-5);
}

.hero-name {
  font-size: clamp(2.1rem, 8vw, 3.4rem);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

.hero-role {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1rem, 3.4vw, 1.2rem);
  color: var(--c-accent);
  margin-bottom: var(--space-4);
}

.hero-pitch {
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--c-text-soft);
  margin-bottom: var(--space-5);
}

.hero-facts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  font-size: .97rem;
}
.hero-facts li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.hero-facts a {
  color: var(--c-text);
  text-decoration: none;
  border-bottom: 1px solid var(--c-secondary);
  padding-bottom: 1px;
}
.hero-facts a:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }

.ico {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-pill);
  font: 700 1rem/1 var(--font-heading);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary {
  background: var(--c-accent);
  color: #fff;
  border: 2px solid var(--c-accent);
}
.btn-primary:hover { background: #582D02; border-color: #582D02; }

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border: 2px solid var(--c-secondary);
}
.btn-ghost:hover { background: var(--c-primary-soft); border-color: var(--c-accent); color: var(--c-accent); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(2.75rem, 8vw, 4.5rem) 0; }
.section-tint { background: var(--c-primary-soft); }

.section h2 {
  font-size: clamp(1.45rem, 5vw, 1.9rem);
  font-weight: 800;
  margin-bottom: var(--space-5);
  padding-top: var(--space-3);
  border-top: 3px solid var(--c-primary);
  display: inline-block;
}

.section-note {
  color: var(--c-text-soft);
  font-size: .95rem;
  margin-top: calc(var(--space-4) * -1 + var(--space-1));
  margin-bottom: var(--space-5);
}

.lede {
  font-size: 1.1rem;
  max-width: 62ch;
}
.section p { max-width: 68ch; }

.sub-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: var(--space-6) 0 var(--space-3);
}

/* ---------- Timeline expériences ---------- */
.timeline {
  position: relative;
  padding-left: var(--space-5);
  border-left: 2px solid var(--c-primary);
  display: grid;
  gap: var(--space-6);
}
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(var(--space-5) * -1 - 7px);
  top: .55rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 3px solid var(--c-secondary);
}

.tl-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.tl-meta {
  font-size: .92rem;
  color: var(--c-text-soft);
  margin-bottom: var(--space-3);
}
.tl-list { display: grid; gap: var(--space-2); }
.tl-list li {
  position: relative;
  padding-left: var(--space-5);
}
.tl-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 10px;
  height: 2px;
  background: var(--c-secondary);
}

/* ---------- Compétences ---------- */
.grid-3 {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}

.panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-soft);
}
.panel h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--c-border);
}
.dot-list { display: grid; gap: var(--space-2); font-size: .96rem; }
.dot-list li { position: relative; padding-left: var(--space-4); }
.dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-secondary);
}

/* ---------- Formation ---------- */
.edu {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.edu-dates {
  font-size: .9rem;
  color: var(--c-text-soft);
  margin-bottom: var(--space-2);
}
.edu-title {
  font-size: 1.12rem;
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.edu-school {
  font-weight: 600;
  margin-bottom: var(--space-3);
}
.edu-body {
  font-size: .96rem;
  color: var(--c-text-soft);
  margin-bottom: 0;
}

/* ---------- Qualités ---------- */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.pills li {
  background: var(--c-primary);
  color: var(--c-text);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  font-size: .93rem;
  font-weight: 500;
}

.two-col { display: grid; gap: var(--space-4); }
@media (min-width: 620px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
}

/* ---------- Contact ---------- */
.contact-list {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.contact-list li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--c-border);
}
@media (min-width: 620px) {
  .contact-list li { grid-template-columns: 160px 1fr; align-items: baseline; gap: var(--space-4); }
}
.contact-label { color: var(--c-text-soft); font-size: .93rem; }
.contact-value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-text);
  text-decoration: none;
}
a.contact-value:hover { color: var(--c-accent); text-decoration: underline; }
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: var(--space-5) 0;
  font-size: .88rem;
  color: var(--c-text-soft);
}
.site-footer p { margin: 0; }
.footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
}
.footer-credit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--c-secondary);
}
.footer-credit a:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }

/* ---------- Ancres sous le header collant ---------- */
:target { scroll-margin-top: calc(var(--header-h) + 12px); }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

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