/* ===============================
   VARIABLES GLOBALES
================================ */

/* Points de rupture */
/* 768px */
/* 1024px */

:root {
  /* Espacements */
  --scale: 0.5; /* maquette deux fois plus grande que la realité */
  --spacing-xsmall: calc(16px * var(--scale)); /* 8px */
  --spacing-small: calc(30px * var(--scale)); /* 15px */
  --spacing-med: calc(60px * var(--scale)); /* 30px */
  --spacing-large: calc(90px * var(--scale)); /* 60px */

  /* Polices */
  --font-display: "Basteleur", system-ui, sans-serif;
  --font-body: Arial, system-ui, sans-serif;

  /* Couleurs Placeholder */
  --color-bg: #ffffff;
  --color-noir: #111111;
  --color-vert: #55af7f; /* vert menu */
  --color-eau: #c5ece1;
  --color-lilas: #c2b7d8;
  --color-rouge: #e75630;
  --color-rose: #ecb1b6;
  --color-bleu: #74a8c7;
  --color-jaune: #feec62;
  --color-beige: #fff7ee;
}

/* =========================
   UTILITAIRES
   ========================= */

/* ---------- Marges ADAPTATIVES ---------- */

/* mobile */
.gutter {
  padding-left: var(--spacing-small);
  padding-right: var(--spacing-small);
}

.gutter-cards {
  padding-left: var(--spacing-small);
  padding-right: var(--spacing-small);
}

.gutter-actions,
.gutter-actions-cta .cta {
  padding-left: var(--spacing-small);
  padding-right: var(--spacing-small);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gutter-article,
.gutter-article-cta .cta {
  padding-left: var(--spacing-small);
  padding-right: var(--spacing-small);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* tablette */
@media (min-width: 768px) {
  .gutter-actions,
  .gutter-actions-cta .cta {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }

  .gutter-article,
  .gutter-article-cta .cta {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* desktop */
@media (min-width: 1024px) {
  .gutter-cards {
    padding-left: 10vw;
    padding-right: 10vw;
  }

  .gutter-actions,
  .gutter-actions-cta .cta {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }

  .gutter-article,
  .gutter-article-cta .cta {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- Espacements ---------- */
.spacing-xsmall {
  height: var(--spacing-xsmall);
}
.spacing-small {
  height: var(--spacing-small);
}

.spacing-med {
  height: var(--spacing-med);
}

.spacing-large {
  height: var(--spacing-large);
}

/* container qui centre le contenu et met les éléments les uns en dessous des autres */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container-article {
  display: flex;
  flex-direction: column;
}

.margins-small-lr {
  margin-left: var(--spacing-small);
  margin-right: var(--spacing-small);
}

.max-width-800px {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.max-width-850px {
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.max-width-1000px {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.max-width-1200px {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Background colors */
.bg-vert {
  background: var(--color-vert);
}

.bg-eau {
  background: var(--color-eau);
}

.bg-rouge {
  background: var(--color-rouge);
}

.bg-lilas {
  background: var(--color-lilas);
}

.bg-jaune {
  background: var(--color-jaune);
}

.bg-rose {
  background: var(--color-rose);
}

/* BUTTON */
.btn {
  background: var(--color-jaune);
  border: none;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-noir);
  padding: var(--spacing-small) var(--spacing-med);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  opacity: 0.9;
}

/* ===============================
   SYSTÈME TYPOGRAPHIQUE
================================ */

/* ---------- POLICES ---------- */

/* Basteleur Bold */
@font-face {
  font-family: "Basteleur";
  src:
    url("/assets/fonts/Basteleur-Bold.woff2") format("woff2"),
    url("/assets/fonts/Basteleur-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Basteleur Moonlight (la light) */
@font-face {
  font-family: "Basteleur";
  src:
    url("/assets/fonts/Basteleur-Moonlight.woff2") format("woff2"),
    url("/assets/fonts/Basteleur-Moonlight.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* ---------- GLOBAL ---------- */
body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  color: var(--color-noir);
  background-color: var(--color-beige);
}

.type-feufollet {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.8rem;
  line-height: 1.4;
  padding-top: 7px;
}

.type-hero {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.2rem;
  line-height: 1.1;
}

/* titres */
.type-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.1;
}

/* Sous-titres, menu, footer */
.type-subtitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.2;
}

/* Texte courant */
.type-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: var(--color-noir);
}

/* Texte secondaire / légendes / footer */
.type-catchy {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* Visuellement invisible pour le lecteur, important pour le SEO */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- ADAPTATIF ---------- */
@media (min-width: 768px) {
  .type-title {
    font-size: 2.2rem;
  }
}

/* =========================
   CURSORS
   ========================= */

body {
  cursor: default;
}

a,
button,
.clickable {
  cursor: pointer;
}

/* =========================
   HEADER
   ========================= */

/* ---------- HEADER MOBILE ---------- */

.site-header {
  padding: var(--spacing-small);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: transparent;
}

.header-inner {
  display: flex;
  justify-content: space-between; /* feu follet a gauche et burger a droite */
  align-items: center;
  position: relative;
  height: 50px; /* hauteur forcée pour match les icones */
}

.menu-toggle {
  width: 50px;
  height: 50px;
  border: none;
}

/* Menu déroulant (mobile) */
.mobile-menu {
  position: absolute;
  top: 100% - var(--spacing-small); /* juste en dessous du header */
  left: 0;
  right: 0;
  padding-left: var(--spacing-small);
  padding-right: var(--spacing-small);
  background: transparent; /* pas de fond global, ce sont les items qui ont un fond */
  display: none;
  z-index: 101;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  margin: 0;
  padding: 0;
}

/* Chaque item = rectangle de la largeur du contenu, hauteur = hauteur bouton */
.mobile-menu li {
  min-height: 50px;
  padding-left: var(--spacing-small);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lien centré dans le bloc */
.mobile-menu a {
  width: 100%;
}

.header-room {
  height: calc(
    80px + var(--spacing-small)
  ); /* pour laisser de la place au header en position absolue: 15 + 50 + 30 */
}

@media (min-width: 768px) {
  .header-room {
    height: calc(
      80px + var(--spacing-large)
    ); /* pour laisser de la place au header en position absolue: 15 + 70 + 30 */
  }
}

/* Couleurs différentes par item (placeholder) */
.mobile-menu li:nth-child(1) {
  background: var(--color-eau);
} /* Projets */
.mobile-menu li:nth-child(2) {
  background: var(--color-jaune);
} /* Domaines d’action */
.mobile-menu li:nth-child(3) {
  background: var(--color-rose);
} /* Qui sommes-nous ? */
.mobile-menu li:nth-child(4) {
  background: var(--color-rouge);
} /* Manifeste */
.mobile-menu li:nth-child(5) {
  background: var(--color-lilas);
} /* Actus */

/* ---------- HEADER DESKTOP ---------- */

@media (min-width: 1120px) {
  /* On enlève le burger */
  .menu-toggle {
    display: none;
  }

  /* Le menu n’est plus déroulant */
  .mobile-menu {
    position: static;
    display: block !important;
    padding: 0;
  }

  /* Le header devient une seule vraie ligne */
  .site-header {
    display: flex;
    align-items: center;
  }

  .header-inner {
    flex: 0 0 auto; /* le titre prend juste sa place, evite des problemes */
    margin-right: var(--spacing-small);
  }

  /* Le menu passe dans le flux normal */
  .mobile-menu {
    position: static; /* ce n'est plus absolu, il reste dans le flux, retour normal */
    display: block !important; /* forcer l’affichage au cas ou il serait caché par le menu-toggle */
    padding: 0; /* on enleve le padding du menu deroulant initial */
    margin-left: auto; /* pousse le menu complètement à droite */
  }

  .mobile-menu ul {
    display: flex;
    align-items: stretch;
    gap: var(--spacing-med);
  }

  .mobile-menu li {
    min-height: auto; /* on enlève la hauteur fixe */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
  }

  .mobile-menu a {
    padding: 0;
    display: flex;
    align-items: center;
    height: 100%;
  }
}

/* =========================
   FOOTER
   ========================= */

/* ---------- FOOTER MOBILE ----------*/
.site-footer {
  margin-top: var(--spacing-large);
}

.footer-block {
  padding: var(--spacing-med) var(--spacing-small);
  /* alignement du texte au centre verticalement */
  display: flex;
  flex-direction: column;
}

.footer-block a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-block .icon {
  width: 16px;
  height: 16px;
}

/* couleurs differentes par item (placeholder) */
.footer-block:nth-child(1) {
  background: var(--color-vert);
} /* Nous joindre */
.footer-block:nth-child(2) {
  background: var(--color-rose);
} /* Mentions légales */
.footer-block:nth-child(3) {
  background: var(--color-jaune);
} /* Réseaux sociaux */

/* ---------- FOOTER DESKTOP ---------- */
@media (min-width: 1024px) {
  .site-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

/* =========================
   HERO
   ========================= */

/* ---------- HERO MOBILE ---------- */
.hero {
  width: 100%;
  height: 85vh;

  background-image: url("/assets/img/hero.jpg");
  background-size: cover; /* l’image remplit tout */
  /*   move slightly down to show more relevant part of image */
  background-position: center 45%;
  /* background-position: center; */
  background-repeat: no-repeat;

  display: flex;
  align-items: center; /* centre verticalement */
  justify-content: center; /* centre horizontalement */
  position: relative; /* permet de positionner le voile blanc */
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0 right:0 bottom:0 left:0 */
  background: rgba(255, 255, 255, 0.4); /* blanc à 20% d’opacité */
  z-index: 1;
}

.hero-text {
  text-align: center; /* centre le texte si retour a la ligne */
  z-index: 2; /* au-dessus du overlay */
}

/* =========================
   INTRO
   ========================= */

.intro {
  padding-top: var(--spacing-med);
  padding-bottom: var(--spacing-med);
  text-align: center;
}

/* =========================
          PROJECTS
   ========================= */

.latest-projects,
.projects {
  padding-top: var(--spacing-large);
  padding-bottom: var(--spacing-large);
  width: min(100%, 480px);
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-med);
}

.project-card {
  width: min(100%, 480px);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.project-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card .btn {
  margin-top: auto;
  padding: var(--spacing-xsmall) var(--spacing-small);
  align-self: flex-start;
  background: var(--color-lilas);
}

.project-card-textzone {
  margin-top: var(--spacing-small);
  margin-bottom: var(--spacing-xsmall);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.project-card-image {
  width: 100%;
  height: auto;
}

.cta-slot.gutter-cards .cta {
  width: 480px;
}

/* ---------- PROJECTS DESKTOP ---------- */

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: 1fr 1fr 1fr;
    grid-auto-rows: auto; /* <-- makes cards in same row the same height */
    column-gap: var(--spacing-small);
    row-gap: var(--spacing-med);
  }
  .latest-projects,
  .projects,
  .cta-slot.gutter-cards .cta {
    width: 100%;
  }
}

/* =========================
        DOMAINES ACTION
   ========================= */

.container-chapeau {
  padding-top: var(--spacing-large);
  padding-bottom: var(--spacing-small);
  width: min(100%, 480px);
}

@media (max-width: 600px) {
  .container-actions {
    width: min(100%, 600px);
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 480px) {
  .container-chapeau,
  .container-actions {
    width: 100%;
  }
}

/* ---------- ACCORDION ---------- */

.accordion {
  background-color: var(--color-jaune);
  padding: calc(var(--spacing-small) + var(--spacing-xsmall));
}

.accordion__summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between; /* titre à gauche, icône à droite */
  position: relative;
  padding: 12px; /* agrandit la zone cliquable */
  margin: -12px; /* annule l’impact visuel */
}

/* enlève le marqueur/triangle natif */
.accordion__summary::-webkit-details-marker {
  display: none;
}
.accordion__summary::marker {
  content: "";
}

.accordion[open] .accordion__icon {
  transform: rotate(180deg);
}

.accordion__icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  margin-left: var(--spacing-small);
}

/* accordion panel */
.accordion__panel {
  margin-top: var(--spacing-small);
}

/* barre noire sous chaque accordion */
.accordion {
  position: relative; /* permet de positionner la barre */
}
.accordion::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--color-noir); /* ta barre noire */
}

/* ===============================
   CTA – Call To Action and links
================================ */

.cta-slot {
  display: flex;
  justify-content: center;
}

.cta {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.cta .type-subtitle {
  font-size: 1.1rem;
}

.cta-link {
  text-decoration: underline;
}

.cta-link:hover {
  text-decoration: none;
}

/* Link colors based on background */
.bg-vert .cta-link {
  color: var(--color-eau);
}

.bg-eau .cta-link {
  color: var(--color-vert);
}

.bg-rose .cta-link {
  color: var(--color-rouge);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
