/* ---------------------------------------------------------------
   Variables — palette crème, moutarde, laiton
   --------------------------------------------------------------- */

:root {
  --creme: #faf6ee; /* fond principal */
  --sable: #efe7d6; /* fond secondaire, texte clair sur fond sombre */
  --sauge: #b9a88a; /* filets et bordures sur fond sombre */
  --olive: #5b5249; /* texte secondaire, dates, légendes */
  --foret: #241f1a; /* blocs sombres, titres */
  --dore: #ac8f47; /* accent, bouton, soulignements */
  --brun: #5b5249; /* texte courant adouci */
  --encre: #241f1a; /* texte principal */

  --bordure: #ded3bf;

  /* voiles translucides posés sur le fond crème : assez légers pour
     que le texte foncé reste parfaitement lisible par-dessus */
  --voile-sombre: rgba(36, 31, 26, 0.04);
  --voile-dore: rgba(172, 143, 71, 0.09);
  --voile-banniere: rgba(36, 31, 26, 0.85);

  --police-titre: "Playfair Display", Georgia, serif;
  --police-texte: "Inter", system-ui, sans-serif;
}

/* ---------------------------------------------------------------
   Base
   --------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* on respecte le réglage système "réduire les animations" */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background-color: var(--creme);
  color: var(--encre);
  font-family: var(--police-texte);
  font-size: 16px;
  line-height: 1.6;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
}

a {
  color: var(--foret);
  text-decoration-color: var(--dore);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--foret);
  outline-offset: 3px;
}

.lien-evitement {
  position: absolute;
  top: -60px;
  left: 10px;
  z-index: 20;
  padding: 10px 16px;
  background-color: var(--encre);
  color: var(--creme);
  text-decoration: none;
}

.lien-evitement:focus {
  top: 10px;
}

/* ---------------------------------------------------------------
   En-tête et navigation
   --------------------------------------------------------------- */

.entete {
  display: flex;
  flex-direction: column;
}

.entete-barre {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background-color: var(--creme);
  border-bottom: 1px solid var(--bordure);
}

.logo a img {
  display: block;
  width: 56px;
  height: auto;
}

.navbar {
  display: flex;
  flex-direction: column;
}

.burger-bouton {
  padding: 8px;
  border: 1px solid var(--bordure);
  border-radius: 4px;
  background-color: transparent;
  color: var(--foret);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.burger-bouton:hover {
  border-color: var(--dore);
}

/* la liste devient un panneau déroulant sur mobile */
.nav-liste {
  position: absolute;
  top: 80px;
  right: 0;
  left: 0;
  z-index: 10;
  margin: 0;
  padding-left: 0;
  list-style: none;
  background-color: var(--creme);
  border-bottom: 1px solid var(--bordure);
}

.nav-liste li a {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid var(--bordure);
  color: var(--encre);
  text-decoration: none;
  text-align: center;
}

.nav-liste li:last-child a {
  border-bottom-width: 0;
}

.nav-liste li a:hover,
.nav-liste li a.lien-actif {
  color: var(--foret);
  box-shadow: inset 3px 0 0 var(--dore);
}

/* états du menu : la classe nav-hide est posée par le JS sur #navbar */
#navbar.nav-hide .nav-liste {
  display: none;
}

#navbar.nav-hide .ti-x {
  display: none;
}

#navbar:not(.nav-hide) .ti-menu-2 {
  display: none;
}

/* ---------------------------------------------------------------
   Bannière
   --------------------------------------------------------------- */

.banner {
  position: relative;
  overflow: hidden;
  padding: 60px 20px 70px;
  background-color: var(--foret);
  color: var(--creme);
}

/* diaporama : les trois images sont superposées, seule .est-active est visible */
.banner-diapos {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.banner-diapo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.banner-diapo.est-active {
  opacity: 1;
}

/* logo carré sur fond blanc : affiché en entier, calé à droite du panneau */
.banner-diapo-logo {
  object-fit: contain;
  object-position: right center;
  background-color:#391e27;
}

@media (prefers-reduced-motion: reduce) {
  .banner-diapo {
    transition: none;
  }
}

/* le panneau et les contrôles passent au-dessus des images */
.banner-contenu,
.banner-controles {
  position: relative;
  z-index: 1;
}

.banner-controles {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 4px 6px;
  border-radius: 20px;
  background-color: var(--voile-banniere);
}

/* zone cliquable de 24px, point visible de 10px */
.banner-point {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background-color: transparent;
  cursor: pointer;
}

.banner-point::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid var(--sable);
  border-radius: 50%;
}

.banner-point[aria-current="true"]::before {
  border-color: var(--dore);
  background-color: var(--dore);
}

.banner-pause {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--olive);
  border-radius: 50%;
  background-color: transparent;
  color: var(--sable);
  font-size: 15px;
  cursor: pointer;
}

.banner-pause:hover,
.banner-point:hover::before {
  border-color: var(--dore);
}

.banner-point:focus-visible,
.banner-pause:focus-visible {
  outline: 2px solid var(--sable);
  outline-offset: 1px;
}

/* panneau translucide posé sur l'image, derrière le texte uniquement */
.banner-contenu {
  max-width: 820px;
  padding: 30px 26px 34px;
  background-color: #38111b;
}

.banner-eyebrow {
  max-width: 150px;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--sauge);
  color: var(--sauge);
  font-size: 14px;
}

.banner-titre {
  margin: 0 0 16px;
  font-family: var(--police-titre);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
}

.banner-texte {
  max-width: 740px;
  margin: 0 0 28px;
  color: var(--sable);
}

.banner-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}

.banner .bouton:focus-visible {
  outline-color: var(--sable);
}

/* ---------------------------------------------------------------
   Boutons
   --------------------------------------------------------------- */

.bouton {
  display: inline-block;
  padding: 12px 26px;
  background-color: #d3dea2;
  color: var(--encre);
  text-decoration: none;
  font-weight: 500;
}

.bouton:hover {
  background-color: var(--foret);
  color: var(--creme);
}

.bouton-secondaire {
  border: 1px solid var(--sauge);
  background-color: transparent;
  color: var(--creme);
}

.bouton-secondaire:hover {
  border-color: var(--dore);
  background-color: transparent;
  color: rgb(247, 248, 217);
}

/* ---------------------------------------------------------------
   Sections
   --------------------------------------------------------------- */

.section {
  padding: 56px 20px;
  border-bottom: 1px solid var(--bordure);
}

/* bandes alternées : les sections se distinguent sans changer
   la couleur du texte, les voiles étant à 4 et 9 % d'opacité */
.section:nth-of-type(odd) {
  background-color: var(--voile-dore);
}

.section:nth-of-type(even) {
  background-color: var(--voile-sombre);
}

.section:last-child {
  border-bottom-width: 0;
}

.section-titre {
  margin: 0 0 28px;
  color: rgb(100, 2, 2);
  font-family: var(--police-titre);
  font-size: 30px;
  font-weight: 500;
}

.sous-titre {
  margin: 40px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bordure);
  color: var(--olive);
  font-size: 15px;
  font-weight: 600;
}

.sous-titre:first-of-type {
  margin-top: 0;
}

/* ---------------------------------------------------------------
   À propos
   --------------------------------------------------------------- */

.apropos-corps {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.apropos-texte {
  max-width: 620px;
}

.apropos-texte p {
  margin: 0 0 18px;
  color: var(--brun);
}

.apropos-texte p:last-child {
  margin-bottom: 0;
}

.encart-alternance {
  padding: 26px 24px;
  background-color: #c2b46b;
  color: var(--creme);
}

.encart-titre {
  margin: 0 0 18px;
  font-family: var(--police-titre);
  font-size: 22px;
  font-weight: 500;
}

.encart-liste {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 24px;
}

.encart-ligne {
  display: flex;
  flex-direction: column;
}

.encart-label {
  margin: 0;
  color: #000000;
  font-size: 13px;
}

.encart-valeur {
  margin: 2px 0 0;
  color: var(--creme);
}

/* ---------------------------------------------------------------
   Parcours
   --------------------------------------------------------------- */

.parcours-liste {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.parcours-item {
  padding: 0 0 24px 20px;
  border-left: 2px solid var(--bordure);
}

.parcours-item:last-child {
  padding-bottom: 0;
}

.parcours-date {
  margin: 0 0 4px;
  color: var(--olive);
  font-size: 13px;
}

.parcours-poste {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 600;
}

.parcours-lieu {
  margin: 0;
  color: var(--brun);
  font-size: 15px;
}

.parcours-details {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--brun);
  font-size: 15px;
}

.parcours-details li {
  margin-bottom: 4px;
}

/* ---------------------------------------------------------------
   Compétences
   --------------------------------------------------------------- */

.competences-groupes {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.groupe-titre {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--foret);
  font-size: 17px;
  font-weight: 600;
}

.groupe-titre i {
  color: var(--dore);
  font-size: 20px;
}

.groupe-liste {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.groupe-liste li {
  padding: 6px 14px;
  border: 1px solid var(--bordure);
  color: var(--brun);
  font-size: 14px;
}

.groupe-liste-texte {
  flex-direction: column;
}

.groupe-liste-texte li {
  border-width: 0;
  padding: 0;
  font-size: 15px;
}

/* ---------------------------------------------------------------
   Projets
   --------------------------------------------------------------- */

.projets-cartes {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.projet {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--bordure);
  border-top: 3px solid var(--dore);
}

.projet-contexte {
  margin: 0 0 6px;
  color: var(--olive);
  font-size: 13px;
}

.projet-titre {
  margin: 0 0 10px;
  color: var(--foret);
  font-family: var(--police-titre);
  font-size: 24px;
  font-weight: 500;
}

.projet-resume {
  margin: 0 0 14px;
  color: var(--brun);
}

.projet-galerie {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 0 20px;
  padding-left: 0;
  list-style: none;
}

.projet-galerie img {
  display: block;
  width: 100%;
  height: 190px;
  border: 1px solid var(--bordure);
  object-fit: cover;
  object-position: top left;
}

.projet-galerie a:hover img {
  border-color: var(--dore);
}

.projet-legende {
  margin: 6px 0 0;
  color: var(--olive);
  font-size: 13px;
}

.projet-details {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--brun);
  font-size: 15px;
}

.projet-details li {
  margin-bottom: 4px;
}

.projet-technos {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  padding-left: 0;
  list-style: none;
}

.projet-technos li {
  padding: 4px 10px;
  background-color: var(--creme);
  border: 1px solid var(--bordure);
  color: var(--olive);
  font-size: 13px;
}

.projet-liens {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: auto 0 0;
  font-size: 15px;
}

.projet-liens a {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

/* ---------------------------------------------------------------
   Pied de page
   --------------------------------------------------------------- */
.pied-page {
  display: flex;
  justify-content: center;
  padding: 32px 20px;
  border-top: 1px solid var(--bordure);
  background-color: #38111b;
  color: #b9a88a;
  width: 100%;
}

.logo-pied-page img {
  width: 100px;
  background-color: #b9a88a;
  margin-right: 20px;
}

/* .text-pied-page {
  width: 50%;
} */

.pied-page-texte {
  margin: 0 0 16px;
  font-size: 15px;
}

.pied-page-liens {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 15px;
}

.pied-page-liens a {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: #b9a88a;
}

/* ---------------------------------------------------------------
   Desktop
   --------------------------------------------------------------- */

@media screen and (min-width: 1024px) {
  /* colonne de contenu centrée à 1100px, avec 60px de marge minimum.
     le fond des sections reste sur toute la largeur de l'écran */
  :root {
    --marge-centre: max(60px, calc((100% - 1100px) / 2));
  }

  .entete-barre {
    padding-top: 16px;
    padding-bottom: 16px;
    padding-left: var(--marge-centre);
    padding-right: var(--marge-centre);
  }

  .logo a img {
    width: 100px;
  }

  .burger-bouton {
    display: none;
  }

  /* le panneau redevient une barre horizontale */
  .nav-liste,
  #navbar.nav-hide .nav-liste {
    display: flex;
    position: static;
    flex-direction: row;
    border-bottom-width: 0;
    background-color: transparent;
  }

  .nav-liste li a {
    padding: 6px 18px;
    border-bottom-width: 0;
    border-right: 1px solid var(--bordure);
  }

  .nav-liste li:last-child a {
    border-right-width: 0;
  }

  .nav-liste li a:hover,
  .nav-liste li a.lien-actif {
    box-shadow: inset 0 -2px 0 var(--dore);
  }

  .banner {
    padding-top: 110px;
    padding-bottom: 120px;
    padding-left: var(--marge-centre);
    padding-right: var(--marge-centre);
  }

  .banner-titre {
    font-size: 72px;
  }

  .section {
    padding-top: 80px;
    padding-bottom: 80px;
    padding-left: var(--marge-centre);
    padding-right: var(--marge-centre);
  }

  .section-titre {
    font-size: 36px;
  }

  /* deux colonnes : texte à gauche, encart alternance à droite */
  .apropos-corps {
    flex-direction: row;
    align-items: flex-start;
    gap: 50px;
  }

  .apropos-texte {
    flex: 1;
  }

  .encart-alternance {
    width: 330px;
    flex-shrink: 0;
  }

  .competences-groupes {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 40px;
  }

  .groupe {
    width: 400px;
    flex: 1;
  }

  .projets-cartes {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 26px;
  }

  .projet {
    width: 340px;
    flex: 1;
  }

  /* LOC MNS prend toute la largeur pour laisser respirer les captures */
  .projet-vedette {
    width: 100%;
    flex-basis: 100%;
  }

  .projet-galerie {
    flex-direction: row;
  }

  .projet-galerie li {
    flex: 1;
  }

  .projet-galerie img {
    height: 230px;
  }

  .pied-page {
    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: var(--marge-centre);
    padding-right: var(--marge-centre);
  }
}
