/* ==========================================================
   style.css : la mise en page de tout le site.
   Astuce : dans VS Code, clique sur la petite flèche à gauche
   d'une ligne "#region" pour replier toute la partie.
   ========================================================== */

/* #region 1. Réglages de base (couleurs, polices, écart) */
:root {
  --blanc: #ffffff;
  --noir: #111111;
  --gris-clair: #e3e3e3;
  --gris-texte: #666666;

  --police-titre: "Syne", sans-serif;   /* titres et nom du site */
  --police-texte: "Jost", sans-serif;   /* menu et textes */

  --ecart: 60px;            /* espace entre deux images */
  --largeur-contenu: 70%;   /* largeur des images sur ordinateur */
  --hauteur-menu: 88px;     /* hauteur de la barre de menu */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--blanc);
  color: var(--noir);
  font-family: var(--police-texte);
  font-size: 1.125rem;
  line-height: 1.5;
}
/* #endregion */


/* #region 2. Barre de menu (en haut de toutes les pages) */
.entete {
  position: sticky;            /* reste visible quand on descend */
  top: 0;
  z-index: 10;
  display: flex;
  align-items: stretch;
  height: var(--hauteur-menu);
  padding: 0 clamp(20px, 4vw, 56px);
  background: var(--blanc);
  border-bottom: 1px solid var(--gris-clair);
}

.logo {                         /* ton nom, à gauche */
  display: flex;
  align-items: center;
  margin-right: clamp(32px, 5vw, 72px);
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--noir);
  text-decoration: none;
}

.menu {
  display: flex;
  align-items: stretch;
  gap: clamp(24px, 3vw, 44px);
}

.menu a {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--noir);
  text-decoration: none;
}

/* Le trait sous un lien : invisible par défaut */
.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--noir);
  transform: scaleX(0);
  transition: transform 0.15s;
}
.menu a:hover::after { transform: scaleX(1); background: var(--gris-texte); }

/* Le trait noir sous la page où on se trouve */
.menu a[aria-current="page"]::after { transform: scaleX(1); background: var(--noir); }

.menu a:focus-visible,
.logo:focus-visible { outline: 2px solid var(--noir); outline-offset: -4px; }

@media (prefers-reduced-motion: reduce) {
  .menu a::after { transition: none; }
}
/* #endregion */


/* #region 3. Page Portfolio : images les unes sous les autres */
.colonne {
  width: var(--largeur-contenu);
  margin: var(--ecart) auto;
  display: flex;
  flex-direction: column;
  gap: var(--ecart);            /* écart entre chaque image */
}

.colonne img {
  display: block;
  width: 100%;
  height: auto;
}

.video { aspect-ratio: 16 / 9; }          /* vidéo YouTube */
.video iframe { width: 100%; height: 100%; border: 0; display: block; }

.modele-3d iframe {                       /* modèle 3D Sketchfab */
  width: 100%;
  height: clamp(320px, 56vw, 640px);
  border: 0;
  display: block;
}
/* #endregion */


/* #region 4. Page Accueil (provisoire) */
.accueil {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(20px, 4vw, 56px);
}
.accueil h1 {
  margin: 0;
  font-family: var(--police-titre);
  font-weight: 800;
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.95;
}
.accueil p { margin: 16px 0 0; font-size: 1.4rem; color: var(--gris-texte); }
/* #endregion */


/* #region 5. Page CV */
.cv {
  width: min(var(--largeur-contenu), 820px);
  margin: var(--ecart) auto;
}
.cv img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gris-clair);
}
/* #endregion */


/* #region 6. Page Contact */
.contact {
  width: var(--largeur-contenu);
  margin: var(--ecart) auto;
  padding: 0;
  list-style: none;
}
.contact li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 28px 0;
  border-top: 1px solid var(--gris-clair);
}
.contact li:last-child { border-bottom: 1px solid var(--gris-clair); }
.contact span { color: var(--gris-texte); }
.contact a {
  font-family: var(--police-titre);
  font-weight: 700;
  font-size: clamp(1.3rem, 3.2vw, 2rem);
  color: var(--noir);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact a:hover { text-decoration: underline; text-underline-offset: 6px; }
/* #endregion */


/* #region 7. Téléphone (écrans étroits) */
@media (max-width: 700px) {
  :root { --largeur-contenu: 92%; --ecart: 32px; }

  .entete { height: auto; flex-wrap: wrap; }
  .logo   { width: 100%; height: 60px; margin-right: 0; font-size: 1.4rem; }
  .menu   { width: 100%; height: 52px; gap: 24px; }
  .menu a { font-size: 1.1rem; }
}
/* #endregion */
