/* =========================================================
   STYLE.CSS – apparence du site
   Réglages les plus utiles dans le bloc :root juste en dessous.
   ========================================================= */
:root {
  --violet: #9C43E9;      /* couleur principale (titres, survol des boutons) */
  --vert:   #C6FF33;      /* détail : page active dans le menu */
  --noir:   #111111;
  --blanc:  #ffffff;      /* fond du site */
  --marge:  28px;         /* marge à gauche/droite de toutes les pages */
  --ratio-vignette: 4 / 5; /* proportion des images de la mosaïque (largeur / hauteur). Ex : 1 / 1 = carré, 3 / 4 = portrait, 4 / 3 = paysage */
}

* { box-sizing: border-box; margin: 0; }
body { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; color: var(--noir); background: var(--blanc); line-height: 1.55; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--vert); color: var(--noir); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }

/* ---------- BOUTONS (forme oblongue, transparents, remplis au survol) ---------- */
.btn, .btn-rond {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 20px;
  border: 1.5px solid currentColor; border-radius: 999px;
  background: var(--fond-btn, transparent); color: inherit;
  font: inherit; font-size: .95rem; white-space: nowrap; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn.actif { background: var(--vert); border-color: var(--vert); color: var(--noir); }
.btn:hover, .btn-rond:hover, .btn.actif:hover {
  background: var(--violet); border-color: var(--violet); color: var(--blanc);
}
.btn-rond { width: 42px; padding: 0; flex-direction: column; gap: 4px; }
.btn-rond span { width: 16px; height: 1.5px; background: currentColor; }
.entete.ouvert .btn-rond { background: var(--violet); border-color: var(--violet); color: var(--blanc); }

/* ---------- BANDEAU DU HAUT ---------- */
.entete { position: relative; z-index: 10; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: var(--marge); color: var(--noir); }
.menu { display: none; gap: 10px; align-items: flex-start; }
.entete.ouvert .menu { display: flex; animation: apparition .25s ease; }
.menu-projets { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.sous-menu { display: none; position: absolute; top: calc(100% + 10px); left: 0; flex-direction: column; align-items: flex-start; gap: 8px; z-index: 20; --fond-btn: var(--blanc); }
.sous-menu.ouvert { display: flex; animation: apparition .2s ease; }
@keyframes apparition { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- ACCUEIL ---------- */
body.accueil .entete { position: absolute; top: 0; left: 0; right: 0; color: var(--blanc); }
body.accueil .sous-menu { --fond-btn: rgba(0,0,0,.35); }
body.accueil .sous-menu .btn { backdrop-filter: blur(8px); }
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #888; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,0) 30%), rgba(0,0,0,.12); }
.hero-texte { position: absolute; z-index: 2; right: var(--marge); top: 50%; transform: translateY(-50%); text-align: right; color: var(--blanc); max-width: calc(100% - 2 * var(--marge)); }
.hero-texte h1 { font-size: clamp(2.6rem, 8vw, 7.5rem); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.hero-texte p { margin-top: .8rem; font-size: clamp(1rem, 1.7vw, 1.6rem); font-weight: 300; }

/* ---------- MOSAÏQUE ---------- */
.mosaique { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 12px var(--marge) 60px; }
.vignette { display: block; aspect-ratio: var(--ratio-vignette); overflow: hidden; background: #eee; }
.vignette img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.vignette:hover img { opacity: .8; }

/* ---------- PAGE PROJET / À PROPOS / CONTACT ---------- */
.projet { display: grid; grid-template-columns: minmax(260px, 1fr) 2.6fr; gap: 48px; padding: 12px var(--marge) 0; align-items: start; }
.projet-texte h1 { color: var(--violet); font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 500; line-height: 1.15; margin-bottom: 1.2rem; }
.projet-texte h2 { color: var(--violet); font-size: 1.15rem; font-weight: 500; margin: 1.8rem 0 .2rem; }
.projet-texte h2:first-child { margin-top: 0; }
.projet-texte p { max-width: 42ch; margin-bottom: 1em; }
.projet-texte a:hover { color: var(--violet); }

.visuel { position: relative; height: calc(100svh - 190px); min-height: 360px; }
.galerie { height: 100%; display: flex; align-items: center; justify-content: center; }
.galerie img { display: none; max-width: 100%; max-height: 100%; object-fit: contain; background: #eee; }
.galerie img.actif { display: block; }
.galerie img.manquante { visibility: hidden; }
.fleche { position: absolute; top: 50%; transform: translateY(-50%); --fond-btn: rgba(255,255,255,.75); color: var(--noir); backdrop-filter: blur(6px); }
.fleche.prec { left: 12px; }
.fleche.suiv { right: 12px; }

.projet-nav { display: flex; justify-content: space-between; padding: 28px var(--marge) 36px; }
.projet-nav:empty { display: none; }

/* ---------- TABLETTE ---------- */
@media (max-width: 1100px) { .mosaique { grid-template-columns: repeat(3, 1fr); } }

/* ---------- TÉLÉPHONE ---------- */
@media (max-width: 800px) {
  :root { --marge: 16px; }
  .menu { flex-basis: 100%; flex-direction: column; }
  .menu-projets { width: 100%; }
  .sous-menu { position: static; margin: 8px 0 0 16px; }
  .mosaique { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .projet { grid-template-columns: 1fr; gap: 24px; }
  .visuel { order: -1; height: 75vw; min-height: 0; max-height: 70svh; }
  .projet-nav { padding: 24px var(--marge) 32px; }
  .btn, .btn-rond { height: 38px; }
  .btn-rond { width: 38px; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
