/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { min-height: 100vh; line-height: 1.55; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }

/* --- Variables --- */
:root {
  --bg-primary: #000000;
  --bg-secondary: #0A0A0A;
  --surface-card: rgba(255, 255, 255, 0.04);
  --surface-card-alt: rgba(255, 255, 255, 0.06);
  --surface-card-hover: rgba(255, 255, 255, 0.1);
  --border-main: rgba(255, 255, 255, 0.16);
  --border-soft: rgba(255, 255, 255, 0.09);

  --text-main: #FFFFFF;
  --text-secondary: #BBBBC1;
  --text-tertiary: #8A8A91;
  --text-quaternary: #78787F;

  --color-accent: #8AA05C;
  --color-accent-light: #A8BC7E;
  --color-accent-dark: #6B7F43;
  /* Même vert que --color-accent, en R, G, B : permet rgba(var(--color-accent-rgb), 0.3) */
  --color-accent-rgb: 138, 160, 92;

  --bg-nav: rgba(0, 0, 0, 0.75);
  --bg-modal-overlay: rgba(0, 0, 0, 0.82);

  --font-main: 'Poppins', system-ui, sans-serif; /* police unique du site */

  --fs-xs: 11px;
  --fs-sm: 12.5px;
  --fs-base: 14px;
  --fs-md: 15.5px;
  --fs-lg: 17px;
  --fs-xl: 23px;
  --fs-2xl: 28px;
  --fs-hero: 84px;

  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 40px;
  --space-3xl: 56px;
  --space-4xl: 64px;
  --space-6xl: 128px;

  --radius-btn: 0; /* coins des boutons : 0 = carré */
  --radius-card: 0; /* coins des cartes, blocs, images et fenêtres : 0 = carré */
  --radius-badge: 0; /* coins des bulles (badges) : 0 = carré */
  --radius-project: 0; /* coins des cartes projets : 0 = carré */
}

/* Sections à fond blanc : on redéfinit les mêmes variables avec des couleurs claires */
.section--light {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F5F5F5;
  --surface-card: #FFFFFF;
  --surface-card-alt: rgba(0, 0, 0, 0.04);
  --surface-card-hover: rgba(0, 0, 0, 0.07);
  --border-main: rgba(0, 0, 0, 0.14);
  --border-soft: rgba(0, 0, 0, 0.08);

  --text-main: #000000;
  --text-secondary: #45454B;
  --text-tertiary: #6B6B72;
  --text-quaternary: #70707A;

  --color-accent: #5C7A34;
  --color-accent-light: #4F6B2C;
  --color-accent-dark: #4F6B2C;

  background: var(--bg-primary);
  color: var(--text-main);
}

/* --- Base --- */
body {
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  flex-shrink: 0;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section { padding: var(--space-3xl) 0; }

/* --- Titres de section --- */
/* Petites étiquettes en majuscules (« // Stack », « // outils »…) */
.modal__label, .mega-menu__preview-label, .contact-strip__label {
  font-size: var(--fs-xs);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.section-header { margin-bottom: var(--space-3xl); }

.section-title {
  margin-top: var(--space-md);
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.01em;
}

.section-intro {
  max-width: 640px;
  margin-top: var(--space-md);
  font-size: var(--fs-md);
  color: var(--text-secondary);
}

/* --- Boutons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-btn);
  font-size: var(--fs-base);
  font-weight: 500;
}

/* Bouton « Voir mes projets » : deux coins coupés en diagonale, fond vert au survol */
.btn--race {
  height: 48px;
  padding: 0 22px 0 18px;
  border: 1.5px solid var(--text-main);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  transition: background-color .3s, border-color .3s, color .3s;
}

.btn--race:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #000;
}

/* Boutons qui ne contiennent qu'une icône : l'icône est centrée */
.btn-icon, .project-card__link, .modal__close, .mega-menu__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Liens ronds CV / GitHub / LinkedIn / Email de l'accueil */
.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background-color .2s, color .2s;
}

.btn-icon:hover { background: var(--color-accent); color: #000; }
.btn-icon--text { font-size: 12px; font-weight: 700; }

.project-card__link, .modal__close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-btn);
  background: var(--surface-card-alt);
  border: 1px solid var(--border-main);
}

/* --- Barre de navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 64px;
  display: flex;
  align-items: center;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-soft);
}

/* 3 colonnes : bouton Menu à gauche, nom au centre, colonne vide à droite pour garder le nom centré */
.navbar .container {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.menu-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  height: 40px;
  padding: 0 4px;
  border: 0;
  font-size: var(--fs-base);
  color: var(--text-secondary);
}

.menu-toggle:hover { color: var(--text-main); }

.brand {
  justify-self: center;
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* --- Menu plein écran --- */
.mega-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  visibility: hidden;
}

.mega-menu.is-open { visibility: visible; }

.mega-menu__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg-modal-overlay);
}

/* Le panneau est caché à gauche de l'écran, puis glisse vers la droite à l'ouverture */
.mega-menu__panel {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .45s ease;
}

.mega-menu.is-open .mega-menu__panel { transform: translateX(0); }

.mega-menu__links-col {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--space-2xl) var(--space-xl);
  background: var(--bg-primary);
}

.mega-menu__links {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.mega-menu__links a {
  display: block;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.mega-menu__links a:hover { color: var(--color-accent); }

.mega-menu__preview-col {
  display: none;
  flex: 1;
  padding: var(--space-2xl) var(--space-xl);
  overflow-y: auto;
  background: #EDEDEE;
  color: #15121A;
}

.mega-menu__void-col {
  display: none;
  position: relative;
  flex: 1;
}

.mega-menu__close {
  position: absolute;
  top: var(--space-xl);
  left: var(--space-xl);
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: background-color .2s;
}

.mega-menu__close:hover { background: rgba(255, 255, 255, 0.18); }
.mega-menu__close .icon { width: 26px; height: 26px; }

.mega-menu__preview-label {
  margin-bottom: var(--space-lg);
  color: rgba(21, 18, 26, 0.55);
}

.mega-menu__preview-list li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(21, 18, 26, 0.1);
}

.mega-menu__preview-list li:first-child { border-top: 0; }

.mega-menu__preview-name { font-size: var(--fs-lg); font-weight: 600; }

.mega-menu__preview-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-card);
}

.mega-menu__preview-tag {
  padding: 4px 12px;
  border-radius: var(--radius-badge);
  background: rgba(var(--color-accent-rgb), 0.12);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-accent-dark);
}

/* --- Accueil --- */
.hero {
  min-height: calc(82vh + 32px);
  display: flex;
  align-items: flex-end;
  background: radial-gradient(ellipse 900px 600px at 82% 8%, rgba(var(--color-accent-rgb), 0.16), transparent 60%);
}

.hero__content {
  padding-top: 140px;
  padding-bottom: var(--space-4xl);
}

.hero__category {
  font-size: var(--fs-sm);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.hero__category-slash, .hero__role-divider { color: var(--text-quaternary); }
.hero__role-divider { margin: 0 var(--space-xs); }

.hero__name {
  margin-top: var(--space-md);
  font-size: 48px;
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero__role {
  margin-top: var(--space-sm);
  font-size: 20px;
  color: var(--text-secondary);
}

.hero__description {
  max-width: 560px;
  margin-top: var(--space-md);
  font-size: var(--fs-md);
  color: var(--text-secondary);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.hero__secondary {
  display: flex;
  gap: var(--space-xs);
}

/* --- Projets (tuiles plein écran façon « Ferrari ») --- */
/* La section n'a pas de titre : les tuiles commencent directement, sans marge */
#projects.section { padding: 0; }

/* Sur mobile : une tuile sous l'autre, sur toute la largeur de l'écran */
.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.project-card {
  position: relative;
  aspect-ratio: 945 / 812; /* même proportion que les tuiles du modèle */
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-project);
  background: #1a1a1a; /* fond affiché si l'image ne charge pas */
  color: #fff;
  text-align: center;
  isolation: isolate;
}

/* Image de fond qui remplit toute la tuile, avec léger zoom au survol */
.project-card__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.project-card:hover .project-card__image { transform: scale(1.06); }

/* Dégradé sombre en bas pour que le texte blanc reste lisible sur n'importe quelle image */
.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.35) 65%, rgba(0, 0, 0, 0.8));
  transition: opacity .4s ease;
}

.project-card__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--space-lg) 56px;
  max-width: 720px;
}

/* Petite catégorie au-dessus du titre (« Collections », « Magazine »… sur le modèle) */
.project-card__badge {
  font-size: var(--fs-md);
  font-weight: 500;
  color: #fff;
}

/* Grand titre en majuscules */
.project-card__title {
  margin-top: var(--space-md);
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.project-card__subtitle {
  display: block;
  margin-top: var(--space-xs);
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}

/* « DÉCOUVRIR » + bouton rond avec la flèche */
.project-card__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-card .project-card__link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  transition: background-color .3s, border-color .3s, color .3s;
}

.project-card:hover .project-card__link {
  background: #fff;
  border-color: #fff;
  color: #000;
}

/* --- Fenêtre de détail d'un projet --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal.is-open { display: flex; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--bg-modal-overlay);
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--radius-card);
  background: var(--bg-secondary);
  border: 1px solid var(--border-main);
}

/* L'en-tête reste visible en haut quand on fait défiler la fenêtre */
.modal__header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 20px var(--space-lg);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-soft);
}

.modal__header h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: 6px;
  font-size: var(--fs-xs);
}

.period-tag { color: var(--text-tertiary); }
.exam-tag { color: var(--color-accent); }

.modal__close { color: var(--text-secondary); }

.modal__close:hover {
  background: var(--surface-card-hover);
  color: var(--text-main);
}

.modal__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-lg);
}

.modal__thumb {
  height: 176px;
  overflow: hidden;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
}

.modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__text {
  font-size: var(--fs-md);
  color: var(--text-secondary);
}

.modal__label { margin-bottom: var(--space-sm); }

.checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.checklist li {
  display: flex;
  gap: var(--space-sm);
  font-size: var(--fs-base);
  color: var(--text-secondary);
}

.checklist .icon {
  margin-top: 3px;
  color: var(--color-accent);
}

.modal__columns {
  display: grid;
  gap: var(--space-md);
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-md);
}

.tag {
  padding: 2px 8px;
  border-radius: var(--radius-card);
  background: var(--surface-card-alt);
  border: 1px solid var(--border-soft);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
}

.compact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.compact-list li {
  display: flex;
  gap: var(--space-xs);
  font-size: 13px;
  color: var(--text-secondary);
}

/* \2192 = flèche →, écrite en code pour éviter les problèmes d'encodage */
.compact-list li::before {
  content: "\2192";
  color: var(--color-accent);
}

/* --- Référentiel BTS SIO --- */
/* Mise en page « document » : grand numéro d'épreuve en italique, tableau à filets horizontaux,
   coches tracées à la main (icône #icon-check-hand), point gris pour une case vide */
.requirements-block + .requirements-block { margin-top: 72px; }

.requirements-block__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs) 20px;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--text-main);
}

.requirements-block__badge {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 52px;
  font-style: italic;
  line-height: 1;
  color: var(--color-accent);
}

.requirements-block__header h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 400;
}

/* Tableau réalisations × compétences, sur le modèle du tableau de synthèse officiel du BTS SIO */
.req-matrix-wrap { overflow-x: auto; }

.req-matrix {
  width: 100%;
  border-collapse: collapse;
}

.req-matrix th, .req-matrix td { border-bottom: 1px solid var(--border-soft); }

.req-matrix thead th {
  min-width: 120px;
  padding: 18px var(--space-sm) var(--space-sm);
  vertical-align: top; /* codes et intitulés alignés sur la même ligne */
  text-align: left;
  font-size: var(--fs-sm);
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-secondary);
}

/* « Réalisations \ Compétences » : gardé pour les lecteurs d'écran, invisible à l'écran */
.req-matrix thead .req-matrix__corner { color: transparent; }

.req-matrix__code {
  display: block;
  margin-bottom: 4px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--text-tertiary);
}

.req-matrix tbody th {
  padding: 14px var(--space-sm) 14px 0;
  text-align: left;
  white-space: nowrap;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 400;
}

.req-matrix td {
  padding: 10px;
  text-align: center;
}

/* Case vide : petit point gris */
.req-matrix td:empty::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-main);
}

.req-matrix .icon {
  width: 26px;
  height: 26px;
  color: var(--color-accent);
}

/* --- Contact --- */
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 100%;
  word-break: break-all; /* l'adresse peut passer à la ligne sur les petits écrans */
  margin-top: var(--space-xl);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-main);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.contact-email:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.contact-email .icon { width: 20px; height: 20px; }

.contact-strip {
  display: grid;
  gap: var(--space-xl);
  margin-top: var(--space-4xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-soft);
}

.contact-strip__label { margin-bottom: var(--space-sm); }

.contact-strip__value {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-md);
  font-weight: 500;
}

.contact-strip__note {
  margin-top: 2px;
  font-size: var(--fs-sm);
  color: var(--text-tertiary);
}

.contact-strip__links { gap: var(--space-md); }
.contact-strip__links a:hover { color: var(--color-accent); }

/* --- Pied de page --- */
.site-footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-soft);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.site-footer__mention { font-size: var(--fs-base); color: var(--text-tertiary); }
.site-footer__session { font-size: 11.5px; color: var(--text-quaternary); }

/* --- Écrans larges (tablette et ordinateur) --- */
/* Le site est d'abord écrit pour le mobile, puis ce bloc adapte la mise en page à partir de 760px */
@media (min-width: 760px) {
  .section { padding: var(--space-6xl) 0; }
  .section-title { font-size: 72px; }
  .hero__name { font-size: var(--fs-hero); }

  /* Menu : les 3 colonnes s'affichent côte à côte */
  .mega-menu__panel { flex-direction: row; }
  .mega-menu__preview-col, .mega-menu__void-col { display: block; }

  /* Deux tuiles par rangée, collées les unes aux autres */
  .project-list { grid-template-columns: 1fr 1fr; }
  .project-card { min-height: 0; }

  .modal__columns { grid-template-columns: 1fr 1fr; }

  .contact-email { font-size: 28px; }
  .contact-strip { grid-template-columns: repeat(3, 1fr); }

  .site-footer .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* --- Page Chrono-Paddock (chrono-paddock.html, sans JavaScript) --- */
/* Mise en page inspirée d'une présentation : une section = une diapo, texte d'un côté, visuel de l'autre.
   Titres en Georgia (police installée sur les ordinateurs), texte en Poppins, couleurs du portfolio. */

.cp-slide {
  position: relative;
  display: flex;
  align-items: center;
  padding: 104px 0 72px;
  background: var(--bg-primary);
  color: var(--text-main);
}

.cp-slide--cover {
  background: radial-gradient(ellipse 900px 600px at 82% 8%, rgba(var(--color-accent-rgb), 0.16), transparent 60%), var(--bg-primary);
}

.cp-slide .container { width: 100%; }

.cp-slide__inner {
  display: grid;
  align-items: center;
  gap: var(--space-2xl);
}

/* Les éléments de la grille peuvent rétrécir : un extrait de code large défile au lieu d'élargir la page */
.cp-slide__inner > * { min-width: 0; }

.cp-slide__visual { margin: 0; }

/* Numéro de diapo en bas à droite */
.cp-slide__num {
  position: absolute;
  right: var(--space-lg);
  bottom: var(--space-md);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  color: var(--text-quaternary);
}

/* Surtitre : petites majuscules espacées, en couleur */
.cp-kicker {
  margin-bottom: var(--space-md);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.cp-kicker--muted { margin-bottom: var(--space-sm); color: var(--text-tertiary); }

/* Titre à empattements, un mot en italique et en couleur */
.cp-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.cp-title em { font-style: italic; color: var(--color-accent); }
.cp-title--cover { font-size: 48px; line-height: 1.02; }

.cp-subtitle {
  margin-top: var(--space-md);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-style: italic;
  color: var(--text-secondary);
}

.cp-lead {
  max-width: 500px;
  margin-top: var(--space-lg);
  font-size: var(--fs-base);
  color: var(--text-secondary);
}

/* Phrase mise en valeur, comme « Le paradoxe » de la présentation */
.cp-quote {
  max-width: 500px;
  margin-top: var(--space-lg);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.45;
}


/* Légende sous un visuel */
.cp-caption {
  margin-top: var(--space-sm);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: var(--fs-sm);
  font-style: italic;
  color: var(--text-tertiary);
}

.cp-note { margin-top: var(--space-lg); font-size: var(--fs-sm); color: var(--text-tertiary); }

code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; color: var(--color-accent-light); }

/* Sommaire de la couverture */
.cp-plan {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin-top: var(--space-2xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-soft);
}

.cp-plan a { font-size: var(--fs-sm); color: var(--text-secondary); transition: color .2s; }
.cp-plan a span { margin-right: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--color-accent); }
.cp-plan a:hover { color: var(--text-main); }

/* Visuel de couverture : un temps au tour */
.cp-chrono {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border-main);
  border-bottom: 1px solid var(--border-main);
}

.cp-chrono__label { font-size: var(--fs-xs); letter-spacing: .18em; text-transform: uppercase; color: var(--text-tertiary); }
.cp-chrono__time { font-size: 64px; font-weight: 300; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Liste à filets : un titre court puis une explication */
.cp-list li {
  display: grid;
  gap: 2px;
  padding: 14px 0;
  border-top: 1px solid var(--border-soft);
}

.cp-list li:last-child { border-bottom: 1px solid var(--border-soft); }
.cp-list strong { font-size: var(--fs-md); font-weight: 600; }
.cp-list span { font-size: 13.5px; color: var(--text-secondary); }
.cp-list--compact { margin-top: var(--space-lg); }
.cp-list--compact li { padding: 10px 0; }
.cp-list--compact strong { font-size: var(--fs-base); }

.cp-list--numbered { counter-reset: objectif; }
.cp-list--numbered li { counter-increment: objectif; position: relative; padding-left: 44px; }

.cp-list--numbered li::before {
  content: counter(objectif, decimal-leading-zero);
  position: absolute;
  top: 15px;
  left: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-style: italic;
  color: var(--color-accent);
}

.cp-list--roles strong { font-family: Georgia, 'Times New Roman', serif; font-size: 20px; font-weight: 400; }

/* Points clés courts */
.cp-points { display: flex; flex-direction: column; gap: 10px; margin-top: var(--space-lg); }

.cp-points li {
  font-size: 13.5px;
  color: var(--text-secondary);
}
.cp-points strong { font-weight: 600; color: var(--text-main); }

/* Schéma MVC : éléments écrits sans cadre, reliés par des traits fins, étapes numérotées de 1 à 6 */
.cp-diag { display: block; width: 100%; height: auto; overflow: visible; }
.cp-diag__lien { stroke: var(--text-quaternary); stroke-width: 1; }
.cp-diag__tete { fill: none; stroke: var(--text-quaternary); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cp-diag__nom { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; fill: var(--text-main); }
.cp-diag__nom--accent { font-style: italic; fill: var(--color-accent); }
.cp-diag__note { font-family: var(--font-main); font-size: 11.5px; fill: var(--text-tertiary); }
.cp-diag__etape { font-family: var(--font-main); font-size: 11.5px; fill: var(--text-secondary); }
.cp-diag__num { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 14px; fill: var(--color-accent); }

/* Parcours en étapes numérotées */
.cp-steps { counter-reset: etape; display: flex; flex-direction: column; gap: 10px; margin-top: var(--space-lg); }

.cp-steps li {
  counter-increment: etape;
  position: relative;
  padding-left: 34px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.cp-steps li::before {
  content: counter(etape);
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-accent);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-accent);
}

/* Extrait de code */
.cp-code {
  overflow-x: auto;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border-left: 3px solid var(--color-accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-main);
}

.cp-code code { font-size: inherit; color: inherit; }

/* Bilan : une phrase en italique à gauche, le texte à droite (première personne) */
.cp-bilan2 { display: grid; gap: var(--space-2xl); margin-top: var(--space-2xl); align-items: start; }
.cp-bilan2__citation { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 30px; font-style: italic; line-height: 1.3; color: var(--color-accent); }
.cp-bilan2__texte p { max-width: 560px; font-size: 15px; line-height: 1.7; color: var(--text-secondary); }
.cp-bilan2__texte p + p { margin-top: var(--space-md); }
.cp-bilan2__code { font-family: Georgia, 'Times New Roman', serif; font-style: italic; color: var(--text-tertiary); }

.cp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); margin-top: var(--space-2xl); }

@media (min-width: 760px) {
  .cp-slide__inner { grid-template-columns: 1fr 1fr; gap: var(--space-4xl); }
  .cp-slide--reverse .cp-slide__visual { order: -1; } /* visuel à gauche, texte à droite */
  .cp-title { font-size: 46px; }
  .cp-title--cover { font-size: 64px; }
  .cp-chrono__time { font-size: 88px; }
  .cp-bilan2 { grid-template-columns: 5fr 6fr; gap: var(--space-4xl); }
  .cp-bilan2__citation { font-size: 34px; }
}

/* Effet diapo sur grand écran : chaque section occupe l'écran et le défilement s'arrête dessus */
@media (min-width: 1000px) and (min-height: 640px) {
  .cp-snap { scroll-snap-type: y mandatory; scroll-padding-top: 0; }
  .cp-slide { min-height: 100vh; padding: 88px 0 48px; scroll-snap-align: start; }
  .cp-footer { scroll-snap-align: end; }
}

/* --- Mon parcours : carrousel (index.html, section #parcours) --- */
/* Sans JavaScript : les étapes défilent horizontalement (scroll-snap) et les points sont des liens.
   Avec script.js : les flèches apparaissent et le point de l'étape affichée est entouré. */
.carousel { position: relative; }

.carousel__track {
  position: relative; /* les étapes se positionnent par rapport à la piste (utilisé par script.js) */
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none; /* barre de défilement cachée (Firefox) */
}

.carousel__track::-webkit-scrollbar { display: none; } /* barre de défilement cachée (Chrome, Safari) */
.carousel__track:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; }

.carousel__slide {
  flex: 0 0 100%;
  display: grid;
  align-items: center;
  gap: var(--space-xl);
  scroll-snap-align: start;
}

.carousel__date {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--color-accent);
}

.carousel__title {
  margin-top: var(--space-sm);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.carousel__desc {
  max-width: 440px;
  margin-top: var(--space-lg);
  font-size: var(--fs-md);
  color: var(--text-secondary);
}

/* Visuel typographique : l'année en très grand */
.carousel__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
}

.carousel__year {
  font-size: clamp(88px, 24vw, 168px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--color-accent);
}

/* Flèches : cachées tant que script.js n'a pas démarré le carrousel */
.carousel__arrow {
  display: none;
  position: absolute;
  z-index: 1;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--text-main);
  transition: color .2s, opacity .2s;
}

.carousel.is-ready .carousel__arrow { display: inline-flex; }
.carousel__arrow:hover { color: var(--color-accent); }
.carousel__arrow:disabled { opacity: .25; cursor: default; }
.carousel__arrow .icon { width: 26px; height: 26px; }

/* Sur mobile, les flèches sont sous le carrousel, de part et d'autre des points */
.carousel__arrow--prev { left: -10px; bottom: -74px; }
.carousel__arrow--next { right: -10px; bottom: -74px; }

/* Bas du carrousel : points, trait, lien vers le CV */
.carousel__footer {
  display: flex;
  flex-direction: column; /* mobile : points (entre les flèches), puis lien CV en dessous */
  align-items: center;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-2xl);
}

.carousel__dots { display: flex; align-items: center; gap: var(--space-xs); }

.carousel__dot {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carousel__dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-main);
  transition: width .3s, height .3s, background-color .3s;
}

/* Étape affichée : le point grossit et passe en vert */
.carousel__dot.is-active::before { width: 11px; height: 11px; background: var(--color-accent); }

.carousel__line { display: none; width: 90px; height: 1px; background: var(--text-main); }

.carousel__cv {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.carousel__cv:hover { color: var(--color-accent); }

@media (min-width: 760px) {
  /* Texte à gauche, visuel à droite ; de la place de chaque côté pour les flèches */
  .carousel__slide { grid-template-columns: 1fr 1fr; gap: var(--space-4xl); padding: 0 var(--space-4xl); }
  .carousel__title { font-size: 40px; }
  .carousel__visual { aspect-ratio: 9 / 10; }
  .carousel__year { font-size: clamp(96px, 11vw, 150px); }
  .carousel__arrow--prev { left: 0; bottom: auto; top: 50%; transform: translateY(-50%); }
  .carousel__arrow--next { right: 0; bottom: auto; top: 50%; transform: translateY(-50%); }
  .carousel__line { display: block; }
  .carousel__footer { flex-direction: row; }
}

/* --- Veille : actualités en quinconce, chaque titre sur un post-it --- */
.watch-list { display: flex; flex-direction: column; gap: var(--space-3xl); }

.watch-item { display: grid; gap: var(--space-lg); }

/* Post-it : papier vert pâle (tiré de la couleur du portfolio), bande adhésive en haut,
   ombre et coin inférieur droit légèrement décollé */
.watch-item__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: 34px var(--space-lg) var(--space-lg);
  background: linear-gradient(180deg, #E6ECCF 0%, #DCE4BF 100%);
  color: #1A1A1A;
  border-bottom-right-radius: 60px 8px; /* coin qui se soulève */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 6px 14px 18px -10px rgba(0, 0, 0, 0.8);
}

/* Bande adhésive */
.watch-item__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  background: rgba(0, 0, 0, 0.05);
}

.watch-item__date { font-size: 12px; font-weight: 500; letter-spacing: .04em; color: #4F6B2C; }
.watch-item__date .icon { display: none; }

.watch-item__card h4 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
}

/* Type de menace : simple mention en italique en bas du post-it */
.watch-item__card .tag {
  margin-top: auto;
  padding: 0;
  background: none;
  border: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-style: italic;
  color: #55594A;
}

.watch-item__text p { font-size: 15px; color: var(--text-secondary); }
.watch-item__text .watch-key { margin-top: var(--space-xs); font-size: 14px; }

/* « Protection clé : » et « À retenir : » en début de phrase */
.watch-key span { font-weight: 600; color: var(--text-main); }
.watch-key span::after { content: " : "; }

@media (min-width: 760px) {
  /* Post-it à gauche, texte à droite ; l'actualité suivante est inversée et décalée vers la droite */
  .watch-item {
    max-width: 880px;
    grid-template-columns: 240px 1fr;
    align-items: center;
    gap: var(--space-2xl);
  }

  .watch-item__card { aspect-ratio: 1 / 1; transform: rotate(-1.5deg); }

  .watch-item:nth-child(even) { margin-left: auto; grid-template-columns: 1fr 240px; }
  .watch-item:nth-child(even) .watch-item__card { order: 2; transform: rotate(1.5deg); }
}
