:root {
  --navy: #1a2f4a;
  --navy-light: #243d5c;
  --gold: #c5a572;
  --gold-hover: #b8945f;
  --cream: #f7f5f1;
  --white: #ffffff;
  --text: #2d3748;
  --text-muted: #5a6578;
  --red-blink: #e53935;
  --shadow: 0 12px 40px rgba(26, 47, 74, 0.1);
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  padding-top: 48px;
  line-height: 1.65;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }
.page-stack { padding: 2rem 0 4rem; display: flex; flex-direction: column; gap: 2rem; }

/* Barre urgence fixe */
.sticky-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
  background: linear-gradient(90deg, #0f1c2e, var(--navy));
  border-bottom: 2px solid var(--red-blink);
}
.sticky-bar__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1rem; padding: 0.55rem 1rem; font-size: 0.88rem;
}
.sticky-bar__urgence { color: var(--gold); font-weight: 700; letter-spacing: 0.06em; }
.blink-red { color: var(--red-blink) !important; font-weight: 700; text-decoration: none; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0.4; } }

/* Header */
.site-header {
  background: var(--white);
  box-shadow: 0 1px 0 rgba(26, 47, 74, 0.08);
  position: sticky; top: 48px; z-index: 999;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.75rem; padding: 0.9rem 0;
}
.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--navy); flex-shrink: 0; }
.logo-img {
  display: block;
  height: 72px;
  width: auto;
  max-width: min(240px, 46vw);
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.main-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.main-nav a {
  color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--gold-hover); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.7rem 1.25rem; border-radius: 8px; font-weight: 600;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  font-family: inherit; font-size: 0.95rem; transition: all 0.2s;
}
.btn--primary { background: var(--gold); color: var(--navy); }
.btn--primary:hover { background: var(--gold-hover); color: var(--white); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--ghost { color: var(--navy); background: rgba(26, 47, 74, 0.06); }
.btn--header { background: var(--navy); color: var(--white); padding: 0.55rem 1rem; font-size: 0.85rem; border-radius: 8px; text-decoration: none; }
.btn--large { padding: 1rem 1.5rem; font-size: 1rem; width: 100%; max-width: 420px; }

/* Hero */
.hero {
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-light) 55%, #3d5a73 100%);
  color: var(--white); padding: 3.5rem 0 4rem;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -10%; top: -30%;
  width: 50%; height: 160%; background: radial-gradient(circle, rgba(197, 165, 114, 0.15), transparent 70%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__kicker {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem;
  color: var(--gold); margin: 0 0 0.75rem; font-weight: 600;
}
.hero__title {
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 1rem; line-height: 1.15; font-weight: 700;
}
.hero__subtitle { font-size: 1.1rem; max-width: 640px; opacity: 0.92; margin: 0 0 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero .kw-link { color: var(--gold); }

/* Cards & prose */
.content-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(26, 47, 74, 0.06);
}
.content-card__title, .section-title, .page-title {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0 0 1.25rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.page-title { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.prose-p, .lead { color: var(--text); margin: 0 0 0.5rem; }
.lead { color: var(--text-muted); margin-bottom: 1rem; }
/* Mots-clés cliquables + infobulle au survol */
.kw-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  position: relative;
  cursor: pointer;
}
.kw-link--int {
  color: #1d4ed8;
  text-decoration-color: #93c5fd;
}
.kw-link--ext {
  color: #9a6b2f;
  text-decoration-color: var(--gold);
}
.kw-link:hover {
  text-decoration-thickness: 2px;
}
.kw-link::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) scale(0.95);
  padding: 0.45rem 0.65rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  max-width: min(320px, 90vw);
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  pointer-events: none;
  z-index: 50;
  text-decoration: none;
}
.kw-link:hover::after,
.kw-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) scale(1);
}
.kw-demo { padding: 0 0.2em; }

/* Bloc maillage */
.mesh-block .mesh-columns {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-top: 1.5rem;
}
@media (max-width: 768px) {
  .mesh-block .mesh-columns { grid-template-columns: 1fr; }
}
.mesh-internal,
.mesh-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mesh-internal li,
.mesh-group li {
  margin-bottom: 0.5rem;
}
.mesh-internal a,
.mesh-ext {
  color: var(--navy);
  font-weight: 500;
}
.mesh-host {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.35rem;
}
.mesh-external-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.mesh-group h4 {
  margin: 0 0 0.5rem;
  text-transform: capitalize;
  color: var(--gold-hover);
  font-size: 0.9rem;
}
.tags-cloud .tag .kw-link {
  font-size: inherit;
}

/* Bloc fin de section : une barre + une photo */
.section-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(26, 47, 74, 0.08);
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .section-footer {
    grid-template-columns: 1fr min(320px, 40%);
    align-items: start;
  }
}
.section-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.section-figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 280px;
}
.content-card--with-media .prose-p:last-child {
  margin-bottom: 0;
}

/* Nos services — une fois par bloc */
.nos-services {
  margin: 0;
  padding: 0;
}
.nos-services__title {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.nos-services__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.nos-services__btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  background: #3d454d;
  color: var(--white) !important;
  text-decoration: none !important;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
}
.nos-services__btn:hover {
  background: var(--navy);
  transform: translateY(-1px);
}

/* Tags */
.tags-section { padding: 0; }
.tags-section h2 { font-family: var(--font-display); color: var(--navy); }
.tags-cloud {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1rem;
}
.tag {
  font-size: 0.78rem;
  padding: 0.4rem 0.75rem;
  background: var(--white);
  border: 1px solid rgba(26, 47, 74, 0.12);
  border-radius: 999px;
  color: var(--navy-light);
  text-decoration: none;
  transition: all 0.2s;
}
.tag:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Visio */
.visio-block { padding: 3rem 0; background: var(--white); margin: 0 -999px; padding-left: 999px; padding-right: 999px; }
.visio-grid {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 2.5rem; align-items: center;
  max-width: 1140px; margin: 0 auto; padding: 0 1.25rem;
}
@media (max-width: 900px) { .visio-grid { grid-template-columns: 1fr; } }
.visio-phone { position: relative; min-height: 340px; }
.phone-frame {
  width: 210px; margin: 0 auto; border: 10px solid #1a1a1a;
  border-radius: 32px; overflow: hidden; position: relative; z-index: 2;
  box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}
.phone-screen { background: #fff; display: flex; flex-direction: column; min-height: 380px; }
.phone-header {
  background: var(--navy); color: #fff; padding: 0.85rem;
  text-align: center; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em;
}
.phone-body { flex: 1; min-height: 260px; overflow: hidden; background: #e8ecf0; }
.phone-tech-photo {
  width: 100%; height: 100%; min-height: 260px;
  object-fit: cover; object-position: 42% 15%; display: block;
}
/* Technicien pointe vers le texte (à droite de l'écran téléphone) */
.phone-tech-photo--point-right {
  transform: scaleX(-1);
  object-position: 58% 15%;
}
.phone-btn {
  margin: 0.85rem; background: var(--gold); text-align: center; padding: 0.75rem;
  border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 0.68rem; color: var(--navy);
}
.visio-blob { position: absolute; border-radius: 50%; z-index: 0; }
.visio-blob--gold { width: 200px; height: 200px; background: var(--gold); opacity: 0.35; top: 10px; left: 0; }
.visio-blob--navy { width: 240px; height: 240px; background: var(--navy); opacity: 0.2; bottom: 0; right: 10px; }
.accent { color: var(--gold-hover); }

/* Forms */
.devis-form label, .avis-form label {
  display: block; margin-bottom: 1rem; font-weight: 600; font-size: 0.88rem;
}
.devis-form input, .devis-form select, .devis-form textarea,
.avis-form input, .avis-form select, .avis-form textarea {
  width: 100%; margin-top: 0.35rem; padding: 0.7rem;
  border: 1px solid #d4dae3; border-radius: 8px; font-family: inherit;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* FAQ */
.faq-item {
  border-bottom: 1px solid #e8ecf0;
  padding: 0.75rem 0;
}
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--navy); }

/* Map */
.commune-map { width: 100%; height: 320px; border: 0; border-radius: var(--radius); }

/* Drawings */
.drawings-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem;
}
.drawing-card {
  background: var(--cream); border-radius: var(--radius); padding: 1rem; margin: 0;
}
.tech-svg { width: 100%; height: auto; }

/* Footer */
.site-footer {
  background: var(--navy); color: rgba(255,255,255,0.85);
  padding: 3rem 0 1.5rem; margin-top: 3rem;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem; max-width: 1140px; margin: 0 auto; padding: 0 1.25rem;
}
.site-footer h3 { color: var(--gold); font-size: 1rem; margin: 0 0 0.75rem; }
.site-footer a { color: rgba(255,255,255,0.9); }
.footer-links, .partner-links { list-style: none; padding: 0; margin: 0; }
.footer-links li, .partner-links li { margin-bottom: 0.35rem; }
.social-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.social-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: #fff; font-size: 0.75rem; font-weight: 700;
}
.copy { text-align: center; font-size: 0.8rem; opacity: 0.6; margin-top: 2rem; }

.breadcrumb { font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--navy-light); }
.region-list, .commune-links {
  columns: 3; gap: 1.5rem; list-style: none; padding: 0;
}
@media (max-width: 768px) { .region-list, .commune-links { columns: 1; } }

.btn-primary {
  background: var(--gold); color: var(--navy); padding: 0.7rem 1.25rem;
  border-radius: 8px; text-decoration: none; font-weight: 600; border: none; cursor: pointer;
  display: inline-block;
}
.btn-primary:hover { background: var(--gold-hover); }
.btn-cta-header { background: var(--navy); color: #fff; padding: 0.55rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 600; }
.btn-large { width: 100%; max-width: 420px; padding: 1rem 1.5rem; }

.expert-guide .expert-steps {
  margin: 1rem 0 1.5rem 1.25rem;
  padding: 0;
  line-height: 1.65;
}
.expert-guide .expert-refs {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.expert-guide .expert-refs h3 { font-size: 1rem; margin: 0 0 0.5rem; color: var(--navy); }
.mesh-dense { list-style: none; padding: 0; columns: 2; gap: 1rem; }
.mesh-dense li { margin-bottom: 0.4rem; }
@media (max-width: 640px) { .mesh-dense { columns: 1; } }
