/* ==================================================================
   SITE — feuille de style publique. S'appuie sur tokens.css.
   ================================================================== */

/* --- Reset doux --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--c-pool-deep); text-underline-offset: 2px; }
a:hover { color: var(--c-pool); }

/* --- Accessibilité : focus visible & lien d'évitement ------------- */
:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); border-radius: 4px; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--c-ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --- Conteneurs --------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
.measure { max-width: var(--measure); }

/* --- Titres ------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-accent); line-height: var(--lh-tight); color: var(--c-ink); font-weight: 600; }
h1 { font-size: var(--fs-800); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-700); }
h3 { font-size: var(--fs-600); }
.eyebrow {
  font-family: var(--font-body); font-size: var(--fs-300); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--c-pool-deep);
  display: inline-flex; align-items: center; gap: .5rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--c-sun); display: inline-block; }
.lede { font-size: var(--fs-500); color: var(--c-ink-soft); }

/* --- Boutons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 600; line-height: 1; cursor: pointer;
  padding: .95rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  min-height: 48px; text-decoration: none; transition: transform var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-pool); color: #fff; box-shadow: var(--shadow-s); }
.btn--primary:hover { background: var(--c-pool-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-ink); border-color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-ink); color: #fff; }
.btn--sun { background: var(--c-sun); color: var(--c-ink); }
.btn--sun:hover { background: #e6b23e; }
/* Variante douce : présente mais discrète (fond bleu clair, pas de bloc plein). */
.btn--soft { background: var(--c-pool-light); color: var(--c-pool-deep); border-color: transparent; }
.btn--soft:hover { background: #a9d6ea; color: var(--c-pool-deep); }
.btn svg { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* --- En-tête / navigation ---------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--c-ivory) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--c-ink); font-weight: 700; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__name { font-family: var(--font-accent); font-size: 1.15rem; line-height: 1.1; }
.brand__name small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--c-ink-soft); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a {
  text-decoration: none; color: var(--c-ink-soft); padding: .55rem .8rem; font-weight: 600;
  border-bottom: 2px solid transparent; border-radius: 6px;
  transition: color var(--dur-fast) var(--ease);
}
.nav a:hover, .nav a:focus-visible { color: var(--c-ink); }
.nav a[aria-current="page"] { color: var(--c-ink); border-bottom-color: var(--c-pool); border-radius: 0; }
.nav a.btn { border-bottom: 0; } /* le CTA garde son style bouton (couleur = variante) */

/* Bloc d'actions à droite : compact et léger, pas de gros bloc bleu. */
.header-cta { display: flex; gap: .5rem; align-items: center; }
.header-cta .btn { min-height: 40px; padding: .5rem 1rem; font-size: .95rem; white-space: nowrap; }
.header-cta .btn svg { width: 18px; height: 18px; }
.nav__call { display: none; } /* Appeler dédié au menu mobile uniquement */

/* Menu mobile */
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .4rem; background: transparent;
    border: 2px solid var(--c-ink); border-radius: 999px; padding: .55rem .9rem;
    font: inherit; font-weight: 600; cursor: pointer; min-height: 44px;
  }
  .nav {
    position: absolute; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--c-ivory); border-bottom: 1px solid var(--c-line); padding: var(--sp-3) var(--gutter) var(--sp-5);
    gap: .3rem; box-shadow: var(--shadow-m);
  }
  .nav a { padding: .8rem .9rem; }
  .nav[hidden] { display: none; }
  /* Sur mobile : le bloc droit disparaît (menu + barre d'appel prennent le relais),
     et l'« Appeler » s'affiche en bas du menu déroulant. */
  .header-cta { display: none; }
  .nav__call { display: inline-flex; justify-content: center; margin-top: .5rem; }
}

/* --- Héro --------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-7);
  align-items: center; padding-block: var(--sp-8);
}
.hero__title { margin-bottom: var(--sp-4); }
.hero__title .accent { color: var(--c-pool-deep); }
.hero__lede { margin-bottom: var(--sp-5); max-width: 46ch; }
.hero__art { position: relative; }
.hero__pool { width: 100%; height: auto; border-radius: var(--radius-l); box-shadow: var(--shadow-m); background: var(--c-pool-light); }
.hero__photo {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-l);
  box-shadow: var(--shadow-m);
}
.hero__note {
  position: absolute; bottom: -14px; left: 18px; background: var(--c-white);
  border: 1px solid var(--c-line); border-radius: 999px; padding: .5rem .9rem;
  font-size: var(--fs-300); box-shadow: var(--shadow-s); display: inline-flex; gap: .4rem;
  align-items: center; white-space: nowrap; max-width: calc(100% - 36px);
}
.hero__note svg { width: 18px; height: 18px; color: var(--c-pool); flex: none; }
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-6); padding-block: var(--sp-7); }
}

/* --- Bandeaux / rythme ------------------------------------------- */
.band-ivory-deep { background: var(--c-ivory-deep); }
.rule { height: 1px; background: var(--c-line); border: 0; margin-block: 0; }
.wave-divider { height: clamp(58px, 8vw, 106px); margin-block: -1px; }

/* --- Grille de cartes prestations -------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-4); }
.card {
  background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-m);
  padding: var(--sp-5); box-shadow: var(--shadow-s);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.card__icon { width: 44px; height: 44px; margin-bottom: var(--sp-3); color: var(--c-pool); }
.card__icon svg { width: 100%; height: 100%; }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--c-ink-soft); }

/* --- Prestations : accordéons dépliables ------------------------- */
.services-list { display: grid; gap: var(--sp-3); }
.service {
  background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-m);
  box-shadow: var(--shadow-s); overflow: hidden;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.service[open] { box-shadow: var(--shadow-m); border-color: var(--c-pool-light); }
.service__head {
  display: grid; grid-template-columns: 48px 1fr auto; gap: var(--sp-4); align-items: center;
  padding: var(--sp-4) var(--sp-5); cursor: pointer; list-style: none;
}
.service__head::-webkit-details-marker { display: none; }
.service__head:focus-visible { outline: var(--focus); outline-offset: -3px; border-radius: var(--radius-m); }
.service__icon { width: 46px; height: 46px; color: var(--c-pool); }
.service__icon svg { width: 100%; height: 100%; }
.service__title { display: block; font-family: var(--font-accent); font-size: var(--fs-600); line-height: 1.2; color: var(--c-ink); }
.service__body { display: block; color: var(--c-ink-soft); margin-top: 3px; }
.service__chevron {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--c-ivory-deep); color: var(--c-ink);
  transition: transform .3s var(--ease), background .2s var(--ease);
}
.service__chevron svg { width: 20px; height: 20px; }
.service[open] .service__chevron { transform: rotate(180deg); }
.service__head:hover .service__chevron,
.service__head:focus-visible .service__chevron { background: var(--c-pool-light); color: var(--c-pool-deep); }
.service__detail {
  padding: 0 var(--sp-5) var(--sp-5) calc(48px + var(--sp-4) + var(--sp-5));
}
.service__detail p { color: var(--c-ink-soft); max-width: 70ch; }
@media (max-width: 600px) {
  .service__detail { padding-left: var(--sp-5); }
  .service__head { padding: var(--sp-3) var(--sp-4); gap: var(--sp-3); }
}

/* --- « Vues du terrain » : galerie ------------------------------- */
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.field {
  position: relative; border-radius: var(--radius-m); overflow: hidden; background: var(--c-ivory-deep);
  border: 1px solid var(--c-line);
}
.field img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.field figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .6rem .8rem;
  font-size: var(--fs-300); color: #fff;
  background: linear-gradient(to top, rgba(15,42,67,.78), rgba(15,42,67,0));
}
.field__placeholder { display: grid; place-items: center; aspect-ratio: 4/3; color: var(--c-ink-soft); padding: var(--sp-4); text-align: center; }

/* --- Galerie « Réalisations » ------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }
.gallery-item {
  position: relative; display: block; border-radius: var(--radius-m); overflow: hidden;
  background: var(--c-ivory-deep); border: 1px solid var(--c-line); box-shadow: var(--shadow-s);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.gallery-item:hover, .gallery-item:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-item__cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .7rem .8rem;
  font-size: var(--fs-300); color: #fff;
  background: linear-gradient(to top, rgba(15,42,67,.82), rgba(15,42,67,0));
}
.gallery-item__zoom {
  position: absolute; top: .6rem; right: .6rem; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--c-pool-deep);
  opacity: 0; transform: scale(.85); transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.gallery-item__zoom svg { width: 18px; height: 18px; }
.gallery-item:hover .gallery-item__zoom, .gallery-item:focus-visible .gallery-item__zoom { opacity: 1; transform: scale(1); }

/* Visionneuse (dialog natif) */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(9,24,38,.86); }
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; }
.lightbox__fig { margin: 0; display: grid; justify-items: center; gap: .6rem; }
.lightbox__img { max-width: 88vw; max-height: 84vh; border-radius: var(--radius-s); box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.lightbox__cap { color: #EAF1F6; font-size: var(--fs-300); text-align: center; max-width: 60ch; }
.lightbox__close, .lightbox__nav {
  background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%;
  width: 46px; height: 46px; font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; transition: background var(--dur-fast) var(--ease);
}
.lightbox__close { position: fixed; top: 1rem; right: 1rem; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.28); }
@media (max-width: 640px) {
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__cap { max-width: 88vw; }
}

/* État vide (pas encore de réalisations) */
.empty-realisations { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 780px) { .empty-realisations { grid-template-columns: 1fr; gap: var(--sp-5); } }

/* Cartes de réalisation (projets) */
.realisations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--sp-4); }
.realisation-card {
  display: block; text-decoration: none; color: inherit; background: var(--c-white);
  border: 1px solid var(--c-line); border-radius: var(--radius-m); overflow: hidden;
  box-shadow: var(--shadow-s); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.realisation-card:hover, .realisation-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-m); }
.realisation-card__cover { position: relative; background: var(--c-ivory-deep); }
.realisation-card__cover img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.realisation-card__count {
  position: absolute; top: .6rem; right: .6rem; display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(15,42,67,.82); color: #fff; border-radius: 999px; padding: .25rem .6rem;
  font-size: var(--fs-300); font-weight: 600;
}
.realisation-card__count svg { width: 15px; height: 15px; }
.realisation-card__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.realisation-card__title { font-family: var(--font-accent); font-size: var(--fs-600); margin-bottom: .3rem; }
.realisation-card__body p { color: var(--c-ink-soft); }
.realisation-card__more { display: inline-flex; align-items: center; gap: .35rem; color: var(--c-pool-deep); font-weight: 600; margin-top: var(--sp-3); }
.realisation-card__more svg { width: 18px; height: 18px; }

/* Fenêtre de détail (dialog) */
.realisation-modal { border: 0; padding: 0; background: transparent; width: min(920px, 94vw); max-width: 94vw; max-height: 92vh; }
.realisation-modal::backdrop { background: rgba(9, 24, 38, .82); }
.realisation-modal[open] { margin: auto; }
.realisation-modal__box { background: var(--c-ivory); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-m); display: flex; flex-direction: column; max-height: 92vh; }
.realisation-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--c-line); background: var(--c-white);
}
.realisation-modal__head h2 { font-family: var(--font-accent); font-size: var(--fs-600); }
.realisation-modal__close { text-decoration: none; font-size: 1.9rem; line-height: 1; color: var(--c-ink-soft); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.realisation-modal__close:hover { background: var(--c-ivory-deep); color: var(--c-ink); }
.realisation-modal__content { overflow-y: auto; padding: var(--sp-5); }
.realisation-modal__desc { color: var(--c-ink-soft); max-width: 70ch; margin-bottom: var(--sp-5); }
.realisation-modal__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }
.realisation-modal__photos img { width: 100%; border-radius: var(--radius-m); box-shadow: var(--shadow-s); background: var(--c-ivory-deep); }
/* Repli sans JS : la fenêtre ouverte s'affiche dans le flux, proprement. */
.realisation-modal[open]:not(:modal) { position: static; margin: var(--sp-6) auto; }

/* --- Bloc « à propos » ------------------------------------------- */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--sp-7); align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: var(--sp-5); } }
.about__portrait { border-radius: var(--radius-l); background: var(--c-pool-light); box-shadow: var(--shadow-s); }

/* --- Liste d'infos pratiques ------------------------------------- */
.facts { list-style: none; padding: 0; display: grid; gap: var(--sp-3); }
.facts li { display: flex; gap: .7rem; align-items: flex-start; }
.facts svg { width: 22px; height: 22px; color: var(--c-pool); flex: none; margin-top: 2px; }

/* --- Tableau horaires -------------------------------------------- */
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; font-weight: 700; padding-bottom: var(--sp-2); color: var(--c-ink); }
.hours th, .hours td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--c-line); }
.hours td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr:has(td[data-closed="1"]) td { color: var(--c-ink-soft); }
.hours-note { margin-top: var(--sp-3); background: var(--c-warn-bg); border: 1px solid #ecd9a6; border-radius: var(--radius-s); padding: .7rem .9rem; color: var(--c-warn); font-size: var(--fs-300); }

/* --- Formulaire --------------------------------------------------- */
.form { display: grid; gap: var(--sp-4); max-width: 40rem; }
.field-group { display: grid; gap: .35rem; }
.field-group label { font-weight: 600; }
.field-group .hint { font-size: var(--fs-300); color: var(--c-ink-soft); }
input, textarea, select {
  font: inherit; color: var(--c-ink); background: var(--c-white);
  border: 1.5px solid var(--c-line); border-radius: var(--radius-s); padding: .75rem .85rem; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--c-pool); }
textarea { min-height: 8rem; resize: vertical; }
.input-error { border-color: var(--c-error); }
.error-text { color: var(--c-error); font-size: var(--fs-300); }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; }
.checkbox input { width: auto; margin-top: .25rem; }
/* Champ piège (honeypot) : caché aux humains, présent pour les robots. */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.segmented { display: inline-flex; border: 1.5px solid var(--c-line); border-radius: 999px; overflow: hidden; }
.segmented label { padding: .5rem 1rem; cursor: pointer; font-weight: 600; }
.segmented input { position: absolute; opacity: 0; }
.segmented input:checked + label { background: var(--c-pool); color: #fff; }

/* --- Messages flash ---------------------------------------------- */
.flash { border-radius: var(--radius-s); padding: .85rem 1rem; margin-bottom: var(--sp-4); border: 1px solid; display: flex; gap: .6rem; }
.flash--success { background: var(--c-success-bg); border-color: #bfe3cc; color: var(--c-success); }
.flash--error { background: var(--c-error-bg); border-color: #f2c7c1; color: var(--c-error); }

/* --- Pied de page ------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding-block: var(--sp-7) var(--sp-5); margin-top: var(--sp-8); }
.site-footer a { color: var(--footer-fg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-6); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); } }
.footer-grid h4 { font-family: var(--font-body); font-size: var(--fs-300); text-transform: uppercase; letter-spacing: .1em; color: var(--footer-soft); margin-bottom: var(--sp-3); }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer-bottom { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,.12); font-size: var(--fs-300); color: var(--footer-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-2); }

/* --- Barre d'appel mobile fixe ----------------------------------- */
.callbar { display: none; }
@media (max-width: 640px) {
  .callbar {
    display: grid; grid-auto-flow: column; position: fixed; inset: auto 0 0 0; z-index: 45;
    background: var(--c-white); border-top: 1px solid var(--c-line); box-shadow: 0 -4px 16px rgba(15,42,67,.08);
    padding: .5rem calc(env(safe-area-inset-right)) calc(.5rem + env(safe-area-inset-bottom)) calc(env(safe-area-inset-left));
    gap: .5rem;
  }
  .callbar .btn { border-radius: var(--radius-s); }
  body { padding-bottom: 78px; }
}

/* --- Bandeau garde-fou publication (visible admin connecté) ------- */
.publish-warning {
  background: var(--c-warn-bg); border-bottom: 1px solid #ecd9a6; color: var(--c-warn);
  font-size: var(--fs-300); text-align: center; padding: .5rem 1rem;
}

/* --- Utilitaires ------------------------------------------------- */
.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.center { text-align: center; }
.mt-6 { margin-top: var(--sp-6); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tag-pill { display: inline-block; background: var(--c-pool-light); color: var(--c-ink); border-radius: 999px; padding: .2rem .7rem; font-size: var(--fs-300); font-weight: 600; }
