/* =========================================================
   Feuille de style du site de Vincent Morey
   Organisation : 1. Variables  2. Base  3. Composants  4. Sections  5. Mobile
   ========================================================= */

/* ---------- 1. VARIABLES : les couleurs et tailles réutilisées partout ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f4f7fa;          /* fond des sections alternées */
  --text: #1c2430;
  --muted: #5b6573;           /* texte secondaire */
  --accent: #1f4e79;          /* le bleu du CV */
  --accent-soft: #e8eef5;
  --border: #dde3ea;
  --radius: 12px;
  --max-width: 1080px;
}

/* Mode sombre automatique si l'ordinateur ou le téléphone est réglé en sombre */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171e;
    --bg-alt: #19202a;
    --text: #e6eaf0;
    --muted: #9aa5b4;
    --accent: #7fb2e5;
    --accent-soft: #1f2a38;
    --border: #2a3441;
  }
}

/* ---------- 2. BASE ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }   /* défilement doux quand on clique sur le menu */

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h2 { font-size: 2rem; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }
a  { color: var(--accent); }

/* Conteneur centré qui limite la largeur du texte */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 3. COMPOSANTS ---------- */

/* Boutons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary   { background: var(--accent); color: var(--bg); }
.btn-secondary { border: 2px solid var(--accent); color: var(--accent); }

/* Cartes (utilisées pour "Ce que je fais" et les études de cas) */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));  /* s'adapte seul à la largeur */
  gap: 20px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { color: var(--accent); }
.card p  { color: var(--muted); margin: 0; }

.cards-cases { grid-template-columns: repeat(2, 1fr); }  /* 2 x 2 pour les 4 études de cas */
.card-link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.card-link:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-link h3 { margin: 0; color: var(--text); }
.card-tag  { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.card-more { margin-top: auto; font-weight: 600; color: var(--accent); }

/* ---------- 4. SECTIONS ---------- */

/* En-tête collé en haut de l'écran */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.logo { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.menu { display: flex; gap: 24px; align-items: center; }
.menu a { color: var(--muted); text-decoration: none; font-weight: 500; }
.menu a:hover { color: var(--accent); }
.menu .menu-cta { color: var(--accent); font-weight: 600; }

/* Accueil */
.hero { padding: 96px 0 72px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 20ch; letter-spacing: -0.02em; }
.hero-lead { font-size: 1.25rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

/* Chiffres clés */
.stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 40px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { display: flex; flex-direction: column; }
.stat-number { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label  { color: var(--muted); font-size: 0.95rem; }

/* Sections génériques */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--muted); font-size: 1.1rem; margin-bottom: 32px; }

/* Frise chronologique */
.timeline { list-style: none; margin: 32px 0 0; padding: 0 0 0 28px; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding-bottom: 32px; }
.timeline li::before {           /* la pastille sur la ligne */
  content: "";
  position: absolute;
  left: -37px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}
.tl-date { font-size: 0.9rem; font-weight: 600; color: var(--accent); }
.timeline h3 { margin: 4px 0 6px; }
.timeline p { color: var(--muted); margin: 0; }

/* Contact */
.section-contact { background: var(--accent-soft); text-align: center; }
.section-contact .section-intro { max-width: 60ch; margin-left: auto; margin-right: auto; }
.section-contact .hero-actions { justify-content: center; }

/* Pied de page */
.site-footer { padding: 32px 0; color: var(--muted); font-size: 0.9rem; text-align: center; }

/* ---------- 6. PAGES D'ÉTUDES DE CAS ---------- */
.container-narrow {             /* colonne de lecture plus étroite : plus confortable pour un texte long */
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.case h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; margin-top: 8px; }
.case h2 { font-size: 1.3rem; margin-top: 2.2em; color: var(--accent); }
.case-meta { color: var(--muted); margin-bottom: 2em; }
.back-link { display: inline-block; margin-bottom: 32px; text-decoration: none; font-weight: 500; }

.steps { padding-left: 1.4em; }
.steps li { margin-bottom: 0.6em; padding-left: 0.3em; }
.steps li::marker { color: var(--accent); font-weight: 700; }

.highlight {                     /* encadré coloré pour le résultat */
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
}
blockquote {                     /* citation pour la leçon retenue */
  margin: 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--border);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--muted);
}
.case-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.case-nav a { text-decoration: none; font-weight: 600; }

/* ---------- 5. MOBILE : règles appliquées aux écrans de moins de 720 px ---------- */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu a:not(.menu-cta) { display: none; }   /* sur mobile, on ne garde que "Contact" */
  .hero { padding: 56px 0 48px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-cases { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  h2 { font-size: 1.6rem; }
}
