/* VARIABLES GLOBALES (Design System Style Apple), ce sont les variables qui représentent la base du système d'où leurs noms globales */
:root {
  /* Inspiration de la police d'Apple pour avoir un côté épurer, permet d'avoir des polices professionelles sans télécharger des ressources supplémentaires */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;

  /* Palette de couleurs minimaliste */
  --bg-color: #fbfbfd;           /* Fond de page très légèrement gris/creme plus agréable qu'un blanc classique */
  --card-bg: #ffffff;            /* Fond blanc pur pour les cartes */

  /* Palette de couleur, représentative d'un système de design */
  --text-primary: #1d1d1f;        /* Noir Apple (moins agressif qu'un noir pur) */
  --text-secondary: #424245;      /* Gris foncé proche du noir pour les sous-titres */
  --text-tertiary: #6e6e73;       /* Gris plus clair pour les petits textes, contraste ≥ 4,5:1 */

  /* Couleurs d'accentuation */
  --accent-blue: #0066cc;         /* Bleu d'inspiration Apple, assez classique */
  --accent-blue-hover: #0077ed;   /* Bleu légèrement plus clair quand on passe le curseur dessus */

  /* Bordures et séparateurs discrets */
  --border-light: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);

  /* Arrondis et ombres subtiles */
  --radius-card: 12px;            /* Bords arrondis modernes */
  --radius-btn: 8px;              /* Boutons légèrement arrondis, plus sobres */

  /* Espacements réutilisés */
  --space-section: 72px;          /* Espace vertical entre deux sections */
}

/* Partie du code permettant de tout réinitialisation. */
*, *::before, *::after {
  box-sizing: border-box; /* Inclusion des bordures et paddings dans la largeur */
  margin: 0;
  padding: 0;
}

/* Corps principal du texte */
body {
  font-family: var(--font-system);
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.01em; /* Les em sont une autre forme d'unité de mesure qui évite à avoir à utiliser px et que je trouve plus pratique a manipuler car relative */
}

img, object {
  display: block;
  max-width: 100%;
}

/* Conteneur principal centré avec marges de sécurité */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Barre fixe : mon nom reste visible pendant le défilement */
.site-nav {
  position: sticky; /* Reste visible en haut pendant le défilement */
  top: 0;
  z-index: 10;
  background-color: var(--card-bg);
  border-bottom: 2px solid var(--border-light);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

/* Formation affichée à droite de mon nom */
.nav-meta {
  font-size: 14px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* PHRASE D'ACCROCHE (hero) */

/* Hero qui occupe presque tout l'écran, contenu centré */
.hero {
  min-height: 55em; /* Laisse apparaître le début de la section suivante */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Verticale */
  padding: 96px 0;
  text-align: center; /* Horizontale */
}

.hero-title {
  font-size: clamp(44px, 9vw, 96px); /* Grandit avec la fenêtre, dans une limite */
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.hero-sub {
  max-width: 48ch; /* Phrase répartie sur deux ou trois lignes équilibrées */
  margin: 20px auto 0; /* Centrée sous le titre */
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.35;
  color: var(--text-secondary);
}

/* Deux grands boutons côte à côte, empilés sur petit écran */
.hero-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  max-width: 640px;
  margin: 48px auto 0;
}

/* Grand bouton */
.intro-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 32px 28px;
  background-color: var(--accent-blue);
  color: #ffffff;
  border-radius: var(--radius-card);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.intro-link:hover {
  background-color: var(--accent-blue-hover);
}

.intro-link:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

/* Variante claire du grand bouton */
.intro-link-secondary {
  background-color: rgba(0, 0, 0, 0.04);
  color: var(--accent-blue);
}

.intro-link-secondary:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.intro-link-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
  text-decoration-line: underline;
}

.intro-link-title {
  font-size: clamp(20px, 2.4vw, 28px); /* Plus petit que la phrase d'accroche */
  line-height: 1.25;
  font-weight: 700;
  flex: 1; /* Occupe l'espace entre le label et le CTA */
  display: flex;
  justify-content: center; /* Horizontale */
  align-items: center; /* Verticale */
  text-align: center; /* Centre aussi chaque ligne du texte */
}

.intro-link-cta {
  margin-top: auto; /* Poussé en bas du bouton */
  padding-top: 16px;
  font-size: 15px;
  font-weight: 500;
}

/* Apparition en deux temps : la phrase d'accroche, puis la suite */
@keyframes apparition {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.hero-title {
  animation: apparition 0.5s ease-out both;
}

.hero-sub,
.hero-actions {
  animation: apparition 0.5s ease-out 0.3s both; /* Fin de l'animation à 0,8 s */
}

/* Défilement doux vers les ancres (#a-propos), seulement si les animations sont acceptées */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Pas d'animation si l'utilisateur l'a désactivée dans son système (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-sub,
  .hero-actions {
    animation: none;
  }
}

/* Sections "À propos" et "Mon parcours" */
.story-section {
  margin-bottom: var(--space-section);
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 80px; /* Marge sous la barre fixe lors de l'arrivée via une ancre (#a-propos) */
}

.section-title {
  margin-bottom: 4px; /* le gap fait déjà l'espace */
}

/* Texte limité en largeur (~120 caractères par ligne) et plus aéré, en couleur principale pour un texte long */
.intro-text {
  max-width: 120ch;
}

.intro-text p {
  line-height: 1.65;
  color: var(--text-primary);
}

.intro-text p + p {
  margin-top: 20px;
}

/* Les trois étapes côte à côte, empilées sur petit écran */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.story-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  overflow: hidden; /* L'illustration suit l'arrondi de la carte */
}

.story-media {
  aspect-ratio: 16 / 10; /* Même ratio que les SVG (320 x 200) */
  border-bottom: 1px solid var(--border-light);
}

.story-svg {
  width: 100%;
  height: 100%;
}

.story-text {
  padding: 20px 24px 24px;
}

.story-text h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.story-text p {
  font-size: 15px;
  color: var(--text-secondary);
}

.step-badge {
  display: block;
  width: fit-content;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-blue);
  margin-bottom: 6px;
}

/* Pied de page : e-mail à gauche, logo au centre, LinkedIn à droite */
.site-footer {
  padding: 40px 0 64px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.footer-contact {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Logo toujours au centre, quelle que soit la longueur des liens */
  justify-items: start;
  align-items: center;
  gap: 24px;
}

.footer-contact a {
  display: block;
  padding: 12px 0; /* Zone de clic d'environ 44px de haut */
  font-size: 15px;
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--accent-blue-hover);
}

.footer-contact a:last-child {
  justify-self: end; /* LinkedIn calé à droite */
}

/* Contour visible pour la navigation au clavier */
.footer-contact a:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.svg-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  opacity: 0.8;
}

.copyright {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Adaptation au plus petit site/écran */
@media (max-width: 640px) {
  :root {
    --space-section: 48px;
  }

  .hero {
    min-height: 80svh;
    padding: 64px 0;
  }

  .nav-meta {
    font-size: 13px;
  }

  /* Pied de page : e-mail, logo et LinkedIn empilés */
  .footer-contact {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .footer-contact a:last-child {
    justify-self: center;
  }
}
