﻿:root {
  --primary: #0f2a47;
  --primary-light: #1c4a75;
  --accent: #1f8a70;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --text: #1a1f24;
  --text-muted: #5b6773;
  --border: #e2e6ea;
  --header-h: 73px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
html { scroll-padding-top: var(--header-h); }

body { padding-top: var(--header-h); }

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links nav a {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links nav a:hover,
.nav-links nav a[aria-current="page"] { color: var(--primary); }

.nav-links nav a[aria-current="page"] { font-weight: 700; }

.mobile-menu { display: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 20;
}

.skip-link:focus { left: 8px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.header-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
}

.nav-links { display: flex; align-items: center; gap: 32px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 90px 0;
}

.hero .container {
  display: grid;
  gap: 16px;
  max-width: 720px;
}

.hero .eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  font-weight: 700;
}

.hero p {
  font-size: 1.1rem;
  color: #d7e0e9;
  max-width: 560px;
}

.cta-group {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.15s ease;
}

.btn:hover { opacity: 0.9; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}

/* Sections */
section { padding: 80px 0; }

.section-header {
  max-width: 600px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-header .eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
}

.section-header p {
  color: var(--text-muted);
  margin-top: 12px;
}

.services { background: var(--bg-alt); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px 28px;
}

.service-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(31,138,112,0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.service-card h3 {
  font-size: 1.15rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 28px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-panel {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 40px;
  border: 1px solid var(--border);
}

.about-panel h3 {
  color: var(--primary);
  margin-bottom: 16px;
}

.about-panel ul { list-style: none; }

.about-panel li {
  padding: 8px 0;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
}

.about-panel li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

/* Clients */
.clients {
  background: var(--primary);
  color: #fff;
  text-align: center;
}

.clients h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.clients p {
  color: #c9d4dd;
  max-width: 560px;
  margin: 0 auto;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
}

.contact-card h2,
.contact-card h3 {
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 18px;
}

.contact-card address { font-style: normal; }

.contact-card a { color: var(--primary); text-decoration: underline; }

.contact-row {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.contact-row strong {
  color: var(--text);
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.contact-form button {
  border: none;
  cursor: pointer;
  align-self: flex-start;
}

.contact-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-form .hp-field {
  position: absolute;
  left: -9999px;
}

.form-status {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-status:empty { display: none; }

.form-status-ok { color: var(--accent); font-weight: 600; }

.form-status-error { color: #b3261e; font-weight: 600; }

.form-legal {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-legal a { text-decoration: underline; }

/* Cartes de services cliquables */
a.service-card {
  display: block;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.card-link::after { content: " →"; }

.text-link { color: var(--primary); text-decoration: underline; }

.about-eyebrow {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.about-text h2 {
  color: var(--primary);
  font-size: 1.8rem;
  margin: 12px 0 20px;
  font-weight: 700;
}

/* Pages intérieures */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 56px 0 48px;
}

.page-hero .container { max-width: 860px; }

.page-hero h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 700;
}

.page-hero .lead {
  margin-top: 14px;
  font-size: 1.1rem;
  color: #d7e0e9;
  max-width: 680px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: #c9d4dd;
  margin-bottom: 16px;
}

.breadcrumb a { text-decoration: underline; }

section.content { padding: 56px 0; }

.prose { max-width: 860px; }

.prose h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin: 36px 0 12px;
}

.prose h2:first-child { margin-top: 0; }

.prose p { margin-bottom: 14px; color: var(--text); }

.prose h3 {
  font-size: 1.15rem;
  margin: 20px 0 8px;
}

.prose .commune-list { columns: 3 180px; column-gap: 32px; }

.prose .commune-list li { break-inside: avoid; }

.prose ul,
.prose ol { margin: 0 0 14px 22px; }

.prose li { margin-bottom: 6px; }

.prose a { color: var(--primary); text-decoration: underline; }

.doc-list { list-style: none; margin-left: 0; }

.doc-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.doc-list span { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }

.faq { background: var(--bg-alt); padding: 56px 0; }

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq summary { font-weight: 600; color: var(--primary); cursor: pointer; }

.faq details p { margin: 10px 0 0; color: var(--text-muted); }

.cta-band {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 56px 0;
}

.cta-band h2 { font-size: 1.6rem; margin-bottom: 8px; }

.cta-band p { color: #c9d4dd; margin-bottom: 20px; }

.cta-band .cta-group { justify-content: center; }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
}

/* Partenaires et photos */
.partners { padding: 48px 0; border-bottom: 1px solid var(--border); }

.partners h2 {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 24px;
}

.partner-logos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px 48px;
}

.partner-logos li {
  width: 184px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-logos li.is-badge { height: 128px; }

.partner-logos img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.photo { margin: 28px 0 0; }

.photo img {
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}

.photo figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--text-muted); }

.map { margin: 64px 0 0; }

.map iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.map figcaption { margin-top: 8px; font-size: 0.85rem; color: var(--text-muted); }

.map figcaption a { color: var(--primary); text-decoration: underline; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

footer strong { display: block; color: var(--primary); margin-bottom: 10px; }

footer ul { list-style: none; }

footer li { margin-bottom: 6px; }

footer a { color: var(--text-muted); font-size: 0.9rem; }

footer a:hover { color: var(--primary); text-decoration: underline; }

footer address { font-style: normal; color: var(--text-muted); font-size: 0.9rem; }

footer p { color: var(--text-muted); font-size: 0.9rem; }

.footer-about p { margin-bottom: 10px; }

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 1000px) {
  .nav-links nav { display: none; }

  .mobile-menu { display: block; }

  .mobile-menu summary {
    list-style: none;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    padding: 4px 8px;
    color: var(--primary);
  }

  .mobile-menu summary::-webkit-details-marker { display: none; }

  .mobile-menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    list-style: none;
    padding: 8px 24px 16px;
    box-shadow: 0 8px 16px rgba(15, 42, 71, 0.08);
  }

  .mobile-menu li a {
    display: block;
    padding: 12px 0;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
  }

  .mobile-menu li a[aria-current="page"] { color: var(--accent); font-weight: 700; }

  .nav-links { gap: 12px; }
}

@media (max-width: 768px) {
  .partner-logos { gap: 16px 28px; }
  .partner-logos li { width: 148px; height: 60px; }
  .partner-logos li.is-badge { height: 96px; }
  .hero h1 { font-size: 2rem; }
  .page-hero h1 { font-size: 1.7rem; }
  .about-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  section.content, .faq, .cta-band { padding: 40px 0; }
  .doc-list li { flex-direction: column; gap: 2px; }
}

@media (max-width: 420px) {
  .header-phone { font-size: 0.85rem; }
  .logo img { height: 30px; }
}

/* Animations (js/motion.js). Sans JavaScript ou avec "réduire les animations", tout reste visible et fixe. */
.hero, .page-hero { position: relative; overflow: hidden; isolation: isolate; }

.hero { padding-bottom: 130px; }

.hero .container, .page-hero .container { position: relative; z-index: 1; }

.net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 520px;
  height: 520px;
  right: -140px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 138, 112, 0.35), transparent 65%);
  animation: glow 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes glow {
  to { transform: translate(-120px, 90px) scale(1.15); }
}

/* Titre mot par mot */
.hero h1.is-split .word {
  display: inline-block;
  animation: word-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--i) * 70ms + 100ms);
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(0.45em); filter: blur(4px); }
}

.motion .hero .eyebrow,
.motion .hero p,
.motion .hero .cta-group { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

.motion .hero p { animation-delay: 0.45s; }
.motion .hero .cta-group { animation-delay: 0.6s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

/* Lignes de fibre sous le bandeau d'accueil */
.fibre {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 110px;
  z-index: 0;
  pointer-events: none;
}

.fibre path { fill: none; }

.fibre-line {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.4s ease-out forwards;
}

.fibre-line:nth-child(2) { animation-delay: 0.25s; }
.fibre-line:nth-child(3) { animation-delay: 0.5s; }

.fibre-pulse {
  stroke: #6fe0bd;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 60 1400;
  stroke-dashoffset: 60;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(111, 224, 189, 0.9));
  animation: pulse 4.5s linear infinite;
  animation-delay: 2.2s;
}

.fibre-pulse:nth-child(5) { animation-delay: 3.4s; animation-duration: 5.5s; }
.fibre-pulse:nth-child(6) { animation-delay: 2.8s; animation-duration: 6.5s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

@keyframes pulse {
  0% { stroke-dashoffset: 60; opacity: 1; }
  90% { opacity: 1; }
  100% { stroke-dashoffset: -1400; opacity: 0; }
}

/* En-tête */
header { transition: box-shadow 0.25s ease; }
header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 42, 71, 0.1); }

/* Boutons */
.btn { position: relative; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.15s ease; }
.btn:hover { opacity: 1; transform: translateY(-2px); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(31, 138, 112, 0.35); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.7); }

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-100%);
}

.btn-primary:hover::after { transform: translateX(100%); transition: transform 0.7s ease; }

/* Cartes de services */
.service-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(31, 138, 112, 0.45);
  box-shadow: 0 18px 40px rgba(15, 42, 71, 0.12);
}

.service-card .icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card .icon { transition: background 0.3s ease, color 0.3s ease; }

.service-card:hover .icon,
.service-card:focus-visible .icon { background: var(--accent); color: #fff; }

.service-card:hover .icon svg *,
.service-card:focus-visible .icon svg * {
  stroke-dasharray: 1;
  animation: icon-draw 0.9s ease-out;
}

@keyframes icon-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.card-link::after { display: inline-block; transition: transform 0.25s ease; }
.service-card:hover .card-link::after { transform: translateX(5px); }

/* Logos partenaires */
/* En gris au chargement, ils passent en couleur un par un quand le bandeau arrive à l'écran. */
.partner-logos img { transition: filter 0.9s ease, opacity 0.9s ease, transform 0.3s ease; transition-delay: var(--lit-delay, 0ms), var(--lit-delay, 0ms), 0ms; }
.motion .partner-logos img { filter: grayscale(1); opacity: 0.55; }
.motion .partner-logos li.is-lit img { filter: none; opacity: 1; }
.partner-logos li:hover img { transform: scale(1.06); }

/* Chiffres et liste */
.stat-number { font-variant-numeric: tabular-nums; color: var(--accent); }

/* Bandeau "Ils nous font confiance" */
.clients { position: relative; overflow: hidden; }

.clients::before {
  content: "";
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-drift 20s linear infinite;
  pointer-events: none;
}

.clients .container { position: relative; }

@keyframes grid-drift { to { transform: translate(40px, 40px); } }

/* Apparitions au scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible { opacity: 1; transform: none; }


@media (max-width: 768px) {
  .hero { padding-bottom: 100px; }
  .fibre { height: 80px; }
  .hero::after { width: 320px; height: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fibre-line { stroke-dashoffset: 0; }
  .fibre-pulse { display: none; }
  .reveal { opacity: 1; transform: none; }
  .motion .partner-logos img { filter: none; opacity: 1; }
}

/* Actualités */
.breadcrumb { flex-wrap: wrap; }

.page-hero .article-date { color: #c9d4dd; font-size: 0.9rem; margin: 12px 0 16px; }

.news-list { display: grid; gap: 20px; }

.news-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 26px;
  background: var(--bg);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.news-card .article-date { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 6px; }

.prose .news-card h2 { font-size: 1.3rem; margin: 0 0 10px; }

.prose .news-card h2 a { text-decoration: none; color: var(--primary); }

.prose .news-card h2 a:hover { text-decoration: underline; }

.prose .news-card p:last-of-type { margin-bottom: 0; }

.news-logo { margin: 0 0 28px; }

.news-logo img { width: 220px; height: auto; display: block; }

/* Bouton de l'assistant : le widget Wildix n'est chargé qu'au clic (js/chat.js) */
.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(15, 42, 71, 0.3);
  transition: transform 0.15s ease, background 0.15s ease;
}

.chat-launcher:hover { transform: scale(1.06); background: var(--accent); }

.chat-launcher:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.chat-launcher svg { width: 28px; height: 28px; fill: currentColor; }

.chat-launcher.is-loading { opacity: 0.6; cursor: progress; }
