/* =====================================================================
   Julie Drevet — feuille de style unique
   Mobile-first. Typo : logo Butler Stencil Black + corps Montserrat.
   ===================================================================== */

/* --- Polices ---
   Logo              : Butler Stencil Black (libre, CC BY-SA 4.0)
   Sous-titre        : Montserrat Regular ("courant")
   Corps des pages   : Montserrat Thin (équivalent Ultra Light)
   Page Prestations  : Montserrat Regular ("courant")
   Montserrat est en licence OFL (libre, y compris en commercial).
   L'Avenir Next (commerciale) est conservée dans font/ mais désactivée :
   pour la réactiver, décommenter les deux @font-face 'avenir_next' ci-dessous
   et remplacer --font-body / --font-display par 'avenir_next'. */
@font-face {
  font-family: 'butler_stencil_black';
  src: url(../font/ButlerStencil-Black.woff2) format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'montserrat';
  src: url(../font/Montserrat-Variable.woff2) format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* --- Reset léger --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img  { display: block; max-width: 100%; height: auto; }
ul   { margin: 0; padding: 0; list-style: none; }
a    { color: inherit; }

/* --- Variables --- */
:root {
  --color-bg:      #fff;
  --color-fg:      #000;
  --color-muted:   #555;
  --max-width:     1150px;
  --gap:           clamp(8px, 1.5vw, 16px);
  --side-padding:  clamp(12px, 3vw, 32px);
  --font-body:     montserrat, Arial, sans-serif;
  --font-display:  montserrat, Arial, sans-serif;
  --font-logo:     butler_stencil_black, Arial, serif;
}

/* --- Base typographique --- */
html { font-size: 15px; }                          /* mobile-first : plus petit */
@media (min-width: 768px)  { html { font-size: 16px; } }
@media (min-width: 1024px) { html { font-size: 16px; } }

body {
  font-family: var(--font-body);
  font-weight: 200;                 /* Montserrat Extra Light */
  color: var(--color-fg);
  background: var(--color-bg);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-padding);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- En-tête --- */
.site-header {
  text-align: center;
  padding-top: clamp(16px, 4vw, 40px);
  font-family: var(--font-display);
}
.site-header .brand { text-decoration: none; color: var(--color-fg); display: inline-block; }
.site-header h1 {
  margin: 0;
  font-family: var(--font-logo);
  font-size: clamp(2.4rem, 11vw, 5.4rem);  /* proche du 450%-570% original */
  font-weight: normal;
  letter-spacing: 0;
}
.site-header h2 {
  margin: 0.1em 0 0.4em;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.15em;
}

/* --- Navigation --- */
.site-nav { width: 100%; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(8px, 2vw, 32px);
  margin-top: 0.5em;
  font-size: clamp(0.85rem, 1.6vw, 1.15rem);
  letter-spacing: 0.2em;
}
.site-nav a {
  text-decoration: none;
  padding: 0.25em 0;
  display: inline-block;
}
.site-nav a:hover,
.site-nav a:focus-visible { text-decoration: underline; }
.site-nav a.active { font-weight: 400; }

/* --- Logos réseaux sociaux dans la nav ---
   Desktop : inline-flex, alignés avec les items texte du menu.
   Mobile  : dans le burger, alignés avec les autres items. */
.nav-social {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 18px);
}
.nav-social a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding: 0.1em 0;
}
.nav-icon {
  width: 1.15em;
  height: 1.15em;
  display: block;
}
.nav-social a:hover .nav-icon { opacity: 0.7; }

/* --- Menu burger (mobile) --- */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  margin: 12px auto 0;
  padding: 8px;
  width: 44px;
  height: 44px;
}
.nav-toggle__bar {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--color-fg);
  margin: 5px auto;
  transition: transform .25s ease, opacity .25s ease;
}
@media (max-width: 599px) {
  .nav-toggle { display: block; }
  .site-nav ul { display: none; flex-direction: column; gap: 0.25em; padding: 0.5em 0; }
  .site-nav.is-open ul { display: flex; }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-toggle.is-open .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* Dans le burger, les logos réseaux sociaux prennent une taille plus tapable
     et sont centrés comme les autres items. */
  .nav-social {
    justify-content: center;
    gap: 28px;
    margin-top: 0.4em;
  }
  .nav-social a .nav-icon { width: 1.6em; height: 1.6em; }
}

/* --- Contenu principal --- */
.site-main {
  margin-top: clamp(20px, 4vw, 50px);
}

/* --- Grille de pavés (home + réalisations) ---
   L'original garde TOUJOURS 3 colonnes, quel que soit l'écran. */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(3, 1fr);
}

/* --- Pavé générique --- */
.tile {
  display: block;
  text-decoration: none;
  color: var(--color-fg);
  font-size: 0.95em;
}
.tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;        /* carré strict (home + listing) */
  object-fit: cover;
}
.tile p {
  margin: 0.4em 0 0.2em;
  font-family: var(--font-body);
  text-align: left;
  letter-spacing: 0.1em;
}

/* Sur la home, on ne montre PAS le titre sous la photo */
.home-grid .tile p { display: none; }

/* --- Page projet (flux narratif, repris de l'original general.css) ---
   Desktop : fidèle à l'original (justifié, letter-spacing).
   Mobile : texte dé-justifié et aéré pour éviter le "mur de texte". */
.project {
  margin-top: 5%;
  margin-left: 2%;
  margin-right: 2%;
  letter-spacing: 1px;
  text-align: justify;
  font-family: var(--font-body);
  font-weight: 200;                 /* Montserrat Extra Light (aligne sur body) */
}
.project h3 {
  text-align: justify;
  font-weight: 200;                 /* Montserrat Extra Light (aligne sur body) */
}
.project p {
  margin-top: 1%;
  margin-bottom: 1%;
  width: 100%;
  clear: both;
}
.project img {
  width: 100%;
  height: auto;
  margin-bottom: 1%;
  display: block;
}
@media (max-width: 899px) {
  .project {
    letter-spacing: 0;
    text-align: left;
    line-height: 1.65;
    margin-left: 0;
    margin-right: 0;
  }
  .project h3,
  .project p {
    text-align: left;
  }
  .project p {
    font-size: 0.95rem;
  }
  .project img {
    margin-bottom: 2.5%;
  }
}
/* Grille de pavés (cas Wilson) — images juxtaposées, légendes sous chaque */
.project-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2%;
  margin-bottom: 1%;
}
.project-pave {
  flex: 1 1 30%;
  min-width: 200px;
  margin: 0;
  font-size: 0.95em;
}
.project-pave img {
  width: 100%;
  height: auto;
  margin-bottom: 0;
}
.project-pave figcaption {
  margin-top: 0.5em;
  text-align: left;
}



/* --- Pied de page ---
.site-footer {
  margin-top: clamp(30px, 5vw, 60px);
  padding-bottom: 30px;
  font-size: 0.8em;
  letter-spacing: 0.05em;
  text-align: center;
}
.site-footer a { text-decoration: underline; }

/* =====================================================================
   Session 12 — Pages Agence & Prestations : nouvelle structure par section.
   Pour chaque section/mission : en haut image + titre en gd caractères côte
   à côte (alternance gauche/droite), en dessous paragraphe en plus petit en
   pleine largeur. Mobile-first : empilement image → titre → paragraphe.
   ===================================================================== */

.duo-page {
  /* Pas de margin latéral : le body porte déjà le padding latéral global.
     Ajouter un margin ici rétrécit le contenu Agence/Prestations par rapport
     au footer (qui est hors .duo-page) → footer visuellement décalé. */
  padding-top: clamp(20px, 4vw, 40px);
}

.duo-accroche {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  text-align: center;
  margin: 0 auto 2.5em;
  max-width: 32em;
  line-height: 1.45;
}

/* Bloc section : empilé sur mobile (image → titre → paragraphe). */
.duo {
  margin-bottom: clamp(40px, 6vw, 72px);
}
.duo-top {
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
}
.duo-img {
  height: clamp(220px, 38vh, 320px);   /* hauteur plafonnée mobile — cover crop */
  overflow: hidden;
}
.duo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.duo-titre {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.3;
}
.duo-body {
  margin-top: clamp(16px, 2vw, 28px);
  font-family: var(--font-body);
  font-weight: 200;                 /* Extra Light (aligne sur body) */
}
.duo-body p {
  margin: 0 0 1em;
  line-height: 1.6;
  text-align: justify;       /* justifié sur Agence & Prestations (demande Julie) */
  hyphens: auto;             /* césure automatique pour la justification */
}
.duo-tarif {
  margin-top: 1.2em !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  color: var(--color-muted);
}
.duo-coord {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.7;
  text-align: left;          /* coordonnées alignées à gauche (demande Julie) */
  margin: 3em 0 1em;
  max-width: 32em;
}
.duo-coord a { text-decoration: underline; }

/* --- Page Prestations : accroche en haut plus grosse et plus grasse --- */
body.page-prestations .duo-accroche {
  font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  text-align: justify;
  max-width: none;            /* pleine largeur (demande Julie) */
  margin-left: 0;
  margin-right: 0;
}

/* --- Page Prestations : corps en Regular (Montserrat 400) --- */
body.page-prestations .duo-body {
  font-family: var(--font-display);
  font-weight: 400;
}

/* --- Layout duo-top actif à partir de 900px : image + titre côte à côte --- */
@media (min-width: 900px) {
  .duo-top {
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 4vw, 56px);
  }
  /* alternance : par défaut image à gauche, .duo--img-right image à droite */
  .duo--img-right .duo-img  { order: 2; }
  .duo--img-right .duo-titre { order: 1; }

  /* image cover à hauteur fixe (reprise du principe v1 validé Session 11) */
  .duo-img {
    height: clamp(280px, 42vh, 480px);
    overflow: hidden;
  }
}

/* Sous 900px (mobile/tablette), empilement image → titre → paragraphe,
   image cover à hauteur plafonnée courte (cf. réajustement à venir avec Julie). */

/* --- Page Prestations : composites affichés ENTIERS (pas de cover crop) ---
   Les images prestations sont des montages 2 ou 3 panneaux larges que le
   cover rognait sur les côtés (M de Modélisation tronqué, etc.). On les
   affiche à largeur de colonne, ratio d'origine, sans zoom ni rognage. */
body.page-prestations .duo-img {
  height: auto;
  overflow: visible;
}
body.page-prestations .duo-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
@media (min-width: 900px) {
  body.page-prestations .duo-img {
    height: auto;
    overflow: visible;
  }
}
