/* ==========================================================================
   TRABAT — feuille de style du site (responsive, mobile-first sur les petits écrans)
   Desktop : mise en page fluide jusqu'à 1920 px, contenu centré.
   Mobile / tablette (< 1024 px) : en-tête compact avec menu plein écran, contenu empilé.
   ========================================================================== */

/* ---------- Polices ---------- */
@font-face { font-family: "GeraldtonBold";    src: url("../fonts/geraldton-bold.woff2") format("woff2");    font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: "GeraldtonRegular"; src: url("../fonts/geraldton-regular.woff2") format("woff2"); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: "DINNextLight";     src: url("../fonts/din-next-w01-light.woff2") format("woff2"); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: "AvenirHeavy";      src: url("../fonts/avenir-lt-w01_85-heavy.woff2") format("woff2"); font-weight: normal; font-style: normal; font-display: swap; }
/* Formulaire : Avenir Light / Helvetica — polices système si disponibles, sinon Arial */

:root {
  --navy: #0F2C69;
  --txt: #363636;
  --grey: #605E5E;
  --lgrey: #BABABA;
  --gold: #BC915F;
  --fb: "GeraldtonBold", "Geraldton", Helvetica, Arial, sans-serif;
  --fr: "GeraldtonRegular", "Geraldton", Helvetica, Arial, sans-serif;
  --gutter: 20px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--txt);
  font: normal normal normal 16px/1.4em "DINNextLight", sans-serif;
  overflow-x: hidden;
}
img { border: 0; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
button { font: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Transition entre les pages (fondu) */
#main { opacity: 1; transition: opacity .35s ease; }
body.page-enter #main, body.page-leave #main { opacity: 0; }
@media (prefers-reduced-motion: reduce) { #main { transition: none; } }

/* ---------- Typographie des blocs de texte ---------- */
.rt p, .rt h1, .rt h2, .rt h3, .rt h4, .rt ul, .rt ol { margin: 0; }
.rt ul, .rt ol { padding-inline-start: 1.3em; margin-inline-start: .5em; }
.rt a { color: inherit; text-decoration: underline; }
.t-text  { font: normal normal normal 20px/1.4em var(--fr); color: var(--txt); }
.t-small { font: normal normal normal 14px/1.4em var(--fr); color: var(--txt); }
.t-h3 { font: normal normal normal 26px/1.4em var(--fb); color: var(--txt); }
.t-h4 { font: normal normal normal 18px/1.4em var(--fb); color: var(--txt); }
.t-h5 { font: normal normal normal 17px/1.4em var(--fb); color: var(--txt); }
.t-h6 { font: normal normal bold 16px/1.4em var(--fb); color: var(--txt); }
.c-navy { color: var(--navy); }
.c-dark { color: var(--txt); }
.c-grey { color: var(--grey); }
.c-light { color: var(--lgrey); }
.c-white { color: #fff; }

/* ---------- Conteneurs fluides ---------- */
.container { width: 100%; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.c980  { max-width: calc(980px + 2 * var(--gutter)); }
.c1200 { max-width: calc(1200px + 2 * var(--gutter)); }
.c1540 { max-width: calc(1540px + 2 * var(--gutter)); }
.c1760 { max-width: calc(1760px + 2 * var(--gutter)); }
.c1820 { max-width: calc(1820px + 2 * var(--gutter)); }
.sec { position: relative; width: 100%; }
.title { text-align: center; }
.hline { width: 46px; height: 1px; background: var(--gold); margin: 9px auto 0; }

/* ---------- En-tête (collant, 98 px) ---------- */
#header {
  position: sticky; top: 0; z-index: 51;
  display: flex; align-items: center;
  height: 98px; padding: 0 20px 0 66px;
  background: #fff;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .45);
}
.logo { display: block; flex: none; width: 167px; height: 60px; }
.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nav { margin-left: auto; height: 60px; }
.nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: 0 15px;
  font: normal normal 700 14px/60px var(--fb);
  color: var(--navy); text-decoration: none; white-space: nowrap;
}
.nav a:hover, .nav li.current a { color: var(--grey); }

/* Sélecteur de langue FR / EN */
.lang { position: relative; flex: none; width: 85px; height: 60px; margin-left: 46px; }
.lang-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 100%; padding: 0 14px 0 13px;
  background: transparent; border: 0; border-bottom: 1px solid transparent; cursor: pointer;
  font: normal normal 700 15px/21px var(--fb); color: var(--navy);
}
.lang-btn svg { width: 9px; height: 5px; fill: currentColor; transition: transform .2s; }
.lang.open .lang-btn { color: #EC5F76; border-bottom-color: #EC5F76; }
.lang.open .lang-btn svg { transform: rotate(180deg); }
.lang-menu { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #fff; padding: 2px 0 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.lang.open .lang-menu { display: block; }
.lang-menu a { display: block; padding: 0 13px; font: normal normal 700 15px/40px var(--fb); color: var(--navy); text-decoration: none; }
.lang-menu a:hover { color: var(--grey); }

.burger, #mmenu { display: none; }

@media (max-width: 1400px) {
  .nav a { padding: 0 10px; }
  .lang { margin-left: 20px; }
}
@media (max-width: 1200px) {
  #header { padding-left: 30px; }
  .nav a { padding: 0 7px; font-size: 13px; }
}

/* ---------- Pied de page ---------- */
#footer { padding: 76px 0 0; min-height: 199px; background: #fff; }
.foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.foot-l { width: 418px; max-width: 100%; }
.foot-r { width: 441px; max-width: 100%; margin-top: 11px; text-align: right; }
#footer p { margin: 0; font: normal normal normal 13px/normal var(--fr); letter-spacing: .08em; color: var(--txt); }
.foot-r p { color: var(--grey); }
#footer a { color: inherit; text-decoration: underline; }
.foot-l .brand { font-weight: bold; color: var(--navy); }

/* ---------- Accueil : diaporama ---------- */
.hero { position: relative; height: 39.1vw; max-height: 751px; min-height: 240px; overflow: hidden; background: #fff; }
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero .slide.active { opacity: 1; z-index: 1; }
.hero .slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.hero-counter {
  position: absolute; z-index: 2; top: 9px; right: 10px;
  font: 12px/14px arial, sans-serif; color: var(--txt); text-align: right;
  opacity: 0; transition: opacity .5s ease;
}
.hero:hover .hero-counter { opacity: 1; }
.hero-chevron { position: absolute; z-index: 3; left: 50%; margin-left: -35px; bottom: 50px; width: 70px; height: 46px; display: block; }
.hero-chevron svg { width: 100%; height: 100%; fill: #fff; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }

/* ---------- Accueil : A PROPOS ---------- */
.home-about { padding: 48px 0 27px; }
.home-about .body { margin-top: 33px; }

/* ---------- Notre histoire ---------- */
.hist-top { padding: 63px 0 12px; }
.hist-title { max-width: 778px; margin: 0 auto; }
.hist-sub { max-width: 679px; margin: 0 auto; }
.hist-img { max-width: 1299px; margin: 50px auto 0; aspect-ratio: 1299 / 520; overflow: hidden; }
.hist-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hist-text { margin-top: 13px; padding: 26px 0 15px; min-height: 852px; }
.hist-text .body { margin-top: 38px; }
.hist-gal { padding: 54px 0 0; min-height: 483px; }
.hist-gal .gal-title { max-width: 450px; margin: 0 auto; }
.hist-gal .slider { max-width: 1540px; height: clamp(165px, 19.27vw, 370px); margin: 34px auto 0; }

/* ---------- Nos services ---------- */
.serv-gal { padding-bottom: 37px; }
.serv-gal .slider { max-width: 1760px; height: clamp(163px, 19.53vw, 375px); margin: 0 auto; }
.serv-text { padding: 25px 0 49px; min-height: 1131px; }
.serv-text .body { margin-top: 47px; }

/* ---------- Réalisations / Piscines ---------- */
.gal-head { padding: 66px 0 59px; }
.gal-sec.realisations { padding-bottom: 46px; }
.gal-sec.piscines { padding-bottom: 66px; }
.gal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px; max-width: 1820px; margin: 0 auto; }
.gal-grid figure { margin: 0; aspect-ratio: 583 / 328; overflow: hidden; }
.gal-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Galerie « slider » (une ligne, défilement horizontal) ---------- */
.slider { position: relative; overflow: hidden; }
.slider-track {
  display: flex; gap: 10px; height: 100%;
  overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track figure { margin: 0; flex: 0 0 auto; height: 100%; overflow: hidden; scroll-snap-align: start; }
.slider-track img { height: 100%; width: auto; max-width: none; display: block; }
.slider-arrow {
  position: absolute; top: 50%; margin-top: -31px; width: 40px; height: 62px; padding: 0;
  background: transparent; border: 0; cursor: pointer; z-index: 2;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55));
  display: none; align-items: center; justify-content: center;
}
.slider-arrow svg { width: 24px; height: 40px; fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: square; }
.slider-arrow.next { right: 23px; }
.slider-arrow.prev { left: 23px; }
.slider-arrow.prev svg { transform: scaleX(-1); }
.slider-arrow.show { display: flex; }

/* ---------- Contact ---------- */
.contact-sec { padding-top: 32px; }
.contact-sec .intro { max-width: 902px; margin: 79px auto 0; }
.contact-row { display: flex; justify-content: center; align-items: flex-start; gap: 74px; margin-top: 55px; }
.cform { width: 492px; max-width: 100%; flex: none; }
.cform .field { display: block; }
.cform .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; } /* champ piège anti-robots, invisible et hors tabulation */
.cform .f1 { margin-top: 8px; }
.cform .f2 { margin-top: 34px; }
.cform .f3 { margin-top: 42px; }
.cform label { display: block; font: normal normal normal 14px/17px "AvenirLight", "Avenir Light", "Avenir", Helvetica, Arial, sans-serif; color: #000; }
.cform input, .cform textarea {
  display: block; width: 100%; max-width: 480px; height: 33px; margin: 0; padding: 0;
  border: 0; border-bottom: 2px solid #000; border-radius: 0; background: #fff;
  font: normal normal normal 14px/17px "AvenirLight", "Avenir Light", "Avenir", Helvetica, Arial, sans-serif; color: #000;
  outline: none; resize: none;
}
.cform textarea { max-width: none; height: 74px; padding-top: 8px; }
.cform input:hover, .cform textarea:hover, .cform input:focus, .cform textarea:focus { border-bottom-color: var(--txt); }
.cform input[aria-invalid="true"] { border-bottom-color: #DF3131; }
.cform .submit {
  display: block; width: 148px; height: 41px; margin-top: 34px; padding: 0;
  border: 0; border-radius: 100px; background: var(--navy); color: #fff; cursor: pointer;
  font: normal normal normal 16px/20px "HelveticaRoman", Helvetica, Arial, sans-serif;
  transition: background-color .2s;
}
.cform .submit:hover { background: #666; }
.cform .submit[disabled] { opacity: .6; cursor: default; }
.cform .thanks { display: none; font: normal normal normal 16px/20px var(--fr); color: #000; margin-top: 40px; }
.cform.sent form { display: none; }
.cform.sent .thanks { display: block; }
.cform .err { display: none; font: 14px/17px "AvenirLight", Helvetica, Arial, sans-serif; color: #DF3131; margin-top: 10px; }
.cform.error .err { display: block; }
.caddr { width: 286px; max-width: 100%; flex: none; margin-top: -8px; }
.contact-sec .map-title { max-width: 910px; margin: 113px auto 0; }
.map { max-width: 1760px; aspect-ratio: 1760 / 668; margin: 30px auto 0; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-ph { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 20px; background: #E8E8E8; text-align: center; }
.map-ph-addr { margin: 0; font: normal normal 700 16px/1.4 var(--fb); color: var(--navy); letter-spacing: 0.04em; }
.map-ph-note { margin: 0; max-width: 520px; font: normal normal normal 13px/1.5 var(--fr); color: var(--grey); }
.map-ph-note a { color: var(--navy); text-decoration: underline; }
.btn { display: inline-block; box-sizing: border-box; padding: 0 28px; font: normal normal 700 14px/41px var(--fb); color: #fff; background: var(--navy); border: 1px solid var(--navy); border-radius: 21px; text-decoration: none; cursor: pointer; transition: background .25s, color .25s; }
.btn:hover, .btn:focus-visible { background: var(--grey); border-color: var(--grey); color: #fff; }
.btn.ghost { background: #fff; color: var(--navy); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--navy); color: #fff; border-color: var(--navy); }
/* page 404 */
.nf { padding-bottom: 90px; }
.nf-code { margin: 40px 0 0; text-align: center; font: normal normal 700 120px/1 var(--fb); color: var(--navy); letter-spacing: 0.05em; }
.nf .hline { margin-top: 24px; }
.nf-text { max-width: 611px; margin: 30px auto 0; text-align: center; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 40px 0 0; }

/* ---------- Pages légales ---------- */
.legal { padding-top: 103px; }
.legal .vline { position: absolute; left: 50%; top: 0; width: 1px; height: 65px; background: var(--lgrey); }
.legal h1 { max-width: 600px; margin: 0 auto; }
.legal .lbody { max-width: 611px; margin: 82px auto 0; }
.legal .lbody.wide { max-width: 980px; }
.legal .lb { margin-top: 20px; }
.legal .lb:first-child { margin-top: 0; }
.legal .lb.h { margin-top: 28px; }
.legal .lb.h:first-child { margin-top: 0; }
.legal .lb.h + .lb { margin-top: 20px; }

/* ======================================================================
   TABLETTE ET MOBILE (< 1024 px)
   ====================================================================== */
@media (max-width: 1023px) {
  /* En-tête compact : logo centré, menu « hamburger », langue dessous à droite */
  #header { display: block; height: 121px; padding: 0; }
  .logo { position: absolute; left: 50%; top: 18px; margin-left: -67px; width: 134px; height: 54px; }
  .nav { display: none; }
  .lang { position: absolute; right: 10px; top: 72px; width: 76px; height: 41px; margin: 0; }
  .lang-btn { padding: 0 10px 0 22px; }
  .lang-menu { top: 41px; }
  .burger {
    display: block; position: absolute; right: 13px; top: 20px; width: 25px; height: 26px;
    padding: 0; border: 0; background: transparent; cursor: pointer;
  }
  .burger span { position: absolute; left: 0; width: 25px; height: 2px; background: var(--navy); }
  .burger span:nth-child(1) { top: 0; }
  .burger span:nth-child(2) { top: 12px; }
  .burger span:nth-child(3) { top: 24px; }

  /* Menu plein écran */
  #mmenu {
    display: block; position: fixed; inset: 0; z-index: 100; background: #fff;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
    overflow-y: auto;
  }
  #mmenu.open { opacity: 1; visibility: visible; }
  .mmenu-close { position: absolute; right: 20px; top: 20px; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
  .mmenu-close::before, .mmenu-close::after { content: ""; position: absolute; left: 3px; top: 14px; width: 24px; height: 2px; background: var(--txt); }
  .mmenu-close::before { transform: rotate(45deg); }
  .mmenu-close::after { transform: rotate(-45deg); }
  #mmenu ul { list-style: none; margin: 80px 0 0; padding: 0; }
  #mmenu li { width: 227px; margin: 0 auto; }
  #mmenu a { display: block; text-align: center; font: normal normal normal 20px/50px var(--fr); color: var(--txt); text-decoration: none; }
  #mmenu li.current a { color: var(--navy); }

  /* Textes */
  .title p, .title span, .hist-title p, .hist-title span { font-size: 21px !important; line-height: 1.4em !important; }
  .body p, .body li, .body span, .lbody p, .lbody span { font-size: 18px !important; }
  .page-histoire .body p, .page-histoire .body span, .page-histoire .body li,
  .page-services .body p[style*="19px"], .page-services .body p[style*="19px"] span,
  .lbody p, .lbody span { font-size: 17px !important; }

  /* Pied de page */
  #footer { padding: 28px 0 0; min-height: 189px; }
  .foot { flex-direction: column; gap: 25px; }
  .foot-l, .foot-r { width: auto; margin: 0; text-align: left; }
  #footer p { font-size: 15px; }

  /* Accueil */
  .hero { height: 62.5vw; max-height: 480px; min-height: 0; }
  .hero-chevron { display: none; }
  .home-about { padding: 20px 0 21px; }
  .hline { margin-top: 20px; }
  .home-about .body { margin-top: 15px; }

  /* Histoire */
  .hist-top { padding: 20px 0 36px; }
  .hist-sub { margin-top: 10px; }
  .hist-sub p, .hist-sub span { font-size: 19px !important; }
  .hist-img { margin-top: 20px; aspect-ratio: 280 / 182; }
  .hist-text { margin-top: 10px; padding: 20px 0 19px; min-height: 0; }
  .hist-text .body { margin-top: 15px; }
  .hist-gal { padding: 20px 0 35px; min-height: 0; }
  .hist-gal .gal-title h3, .hist-gal .gal-title span { font-size: 17px !important; }
  .hist-gal .slider { height: clamp(165px, 51.5vw, 370px); margin-top: 20px; }

  /* Services */
  .serv-gal { padding: 20px 0 33px; }
  .serv-gal .slider { height: clamp(163px, 51vw, 375px); }
  .serv-text { padding: 20px 0 22px; min-height: 0; }
  .serv-text .body { margin-top: 15px; }
  .slider-arrow.next { right: 12px; }
  .slider-arrow.prev { left: 12px; }

  /* Réalisations / Piscines */
  .gal-head { padding: 20px 0 25px; }
  .gal-head.realisations { padding-bottom: 39px; }
  .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .gal-sec.piscines { padding-bottom: 10px; }
  .gal-sec.realisations { padding: 5px 0 14px; }

  /* Contact */
  .contact-sec { padding: 22px 0 20px; }
  .contact-sec .intro { max-width: 290px; margin-top: 15px; text-align: center; }
  .contact-sec .intro p, .contact-sec .intro span { font-size: 15px !important; line-height: 18px !important; }
  .contact-row { flex-direction: column; align-items: center; gap: 38px; margin-top: 34px; }
  .cform { width: 100%; max-width: 420px; }
  .cform input { max-width: none; }
  .cform .submit { width: 100%; }
  .caddr { margin-top: 0; width: 100%; }
  .caddr p, .caddr span { font-size: 16px !important; line-height: 1.8em !important; }
  .contact-sec .map-title { max-width: 290px; margin-top: 58px; }
  .contact-sec .map-title p, .contact-sec .map-title span { font-size: 15px !important; }
  .map { aspect-ratio: 320 / 277; margin-top: 31px; }

  /* Légal */
  .legal { padding-top: 82px; min-height: 0 !important; }
  .nf-code { font-size: 80px; }
  .map-ph { gap: 16px; padding: 16px; }
  .map-ph-addr { font-size: 14px; }
  .map-ph-note { font-size: 12px; }
  .legal h1 { max-width: 320px; }
  .legal h1, .legal h1 span { font-size: 20px !important; }
  .legal .lbody, .legal .lbody.wide { margin-top: 32px; }
  .legal .lb { margin-top: 30px; }
  .legal .lb.h { margin-top: 30px; }
  .legal .lb.h + .lb { margin-top: 20px; }
  .lbody p { line-height: 1.7em !important; }
  .page-politique-de-confidentialite .lbody p { line-height: 1.4em !important; }
}

/* ---------- Petits écrans (< 600 px) ---------- */
@media (max-width: 599px) {
  .gal-grid { grid-template-columns: minmax(0, 1fr); gap: 29px; }
  .foot-l, .foot-r { padding: 0; }
  .hero { max-height: none; }
}
