/* ============ ATELIER SOLANE : feuille de style ============ */

/* ---- 1. Les réglages généraux ----
   Change une valeur ici et elle change partout dans le site. */
:root {
  --scene: #0e0e0f;        /* fond de la page : presque noir */
  --anthracite: #1b1a18;   /* fond des sections un peu plus claires */
  --trait: #34322e;        /* lignes fines sur fond sombre */
  --craie: #f1ede6;        /* texte principal sur fond sombre */
  --pierre: #99948b;       /* texte secondaire sur fond sombre */
  --soleil: #f5b85a;       /* la lumière : fenêtres, boutons, liens */
  --soleil-vif: #ffd08a;   /* la lumière au survol */

  --papier: #efebe4;       /* fond des sections claires */
  --blanc: #fbfaf7;        /* cartes sur fond clair */
  --encre: #1b1a18;        /* texte sur fond clair */
  --ardoise: #625e57;      /* texte secondaire sur fond clair */
  --trait-clair: #d6d0c5;  /* lignes fines sur fond clair */

  --police: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;

  --marge: clamp(20px, 5.5vw, 88px);   /* marge sur les côtés */
  --largeur: 1200px;                   /* largeur maximale du contenu */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--scene);
  color: var(--craie);
  font-family: var(--police);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 600; line-height: 1.04; letter-spacing: -0.025em; }
ul, ol { list-style: none; }
a { color: inherit; }
::selection { background: var(--soleil); color: var(--scene); }

/* Contour visible quand on navigue au clavier */
:focus-visible { outline: 3px solid var(--soleil); outline-offset: 3px; border-radius: 4px; }

/* ---- 2. Bandeau de démonstration ---- */
.bandeau { background: var(--craie); color: var(--encre); font-size: 14px; font-weight: 500; text-align: center; padding: 8px var(--marge); }

/* ---- 3. Boutons et liens ---- */
.bouton {
  display: inline-block;
  background: var(--soleil);
  color: var(--scene);
  font: 600 17px var(--police);
  text-decoration: none;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.bouton:hover { background: var(--soleil-vif); transform: translateY(-2px); }
.bouton-petit { font-size: 15px; padding: 9px 18px; }

.lien { color: var(--soleil); font-weight: 600; text-underline-offset: 5px; }
.lien:hover { color: var(--soleil-vif); }

/* ---- 4. En-tête ---- */
.entete {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--marge);
  background: rgba(14, 14, 15, .8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--trait);
}
.logo { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; }
.menu { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); font-size: 16px; }
.menu a:not(.bouton) { text-decoration: none; color: var(--pierre); transition: color .2s; }
.menu a:not(.bouton):hover { color: var(--craie); }

/* ---- 5. La scène d'ouverture ---- */
.scene {
  max-width: calc(var(--largeur) + 2 * var(--marge));
  margin: 0 auto;
  padding: clamp(32px, 4vw, 56px) var(--marge) clamp(56px, 8vw, 104px);
  text-align: center;
}
.scene-metier { font-size: 19px; font-weight: 500; color: var(--pierre); margin-bottom: 18px; animation: montee .9s cubic-bezier(.2, .8, .2, 1) both; }
.scene h1 {
  font-size: clamp(40px, 6.8vw, 96px);
  margin: 0 auto;
  animation: montee 1s cubic-bezier(.2, .8, .2, 1) .08s both;
}

/* La maquette remonte sous le titre et passe légèrement dessous */
.scene-maquette { margin: clamp(-70px, -5vw, -16px) auto 0; max-width: 780px; animation: lever 1.6s cubic-bezier(.2, .8, .2, 1) .2s both; }
.maquette { display: block; width: 100%; height: auto; overflow: visible; }

/* Les fenêtres : la lumière de la maison */
.vitre { fill: var(--soleil); }
.vitre.porte { fill: #e2a245; }

/* Les trois niveaux s'écartent vers le haut. --ecart est modifié par script.js (de 0 à 1). */
.etage { transition: transform .15s linear; }
.etage-2 { transform: translateY(calc(var(--ecart, 0) * -34px)); }
.etage-3 { transform: translateY(calc(var(--ecart, 0) * -68px)); }

.scene-bas {
  display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 24px 48px;
  text-align: left;
  margin-top: clamp(8px, 2vw, 24px);
}
.scene-texte { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.3; font-weight: 500; max-width: 26ch; }
.scene-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* ---- 6. Chapitre : une grande phrase, puis l'explication ---- */
.chapitre { max-width: calc(var(--largeur) + 2 * var(--marge)); margin: 0 auto; padding: clamp(72px, 11vw, 160px) var(--marge); }
.chapitre-nom { font-size: 20px; font-weight: 600; color: var(--soleil); margin-bottom: 18px; }
.geant { font-size: clamp(40px, 7.6vw, 108px); max-width: 13ch; }
.chapitre-texte { font-size: clamp(20px, 2.1vw, 25px); line-height: 1.4; font-weight: 500; color: var(--pierre); max-width: 38ch; margin: clamp(28px, 4vw, 48px) 0 0 auto; }
.chapitre-texte strong { color: var(--craie); font-weight: 500; }

/* ---- 7. Les blocs de contenu ---- */
.bloc { padding: clamp(72px, 10vw, 136px) var(--marge); }
.bloc > * { max-width: var(--largeur); margin-left: auto; margin-right: auto; }
.bloc-anthracite { background: var(--anthracite); }
.bloc-clair { background: var(--papier); color: var(--encre); }
.bloc-contact { padding-top: 0; }

.titre { font-size: clamp(32px, 4.8vw, 60px); max-width: 20ch; }
.bloc > .titre { max-width: var(--largeur); }
.bloc-tete { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 12px 32px; margin-bottom: clamp(36px, 5vw, 64px); }
.bloc-note { color: var(--pierre); }
.bloc-clair .bloc-note { color: var(--ardoise); }
.texte { font-size: 20px; color: var(--ardoise); max-width: 40ch; margin-top: 20px; }

/* Deux colonnes côte à côte */
.deux { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }

/* ---- 8. Projets ---- */
.projets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.projet { background: var(--scene); border-radius: 24px; padding: clamp(22px, 2.6vw, 34px); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.projet:hover { transform: translateY(-6px); }

/* Les façades dessinées au trait */
.projet-dessin { display: block; width: 100%; margin-bottom: 26px; fill: none; stroke: var(--craie); stroke-width: 1.6; stroke-linejoin: round; }
.projet-dessin .plein { fill: var(--soleil); stroke: none; opacity: .9; }
.projet-dessin .fin { stroke-width: .8; opacity: .45; }

.projet h3 { font-size: 28px; }
.projet-lieu { color: var(--soleil); font-weight: 500; margin-top: 6px; }
.projet-texte { color: var(--pierre); margin-top: 14px; }
.projet-chiffres { display: flex; gap: 32px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--trait); }
.projet-chiffres dt { font-size: 14px; color: var(--pierre); }
.projet-chiffres dd { font-size: 22px; font-weight: 600; }

/* ---- 9. Étapes : quatre étapes numérotées ---- */
.etapes { counter-reset: etape; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(24px, 3vw, 44px); margin-top: clamp(36px, 5vw, 64px); }
.etapes li { counter-increment: etape; border-top: 1px solid var(--craie); padding-top: 22px; display: flex; flex-direction: column; }
.etapes li::before { content: counter(etape); font-size: 56px; font-weight: 600; line-height: 1; color: var(--soleil); margin-bottom: 22px; }
.etapes h3 { font-size: 24px; margin-bottom: 10px; }
.etapes p { color: var(--pierre); margin-bottom: 20px; }
.duree { margin-top: auto; font-size: 15px; font-weight: 500; }

/* ---- 10. Honoraires : trois cartes claires ---- */
.cartes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.carte { background: var(--blanc); border-radius: 24px; padding: clamp(24px, 3vw, 36px); }
.carte h3 { font-size: 21px; letter-spacing: -0.01em; }
.carte-prix { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 18px 0 16px; }
.carte p:last-child { color: var(--ardoise); }

/* ---- 11. Contact ---- */
.coordonnees { margin-top: 36px; border-top: 1px solid var(--encre); }
.coordonnees li { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--trait-clair); font-weight: 500; }
.coordonnees span { color: var(--ardoise); font-weight: 400; }

.formulaire { display: grid; gap: 18px; background: var(--blanc); border-radius: 24px; padding: clamp(22px, 3vw, 38px); }
.formulaire label { display: grid; gap: 7px; font-size: 15px; font-weight: 600; }
.formulaire input, .formulaire select, .formulaire textarea {
  font: 400 17px var(--police); color: var(--encre);
  padding: 12px 14px;
  background: var(--blanc);
  border: 1px solid #b9b2a6; border-radius: 12px;
  width: 100%;
  resize: vertical;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { outline: 0; border-color: var(--encre); box-shadow: 0 0 0 3px rgba(245, 184, 90, .5); }
.formulaire .bouton { justify-self: start; background: var(--encre); color: var(--blanc); }
.formulaire .bouton:hover { background: #000000; }
.formulaire-message { font-size: 15px; min-height: 1.5em; }
.formulaire-message.erreur { color: #a3261c; }

/* ---- 12. Pied de page ---- */
.pied {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px;
  padding: 28px var(--marge);
  background: var(--papier); color: var(--ardoise);
  font-size: 15px;
  border-top: 1px solid var(--trait-clair);
}

/* ---- 13. Les animations d'arrivée (une seule fois, au chargement) ---- */
@keyframes montee {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes lever {
  from { opacity: 0; transform: translateY(70px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

/* ---- 14. Tablette ---- */
@media (max-width: 1020px) {
  .etapes { grid-template-columns: 1fr 1fr; }
  .projets, .cartes { grid-template-columns: 1fr; }
  .projet-dessin { max-width: 420px; }
}

/* ---- 15. Téléphone ---- */
@media (max-width: 760px) {
  .menu a:not(.bouton) { display: none; }
  .scene { text-align: left; }
  .scene h1 { margin-left: 0; }
  .scene-maquette { margin-top: -10px; margin-left: -6%; margin-right: -6%; }
  .deux, .etapes { grid-template-columns: 1fr; }
  .chapitre-texte { margin-left: 0; }
  .coordonnees li { grid-template-columns: 90px 1fr; }
}

/* ---- 16. Pour les personnes qui désactivent les animations ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene-metier, .scene h1, .scene-maquette { animation: none; }
  .bouton, .projet, .etage, .menu a { transition: none; }
}
