/* BERTEA – Entreprise générale de peinture */

@font-face {
  font-family: "Gelasio Web";
  src: url("fonts/gelasio-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Gelasio Web";
  src: url("fonts/gelasio-italic.woff") format("woff");
  font-weight: 400; font-style: italic; font-display: swap;
}

:root {
  --jaune: #FFD618;
  --encre: #333;
  --noir: #111;
  --serif: Georgia, "Gelasio Web", "Times New Roman", serif;
  --sans: Seravek, "Gill Sans Nova", "Gill Sans", Ubuntu, Calibri, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --texte: clamp(16px, 1.05vw, 19px);
  --marge: clamp(24px, 4.7vw, 120px);
  /* une seule épaisseur de blanc entre toutes les photos */
  --gouttiere: clamp(6px, 0.9vw, 18px);
  /* hauteur réservée à la légende sous une planche */
  --leg: calc(clamp(13px, .95vw, 17px) * 1.4 + 1.1em + 2.4em);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: #fff; color: var(--encre);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; font-family: var(--serif); font-size: var(--texte); line-height: 1.55;
  font-variant-numeric: oldstyle-nums;
  -webkit-hyphens: manual; hyphens: manual;   /* aucune césure */
  overflow-wrap: break-word;
}
img { max-width: 100%; }
.nw { white-space: nowrap; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--noir); outline-offset: 3px; }
h1, h2 { font-weight: normal; }

/* ---------- Logos en cartouche (double filet, comme la maquette) ---------- */
.cartouche { display: block; background: #fff; border: 2px solid var(--noir); padding: 3px; }
.cartouche img { display: block; width: 100%; height: auto; border: 1px solid var(--noir); }

/* ---------- Couverture : un écran plein ---------- */
.couverture {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  background: var(--jaune);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 0 80px;
}
.couverture h1 {
  margin: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(36px, 3.7vw, 96px);
}
.couverture .cartouche--nom { width: clamp(280px, 37.7vw, 1000px); }
.couverture .cartouche--egp { width: clamp(200px, 24.5vw, 650px); }
/* Ligne discrète sous les logos */
.baseline {
  display: flex; flex-direction: column; align-items: center; gap: .55em;
  margin-top: calc(clamp(22px, 2.3vw, 54px) - clamp(36px, 3.7vw, 96px));
  font-family: var(--serif); font-weight: normal;
  font-size: clamp(11.5px, .8vw, 15px); line-height: 1.5;
  letter-spacing: .22em; text-transform: uppercase; text-align: center;
  color: var(--encre);
  font-variant-numeric: lining-nums;
}
.baseline-metiers > span { white-space: nowrap; }
.baseline-lieu { font-size: .86em; letter-spacing: .3em; }
.baseline-lieu::before, .baseline-lieu::after {
  content: ""; display: inline-block; width: 1.6em; height: 1px; background: currentColor;
  vertical-align: middle; margin: 0 .9em; opacity: .55; transform: translateY(-.1em);
}

.descendre {
  position: absolute; left: 50%; bottom: clamp(20px, 3vw, 44px);
  transform: translateX(-50%);
  width: 34px; color: var(--encre); opacity: .75;
  padding: 10px 0;
}
.descendre svg { display: block; width: 34px; height: auto; }
.descendre:hover { opacity: 1; }

/* ---------- Doubles pages texte + photo : au moins un écran plein ---------- */
.duo { display: grid; background: var(--jaune); min-height: 100vh; min-height: 100svh; }
.duo--manifeste { grid-template-columns: 56.43fr 43.57fr; }
.duo--dialogue  { grid-template-columns: 43.36fr 56.64fr; }
.duo--services  { grid-template-columns: 64.84fr 35.16fr; }

.duo .photo { position: relative; min-height: 100%; overflow: hidden; }
.duo .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

.duo p { margin: 0; }

/* Manifeste */
.duo--manifeste .texte { padding: clamp(36px, 3.6vw, 100px) clamp(24px, 3.4vw, 92px) clamp(28px, 2.4vw, 64px); }
.titre-manifeste { font-size: 1.32em; line-height: 1.3; margin: 0 0 1.9em; }
.corps p { margin-bottom: 1.15em; text-align: justify; }
.signature { text-align: right; margin-top: .4em; }
.signature img { display: block; width: clamp(150px, 13vw, 300px); height: auto; margin: .2em 0 0 auto; transform: translateX(-12%); }

/* Dialogue */
.duo--dialogue .texte {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(36px, 4.4vw, 120px) var(--marge) clamp(36px, 4.4vw, 120px) clamp(24px, 3vw, 80px);
}
.echange p { margin-bottom: .95em; }
.echange .didascalie { font-style: italic; margin: 1.7em 0; }
.lieu { margin-top: 1.4em !important; text-align: right; font-size: .85em; }

/* Services */
.duo--services .texte {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(40px, 4vw, 110px) clamp(24px, 4.6vw, 120px);
}
.duo--services .bloc { max-width: 46em; }
.duo--services .bloc p { text-align: justify; }
.titre-services {
  font-size: clamp(22px, 2.05vw, 44px); line-height: 1.25; letter-spacing: .02em;
  margin: 0 0 1.5em;
}
.titre-services span { display: inline-block; margin: 0 .5em; }
.titre-centre { text-align: center; }

/* ---------- Savoir-faire : centré en pleine page ---------- */
.metiers {
  background: var(--jaune);
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(48px, 6vw, 140px) var(--marge);
}
.metiers .bloc { width: 100%; max-width: 53vw; }
.metiers .titre-services { font-size: clamp(24px, 2.8vw, 64px); margin-bottom: 1.3em; }
.metiers p { margin: 0; font-size: clamp(17px, 1.4vw, 30px); line-height: 1.6; text-align: justify; }

/* ---------- Planches photos ---------- */
.realisations { background: #fff; }
/* chaque planche tient entière dans l'écran, sans zoomer */
.realisations {
  /* même largeur pour toutes les planches : la plus large qui tient dans l'écran */
  --largeur: min(100%, calc((100vh - var(--leg)) * 3840 / 2235));
}
@supports (height: 100svh) {
  .realisations { --largeur: min(100%, calc((100svh - var(--leg)) * 3840 / 2235)); }
}
.planche { margin: 0 auto; width: var(--largeur); }
.planche--pleine { margin-bottom: var(--gouttiere); }
.compo { display: grid; gap: var(--gouttiere); aspect-ratio: var(--rw) / var(--rh); }
.cadre { min-width: 0; min-height: 0; overflow: hidden; background: #eee; }
.cadre img { display: block; width: 100%; height: 100%; object-fit: cover; }
.planche figcaption {
  font-family: var(--sans); font-weight: 500; font-variant-numeric: lining-nums;
  font-size: clamp(13px, .95vw, 17px); line-height: 1.4; letter-spacing: .01em;
  padding: 1.1em 1.9% 2.4em;
}

/* ---------- Contact ---------- */
.contact {
  background: var(--jaune);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6vw;
  padding: clamp(56px, 6vw, 150px) var(--marge);
}
.contact p { margin: 0 0 .55em; }
.contact .titre-services { margin-bottom: 1.2em; }
.contact-nom { font-size: 1.2em; margin-bottom: .15em !important; }
.contact-metier { font-style: italic; margin-bottom: .55em !important; }
.contact-devis { margin-bottom: 1.1em !important; }
.contact address { font-style: normal; }
.contact-zone { font-size: .88em; line-height: 1.6; max-width: 36em; }
.contact a.discret { text-decoration: none; }
.contact-zone { margin-top: 1.4em !important; }
.contact-pdf { margin-top: 1.8em !important; font-size: .9em; }
.contact-logos { display: flex; flex-direction: column; align-items: center; gap: clamp(18px, 1.9vw, 48px); }
.contact-logos .cartouche--nom { width: clamp(200px, 22vw, 560px); }
.contact-logos .cartouche--egp { width: clamp(140px, 14.3vw, 365px); }

/* ---------- Pied de page ---------- */
.pied {
  font-family: var(--sans); font-size: 13px; line-height: 1.5;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  font-variant-numeric: lining-nums;
  padding: 18px var(--marge) 22px;
  background: #fff;
}
.pied p { margin: 0; }

/* ---------- Mentions légales ---------- */
.bandeau { background: var(--jaune); padding: clamp(28px, 3vw, 56px) 20px; }
.retour { display: flex; flex-direction: column; align-items: center; gap: 18px; text-decoration: none; }
.retour .cartouche--nom { width: clamp(200px, 22vw, 420px); }
.retour .cartouche--egp { width: clamp(140px, 14.3vw, 273px); }
.mentions { max-width: 44rem; margin: 0 auto; padding: clamp(36px, 5vw, 80px) 22px clamp(48px, 6vw, 96px); font-size: clamp(16px, 1.05vw, 18px); }
.mentions h1 { font-size: 1.9em; margin: 0 0 1.2em; }
.mentions h2 { font-size: 1.15em; margin: 2em 0 .5em; letter-spacing: .02em; }
.mentions p { margin: 0 0 .8em; }
.mentions, .pied, .contact a { font-variant-numeric: lining-nums; }

/* ---------- Tablette en portrait : textes et photos l'un sous l'autre ---------- */
@media (min-width: 700px) and (max-width: 999px) {
  :root { --texte: 17px; }
  .couverture .cartouche--nom { width: 62vw; }
  .couverture .cartouche--egp { width: 41vw; }
  .duo { grid-template-columns: 1fr !important; min-height: 0; }
  .duo .photo { min-height: 0; }
  .duo .photo img { position: static; height: auto; max-height: 100svh; }
  .duo--manifeste .texte, .duo--dialogue .texte, .duo--services .texte { padding: 64px 9vw 56px; }
  .duo .texte > * { max-width: 40em; }
  .duo--services .texte { align-items: center; }
  .titre-services { font-size: 26px; }
  .signature img { transform: none; }
  .metiers .bloc { max-width: 40em; }
  .metiers .titre-services { font-size: 28px; }
  .metiers p { font-size: 18px; }
}

/* ---------- Smartphone ---------- */
@media (max-width: 699px) {
  :root { --texte: 16.5px; }
  .couverture .cartouche--nom { width: 84vw; }
  .couverture .cartouche--egp { width: 58vw; }
  .baseline { font-size: 11px; letter-spacing: .18em; }
  .baseline-metiers > span { display: block; }
  .baseline-metiers .sep-large { display: none; }

  .duo { grid-template-columns: 1fr !important; min-height: 0; }
  .duo .photo { min-height: 0; }
  .duo .photo img { position: static; height: auto; max-height: 100vh; max-height: 100svh; }
  .duo--manifeste .texte, .duo--dialogue .texte, .duo--services .texte { padding: 44px 24px 40px; }
  .titre-manifeste { font-size: 1.2em; margin-bottom: 1.5em; }
  .corps p, .duo--services .bloc p { text-align: left; }
  .signature img { width: 150px; transform: none; }
  .titre-services { font-size: clamp(16px, 4.9vw, 19px); letter-spacing: .01em; }
  .metiers { padding: 56px 24px; }
  .metiers .bloc { max-width: none; }
  .metiers .titre-services { font-size: clamp(16px, 4.9vw, 19px); }
  .metiers p { font-size: 16.5px; text-align: left; }
  .titre-services span { margin: 0 .35em; }

  /* photos les unes sous les autres, pleine largeur, même blanc entre toutes */
  .planche, .planche--pleine { width: 100%; }
  .compo { display: flex; flex-direction: column; gap: var(--gouttiere); aspect-ratio: auto; }
  .cadre { background: none; }
  .cadre img { width: 100%; height: auto; }
  .planche figcaption { font-size: 13px; padding: 10px 16px 30px; }

  .contact { grid-template-columns: 1fr; gap: 44px; padding: 52px 24px 56px; }
  .contact-logos { align-items: flex-start; }
  .contact-logos .cartouche--nom { width: 62vw; }
  .contact-logos .cartouche--egp { width: 43vw; }
  .pied { flex-direction: column; padding: 18px 24px 26px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
