/* =====================================================================
   POLICES — Boska (titres) et Switzer (texte), fournies par Fontshare
   et auto-hébergées ici (fichiers fournis par le client).
   ===================================================================== */
@font-face { font-family: "Boska"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/Boska-Medium.woff2") format("woff2"); }
@font-face { font-family: "Switzer"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/Switzer-Regular.woff2") format("woff2"); }
@font-face { font-family: "Switzer"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/Switzer-Medium.woff2") format("woff2"); }
@font-face { font-family: "Switzer"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/Switzer-Semibold.woff2") format("woff2"); }

/* =====================================================================
   VARIABLES GLOBALES
   ===================================================================== */
:root {
  --font-serif: "Boska", Georgia, serif;
  --font-sans: "Switzer", -apple-system, "Segoe UI", sans-serif;
  --radius: 3px;
  --max-w: 900px;
  --surface-tint: rgba(0,0,0,0.03);
}

/* Palette + identité par page : une seule variable --accent pilote tous
   les usages de couleur de marque (titres, bouton, icônes, monogramme).
   --accent-soft sert aux traits fins (bordures, fil rouge). */
body.home {
  --wine: #6B1F2A; --wine-deep: #4E1620; --wine-ink: #F0DADD;
  --night: #1B2A3D; --night-deep: #12202F; --night-ink: #C8D2DE;
  --bg: #F4F2ED; --ink: #3A3733;
}
body.cv-sommelier {
  --bg: #F5EFE4; --ink: #2B2521;
  --accent: #5B1A2B; --accent-ink: #F5EFE4; --accent-soft: rgba(91,26,43,0.18);
}
body.cv-generique {
  --bg: #FFFFFF; --ink: #2E3238;
  --accent: #2E3238; --accent-ink: #FFFFFF; --accent-soft: rgba(46,50,56,0.15);
  --grey: #8A8F98;
}

/* =====================================================================
   RESET / BASE
   ===================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); color: var(--ink); background: var(--bg); line-height: 1.65; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* Icônes lucide.js : taille pilotée en `em` (donc par le font-size du
   parent), contour fin partout — un seul point de réglage. */
.icon {
  width: 1em !important; height: 1em !important;
  vertical-align: -0.15em; flex-shrink: 0; display: inline-block;
  stroke: currentColor; stroke-width: 1.5; fill: none;
}
.hero-icon-big { font-size: 84px !important; stroke-width: 0.4; }

/* =====================================================================
   NAVIGATION
   ===================================================================== */
.nav { display: flex; justify-content: space-between; align-items: center; max-width: var(--max-w); margin: 0 auto; padding: 20px 24px; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent, inherit); }
.monogram { width: 34px; height: 28px; }
.monogram img { width: 100%; height: 100%; object-fit: contain; }
.nav-brand .full { font-family: var(--font-sans); font-weight: 300; letter-spacing: 0.01em; font-size: 15px; }
.nav .links { display: flex; gap: 26px; font-size: 13px; font-weight: 500; }
.nav .links a { text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 2px; transition: border-color 0.15s ease; }
.nav .links a:hover { border-color: currentColor; }

/* =====================================================================
   SECTIONS (pages CV)
   ===================================================================== */
.section { max-width: var(--max-w); margin: 0 auto; padding: 60px 24px; }
.section h2 {
  font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.01em;
  font-size: 22px; margin: 0 0 28px; display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; border-bottom: 2px solid var(--accent-soft, rgba(0,0,0,0.12));
  color: var(--accent, inherit);
}
.section h2 .icon { font-size: 20px; }
.cv-hero .intro { max-width: 480px; font-size: 14px; margin-top: 16px; }

/* =====================================================================
   ACCUEIL — diptyque plein écran, sans scroll (desktop)
   ===================================================================== */
body.home { height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; }

.split-hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 72vh; }
.split-hero > a {
  position: relative; padding: 40px; display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; overflow: hidden; transition: filter 0.35s ease;
}
.split-hero > a:hover { filter: brightness(1.1); }
/* grain léger (remplace un fond à motif trop dur) */
.split-hero > a::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.split-hero .wine-panel { background: radial-gradient(120% 140% at 20% 15%, var(--wine-deep) 0%, var(--wine) 55%); color: var(--wine-ink); }
.split-hero .night-panel { background: radial-gradient(120% 140% at 80% 15%, var(--night-deep) 0%, var(--night) 55%); color: var(--night-ink); }
.split-hero .panel-top { position: relative; display: flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0.02em; font-size: 14px; }
.split-hero .panel-illustration { position: relative; display: flex; align-items: center; opacity: 0.9; }
.split-hero h1 { position: relative; font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 4vw, 40px); color: #fff; margin: 0 0 8px; line-height: 1.2; max-width: 380px; letter-spacing: 0.01em; }
.split-hero .tagline { position: relative; font-size: 13px; opacity: 0.85; max-width: 320px; margin: 0 0 18px; }
.split-hero .cta { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid currentColor; padding: 10px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 500; width: fit-content; }
.split-hero .cta .icon { transition: transform 0.25s ease; }
.split-hero > a:hover .cta .icon { transform: translateX(4px); }

.home-footer { text-align: center; font-size: 12px; color: var(--ink); opacity: 0.65; padding: 12px 24px; max-width: var(--max-w); margin: 0 auto; width: 100%; }
.home-footer a { text-decoration: none; border-bottom: 1px solid currentColor; }
.home-footer .icon { margin-right: 4px; }

.home-intro {
  text-align: center; max-width: 560px; margin: 0 auto; padding: 8px 24px;
  font-family: var(--font-sans); font-weight: 500; letter-spacing: 0.01em; font-size: 15px; color: var(--ink); opacity: 0.85;
}

/* =====================================================================
   HERO DES PAGES CV
   ===================================================================== */
.cv-hero { padding: 44px 24px 20px; max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1fr 34%; gap: 24px; align-items: center; }
.cv-hero h1 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(28px, 3.8vw, 38px); color: var(--accent); margin: 0 0 8px; letter-spacing: 0.01em; }
.cv-hero .role { color: var(--accent, var(--grey)); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.cv-hero .illustration img { width: 100%; height: auto; display: block; }

/* Appel au scroll, sous le hero */
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: var(--max-w); margin: 8px auto 0; font-size: 11px; text-decoration: none; opacity: 0.6; width: fit-content; transition: opacity 0.2s ease; }
.scroll-cue:hover { opacity: 1; }
.scroll-cue .icon { animation: cue-bounce 1.8s ease-in-out infinite; }
@keyframes cue-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* =====================================================================
   BOUTON
   ===================================================================== */
.btn { border: none; background: var(--accent); color: var(--accent-ink, #fff); padding: 11px 22px; font-size: 13px; font-weight: 500; border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: transform 0.15s ease, opacity 0.15s ease; }
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .scroll-cue .icon { animation: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* Apparition en fondu au scroll (voir main.js) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =====================================================================
   TIMELINE — fil rouge central, visible uniquement dans cette section
   ===================================================================== */
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 50%; top: 6px; bottom: 6px; width: 1px; transform: translateX(-0.5px);
  background: var(--accent); opacity: 0.15; z-index: 0;
}
.timeline-item { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 40px 1fr; align-items: start; padding: 0 0 40px; }
.timeline-item:last-child { padding-bottom: 4px; }
.timeline-item::before {
  content: ""; grid-column: 2; justify-self: center; margin-top: 4px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); z-index: 1;
}
.timeline-item .t-content { grid-column: 1; text-align: right; padding-right: 8px; }
.timeline-item:nth-child(even) .t-content { grid-column: 3; text-align: left; padding-right: 0; padding-left: 8px; }
.timeline-item .dates { font-size: 13px; color: var(--grey, var(--accent)); display: flex; align-items: center; gap: 6px; }
.timeline-item:nth-child(odd) .dates { justify-content: flex-end; }
.timeline-item h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.timeline-item p { margin: 0; font-size: 14px; }

/* =====================================================================
   CARTES — diplômes, galerie, quiz (même langage visuel : fond léger,
   léger lift au survol)
   ===================================================================== */
.diplomas { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.diplomas li, .gallery .ph, .quiz-opt, .quiz-result {
  border-radius: var(--radius); transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.diplomas li { padding: 14px 18px; background: var(--surface-tint); font-size: 14px; display: flex; gap: 12px; align-items: flex-start; }
.diplomas li:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.08); background: rgba(0,0,0,0.045); }
.diplomas .icon { margin-top: 3px; }
.diplomas strong { display: block; margin-bottom: 2px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery .ph {
  aspect-ratio: 4/5; background: rgba(0,0,0,0.05); display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; font-size: 12px; color: var(--grey, #999); text-align: center; padding: 8px;
}
.gallery .ph:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 24px rgba(0,0,0,0.1); }

/* =====================================================================
   QUIZ (générique — utilisé par le quiz sommellerie ET le quiz gestion)
   ===================================================================== */
.quiz-card { max-width: 480px; }
.quiz-question { font-size: 16px; margin: 0 0 18px; font-family: var(--font-sans); font-weight: 600; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quiz-opt { border: 1px solid rgba(0,0,0,0.15); background: transparent; color: inherit; padding: 12px 14px; font-family: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.quiz-opt:hover { transform: translateY(-2px); background: var(--surface-tint); border-color: currentColor; }
.quiz-result { padding: 18px 20px; background: var(--surface-tint); }
.quiz-result .quiz-question { margin-bottom: 16px; }

/* =====================================================================
   FORMULAIRE DE CONTACT
   ===================================================================== */
form.contact { display: grid; gap: 14px; max-width: 480px; }
form.contact label { font-size: 13px; display: block; margin-bottom: 4px; }
form.contact input, form.contact textarea {
  width: 100%; padding: 10px 12px; border: 1px solid rgba(0,0,0,0.15); border-radius: var(--radius);
  font-family: inherit; font-size: 14px; background: #fff;
}
form.contact textarea { min-height: 120px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; opacity: 0; } /* honeypot anti-spam, invisible */
.form-msg { font-size: 13px; margin-top: 8px; }
.form-msg.ok { color: #2e7d32; }
.form-msg.err { color: #c62828; }
.gdpr-note { font-size: 12px; color: var(--grey, #888); opacity: 0.85; max-width: 480px; margin-top: 4px; }

footer.site-footer { text-align: center; font-size: 12px; color: var(--grey, #999); padding: 32px 24px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 640px) {
  body.home { height: auto; overflow: visible; display: block; }
  .split-hero { grid-template-columns: 1fr; }
  .cv-hero { grid-template-columns: 1fr; }
  .cv-hero .illustration { display: none; }
  .timeline::before { left: 14px; }
  .timeline-item, .timeline-item:nth-child(even) { grid-template-columns: 24px 1fr; }
  .timeline-item .t-content, .timeline-item:nth-child(even) .t-content { grid-column: 2; text-align: left; padding: 0 0 0 8px; }
  .timeline-item::before { grid-column: 1; margin-top: 4px; }
  .timeline-item:nth-child(odd) .dates { justify-content: flex-start; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
