/* ==========================================================================
   TP SERVICES — Gwendal Tissard | tp-services.bzh
   Feuille de style unique. Aucune dépendance externe, aucune police distante.
   ========================================================================== */

:root {
  --anthracite: #1c1f24;
  --anthracite-clair: #2a2f37;
  --gris: #5c646f;
  --bordure: #e2e5ea;
  --fond: #ffffff;
  --fond-alt: #f5f6f8;
  /* Couleurs reprises de la carte de visite : noir, cyan et bleu. */
  --accent: #2fb3d4;
  --accent-fonce: #17738d;   /* variante lisible sur fond blanc (contraste AA) */

  --max: 1180px;
  --gouttiere: 1.5rem;
  --rayon: 6px;
  --ombre: 0 2px 14px rgba(28, 31, 36, .09);
  --ombre-forte: 0 12px 40px rgba(28, 31, 36, .18);
  --transition: .22s ease;

  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------- Base --------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--police);
  font-size: 17px;
  line-height: 1.65;
  color: var(--anthracite);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-fonce); }

img { max-width: 100%; height: auto; display: block; }

ul { padding-left: 1.15rem; }
li { margin-bottom: .4em; }

.conteneur { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gouttiere); }

/* Lien d'évitement (accessibilité clavier) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--anthracite);
  padding: .7rem 1.2rem; font-weight: 700;
}
.skip-link:focus { left: .5rem; top: .5rem; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------- Boutons -------- */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.5rem;
  font-weight: 700; font-size: .97rem;
  border: 2px solid transparent; border-radius: var(--rayon);
  cursor: pointer; text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn-primaire { background: var(--accent); color: var(--anthracite); border-color: var(--accent); }
.btn-primaire:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); color: var(--anthracite); }

.btn-secondaire { background: transparent; color: var(--anthracite); border-color: var(--anthracite); }
.btn-secondaire:hover { background: var(--anthracite); color: #fff; }

.btn-clair { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn-clair:hover { background: #fff; color: var(--anthracite); border-color: #fff; }

/* ----------------------------------------------------- Bandeau ---------- */

/* Un cran plus sombre que l'en-tête, pour que les deux bandes se distinguent. */
.bandeau-haut {
  background: #101317;
  color: rgba(255, 255, 255, .82);
  font-size: .84rem;
}
.bandeau-haut .conteneur {
  display: flex; flex-wrap: wrap; gap: .4rem 1.6rem;
  align-items: center; justify-content: flex-end;
  min-height: 40px;
}
.bandeau-haut a { text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.bandeau-haut a:hover { color: var(--accent); }
.bandeau-haut svg { width: 15px; height: 15px; flex: none; }

/* ---------------------------------------------------- En-tête ----------- */

/* En-tête sombre : le logo de la carte de visite est conçu sur fond noir
   (lettrage blanc). Un en-tête clair le rendrait illisible. */
.entete {
  position: sticky; top: 0; z-index: 100;
  background: rgba(28, 31, 36, .97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
}
.entete .conteneur {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 78px;
}

.logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.logo img { height: 56px; width: auto; display: block; }

.nav-principale ul {
  display: flex; align-items: center; gap: .35rem;
  list-style: none; margin: 0; padding: 0;
}
.nav-principale li { margin: 0; }
.nav-principale a {
  display: block; padding: .55rem .8rem;
  font-size: .93rem; font-weight: 600; text-decoration: none;
  border-radius: var(--rayon);
  transition: background var(--transition), color var(--transition);
}
.nav-principale a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav-principale a[aria-current="page"] { color: var(--accent); }
.nav-principale .btn { margin-left: .5rem; padding: .62rem 1.1rem; }
.nav-principale .btn:hover { color: var(--anthracite); }

.burger {
  display: none;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid rgba(255, 255, 255, .3); border-radius: var(--rayon);
  cursor: pointer;
}
.burger span {
  display: block; width: 20px; height: 2px; margin: 4px auto;
  background: #fff;
  transition: transform var(--transition), opacity var(--transition);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .burger { display: block; }
  .nav-principale {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--anthracite); border-bottom: 1px solid rgba(255, 255, 255, .12);
    box-shadow: var(--ombre-forte);
    display: none;
  }
  .nav-principale.est-ouverte { display: block; }
  .nav-principale ul { flex-direction: column; align-items: stretch; gap: 0; padding: .6rem var(--gouttiere) 1.1rem; }
  .nav-principale a { padding: .85rem .2rem; border-bottom: 1px solid rgba(255, 255, 255, .12); border-radius: 0; }
  .nav-principale .btn { margin: .8rem 0 0; justify-content: center; border-bottom: 0; }
}

/* -------------------------------------------------------- Héros --------- */

.heros {
  position: relative;
  display: flex; align-items: center;
  min-height: 82vh;
  color: #fff;
  background: var(--anthracite);
  overflow: hidden;
}
.heros-image {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .48;
}
.heros::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(28, 31, 36, .9) 0%, rgba(28, 31, 36, .62) 55%, rgba(28, 31, 36, .35) 100%);
}
.heros .conteneur { position: relative; z-index: 2; padding-top: 5rem; padding-bottom: 5rem; }
.heros-contenu { max-width: 700px; }
.heros h1 { color: #fff; margin-bottom: .5em; }
.heros h1 em { font-style: normal; color: var(--accent); }
.heros-intro { font-size: 1.14rem; color: rgba(255, 255, 255, .88); max-width: 58ch; }
.heros-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.surtitre {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.surtitre-sombre { color: var(--accent-fonce); }

/* Bande d'atouts sous le héros */
.atouts {
  background: var(--accent);
  color: var(--anthracite);
}
.atouts ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem 2rem;
  list-style: none; margin: 0; padding: 1.4rem 0;
}
.atouts li { display: flex; align-items: center; gap: .7rem; margin: 0; font-weight: 600; font-size: .95rem; }
.atouts svg { width: 22px; height: 22px; flex: none; }

/* ------------------------------------------------------ Sections -------- */

.section { padding: 5rem 0; }
.section-alt { background: var(--fond-alt); }
.section-sombre { background: var(--anthracite); color: #fff; }
.section-sombre h2 { color: #fff; }

.section-entete { max-width: 62ch; margin-bottom: 3rem; }
.section-entete.centree { margin-left: auto; margin-right: auto; text-align: center; }
.section-entete p { color: var(--gris); font-size: 1.05rem; }
.section-sombre .section-entete p { color: rgba(255, 255, 255, .78); }

/* --------------------------------------------------- Cartes service ----- */

.grille-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.6rem;
}

.carte-service {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.carte-service:hover {
  transform: translateY(-5px);
  box-shadow: var(--ombre-forte);
  border-color: var(--accent);
  color: inherit;
}
.carte-service-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--fond-alt); }
.carte-service-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.carte-service:hover .carte-service-media img { transform: scale(1.05); }
.carte-service-corps { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.carte-service-corps h3 { margin-bottom: .5rem; }
.carte-service-corps p { color: var(--gris); font-size: .96rem; }
.carte-service-lien {
  margin-top: auto; padding-top: 1rem;
  font-weight: 700; font-size: .9rem; color: var(--accent-fonce);
  display: inline-flex; align-items: center; gap: .4rem;
}
.carte-service:hover .carte-service-lien gap { gap: .7rem; }

/* ------------------------------------------------------ Deux colonnes --- */

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.duo-media img { border-radius: var(--rayon); box-shadow: var(--ombre); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; gap: 2.2rem; } }

.liste-cochee { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.liste-cochee li {
  position: relative; padding-left: 1.9rem; margin-bottom: .7rem;
}
.liste-cochee li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent-fonce);
  border-bottom: 2.5px solid var(--accent-fonce);
  transform: rotate(-45deg);
}
.section-sombre .liste-cochee li::before { border-color: var(--accent); }

/* ---------------------------------------------------------- Chiffres ---- */

.chiffres {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem;
  text-align: center;
}
.chiffre-valeur {
  display: block; font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800;
  color: var(--accent); line-height: 1;
}
.chiffre-label { font-size: .92rem; color: rgba(255, 255, 255, .75); margin-top: .5rem; }

/* ------------------------------------------------------- Étapes --------- */

.etapes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2rem;
  counter-reset: etape;
}
.etape { counter-increment: etape; }
.etape::before {
  content: counter(etape, decimal-leading-zero);
  display: block;
  font-size: 2.1rem; font-weight: 800; color: var(--accent);
  line-height: 1; margin-bottom: .7rem;
}
.etape h3 { font-size: 1.08rem; }
.etape p { color: var(--gris); font-size: .95rem; }

/* ------------------------------------------------------ Galerie --------- */

.filtres-galerie {
  display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem;
}
.filtre {
  padding: .5rem 1.1rem;
  font-size: .9rem; font-weight: 600; font-family: inherit;
  background: #fff; color: var(--anthracite);
  border: 1px solid var(--bordure); border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.filtre:hover { border-color: var(--accent); }
.filtre[aria-pressed="true"] { background: var(--anthracite); border-color: var(--anthracite); color: #fff; }

.galerie {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.galerie-element {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0; border: 0; border-radius: var(--rayon);
  overflow: hidden; cursor: zoom-in; background: var(--fond-alt);
}
.galerie-element img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
}
.galerie-element:hover img { transform: scale(1.07); }
.galerie-element figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem .9rem .8rem;
  font-size: .82rem; font-weight: 600; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(28, 31, 36, .82));
}
.galerie-element[hidden] { display: none; }

/* Visionneuse plein écran */
.visionneuse {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(15, 17, 20, .95);
  padding: 1.5rem;
}
.visionneuse[open], .visionneuse.est-ouverte { display: flex; }
.visionneuse img {
  max-width: 100%; max-height: 84vh;
  border-radius: var(--rayon);
  object-fit: contain;
}
.visionneuse-legende {
  position: absolute; bottom: 1.4rem; left: 0; right: 0;
  text-align: center; color: rgba(255, 255, 255, .82); font-size: .9rem;
}
.visionneuse button {
  position: absolute;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 0; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background var(--transition);
}
.visionneuse button:hover { background: rgba(255, 255, 255, .28); }
.visionneuse-fermer { top: 1.2rem; right: 1.2rem; }
.visionneuse-prec { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.visionneuse-suiv { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------- Zone ----------- */

.communes {
  display: flex; flex-wrap: wrap; gap: .5rem;
  list-style: none; padding: 0; margin: 1.6rem 0 0;
}
.communes li {
  margin: 0;
  padding: .38rem .9rem;
  font-size: .88rem;
  background: #fff; border: 1px solid var(--bordure); border-radius: 999px;
}
.section-sombre .communes li { background: var(--anthracite-clair); border-color: var(--anthracite-clair); }

/* ------------------------------------------------------ Appel action ---- */

.appel-action {
  background: var(--anthracite);
  color: #fff;
  text-align: center;
  padding: 4.5rem 0;
}
.appel-action h2 { color: #fff; }
.appel-action p { color: rgba(255, 255, 255, .8); max-width: 56ch; margin-inline: auto; }
.appel-action .actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2rem; }

/* -------------------------------------------------------- Contact ------- */

.grille-contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: start; }
@media (max-width: 900px) { .grille-contact { grid-template-columns: 1fr; gap: 2.5rem; } }

.coordonnees { list-style: none; padding: 0; margin: 0; }
.coordonnees li { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.coordonnees svg { width: 22px; height: 22px; flex: none; margin-top: .28rem; color: var(--accent-fonce); }
.coordonnees strong { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); font-weight: 700; }
.coordonnees a { text-decoration: none; font-weight: 600; }
.coordonnees a:hover { text-decoration: underline; }

/* Bloc de contact direct (il n'y a volontairement pas de formulaire :
   le client préfère être joint par téléphone ou par e-mail). */
.bloc-contact {
  background: #fff;
  border: 1px solid var(--bordure);
  border-top: 4px solid var(--accent);
  border-radius: var(--rayon);
  padding: 2rem;
  box-shadow: var(--ombre);
}
.bloc-contact h2 { font-size: 1.35rem; }
.bloc-contact h3 { margin-top: 2rem; font-size: 1.02rem; }
.bloc-contact > p { color: var(--gris); font-size: .96rem; }

.contact-actions {
  display: flex; flex-direction: column; gap: .8rem;
  margin: 1.6rem 0 1rem;
}
.contact-actions .btn { justify-content: center; }
.contact-actions svg { flex: none; }

.contact-note { font-size: .86rem; color: var(--gris); }

.carte-plan {
  width: 100%; height: 320px;
  border: 1px solid var(--bordure); border-radius: var(--rayon);
}

/* ---------------------------------------------------------- Pages ------- */

.entete-page {
  position: relative;
  background: var(--anthracite);
  color: #fff;
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}
.entete-page-image {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .32;
}
.entete-page::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(28, 31, 36, .9), rgba(28, 31, 36, .6));
}
.entete-page .conteneur { position: relative; z-index: 2; }
.entete-page h1 { color: #fff; margin-bottom: .3em; }
.entete-page p { color: rgba(255, 255, 255, .85); max-width: 60ch; }

.fil-ariane { font-size: .84rem; margin-bottom: 1.2rem; color: rgba(255, 255, 255, .7); }
.fil-ariane ol { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.fil-ariane li { margin: 0; }
.fil-ariane li + li::before { content: "/"; margin-right: .45rem; opacity: .55; }
.fil-ariane a { text-decoration: none; }
.fil-ariane a:hover { color: var(--accent); }

/* Contenu rédactionnel long (services, pages légales) */
.contenu { max-width: 74ch; }
.contenu h2 { margin-top: 2.6rem; }
.contenu h2:first-child { margin-top: 0; }
.contenu h3 { margin-top: 1.9rem; }
.contenu ul { margin-bottom: 1.2rem; }
.contenu table { width: 100%; border-collapse: collapse; margin-bottom: 1.4rem; font-size: .95rem; }
.contenu th, .contenu td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--bordure); vertical-align: top; }
.contenu th { width: 34%; font-weight: 700; }

.encadre {
  background: var(--fond-alt);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--rayon) var(--rayon) 0;
  padding: 1.3rem 1.5rem;
  margin: 2rem 0;
}
.encadre h3 { margin-top: 0; font-size: 1.05rem; }
.encadre p:last-child { margin-bottom: 0; }

/* Grille prestations d'une page service */
.grille-prestations {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem;
}
.prestation {
  background: #fff;
  border: 1px solid var(--bordure);
  border-top: 3px solid var(--accent);
  border-radius: var(--rayon);
  padding: 1.5rem;
}
.prestation h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.prestation p { font-size: .94rem; color: var(--gris); margin: 0; }

/* Questions fréquentes */
.faq details {
  border-bottom: 1px solid var(--bordure);
  padding: 1.1rem 0;
}
.faq summary {
  font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--accent-fonce); flex: none; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: .9rem; color: var(--gris); }

/* ---------------------------------------------------- Pied de page ------ */

.pied {
  background: var(--anthracite);
  color: rgba(255, 255, 255, .72);
  font-size: .92rem;
  padding-top: 4rem;
}
.pied a { text-decoration: none; }
.pied a:hover { color: var(--accent); }
.pied h3 { color: #fff; font-size: .82rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 1.1rem; }
.pied-grille {
  display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.3fr; gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 860px) { .pied-grille { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .pied-grille { grid-template-columns: 1fr; } }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: .55rem; }
.pied-marque p { margin-top: 1.1rem; max-width: 34ch; font-size: .9rem; }
/* Le logo de la carte de visite est sur fond noir : il ne s'intègre que sur
   les fonds sombres (pied de page). Ailleurs, on utilise le pictogramme SVG. */
.pied-logo { width: 190px; height: auto; }

.pied-bas {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.4rem 0;
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem;
  justify-content: space-between; align-items: center;
  font-size: .85rem;
}
.pied-bas ul { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.pied-bas li { margin: 0; }

/* Bouton d'appel flottant sur mobile */
.appel-flottant {
  display: none;
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
  justify-content: center;
  box-shadow: var(--ombre-forte);
}
@media (max-width: 640px) {
  .appel-flottant { display: flex; }
  .pied { padding-bottom: 4.5rem; }
}

/* ------------------------------------------------- Préférences user ----- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .entete, .bandeau-haut, .pied, .appel-flottant, .heros-actions, .visionneuse { display: none !important; }
  body { font-size: 12pt; color: #000; }
}
