/* ============================================
   toFix — feuille de style commune
   Style : sobre, noir & blanc
============================================ */

:root {
  --black: #111111;
  --near-black: #1a1a1a;
  --gray-900: #2b2b2b;
  --gray-700: #555555;
  --gray-500: #808080;
  --gray-300: #d4d4d4;
  --gray-200: #e6e6e6;
  --gray-100: #f4f4f4;
  --white: #ffffff;

  --accent: #325FEB;
  --accent-dark: #2b51c8;
  --radius: 4px;
  --max-width: 1140px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--near-black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 16px; color: var(--gray-700); }

.section {
  padding: 72px 0;
}
.section--tight { padding: 48px 0; }
.section--dark {
  background: var(--black);
  color: var(--white);
}
.section--dark p { color: var(--gray-300); }

.dark-panel {
  background: var(--black);
  color: var(--white);
  border-radius: 20px;
  padding: 56px 40px;
}
.dark-panel p { color: var(--gray-300); }
.dark-panel .eyebrow { color: var(--gray-300); }

@media (max-width: 640px) {
  .dark-panel { padding: 40px 22px; border-radius: 16px; }
}
.section--alt {
  background: var(--gray-100);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 10px;
  display: block;
}
.section--dark .eyebrow { color: var(--gray-300); }

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}
.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--black);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--black);
}
.btn-outline:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }
.section--dark .btn-outline {
  border-color: var(--white);
  color: var(--white);
}
.section--dark .btn-outline:hover { background: var(--white); color: var(--black); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

/* Accueil : le header démarre transparent sur la photo du hero, puis
   redevient blanc dès que la page défile. */
.site-header--home {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header--home .logo,
.site-header--home .phone-link,
.site-header--home .phone-link .phone-text small {
  color: var(--white);
  transition: color 0.25s ease;
}
.site-header--home .logo .dot {
  background: var(--white);
  transition: background 0.25s ease;
}
.site-header--home.is-scrolled {
  background: var(--white);
  border-bottom-color: var(--gray-200);
}
.site-header--home.is-scrolled .logo,
.site-header--home.is-scrolled .phone-link {
  color: var(--near-black);
}
.site-header--home.is-scrolled .phone-link .phone-text small {
  color: var(--gray-500);
}
.site-header--home.is-scrolled .logo .dot {
  background: var(--black);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .dot { width: 8px; height: 8px; background: var(--black); border-radius: 50%; display: inline-block; }
.logo-img { height: 34px; width: auto; display: block; }
.logo-fallback { display: none; align-items: center; gap: 8px; }

/* Deux variantes du logo : sombre par défaut (header blanc), claire
   sur le hero transparent de l'accueil tant qu'on n'a pas défilé. */
.logo-img--light { display: none; }
.logo-img--dark { display: block; }
.site-header--home .logo-img--dark { display: none; }
.site-header--home .logo-img--light { display: block; }
.site-header--home.is-scrolled .logo-img--dark { display: block; }
.site-header--home.is-scrolled .logo-img--light { display: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}
.phone-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
}
.phone-link svg { flex-shrink: 0; }
.phone-link .phone-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.phone-link .phone-text small {
  font-weight: 500;
  color: var(--gray-500);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Hero */
.hero {
  position: relative;
  padding: 130px 0 100px;
  color: var(--white);
  background:
    linear-gradient(100deg, rgba(8,8,10,0.92) 0%, rgba(8,8,10,0.78) 45%, rgba(8,8,10,0.55) 100%),
    url("../img/hero-bg.jpg") center / cover no-repeat;
  background-color: #0c0c0e;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero .eyebrow { color: var(--gray-300); }
.hero h1 { margin-bottom: 20px; color: var(--white); }
.hero .lead {
  font-size: 1.15rem;
  color: var(--gray-300);
  max-width: 480px;
}
.trust-row {
  display: flex;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.trust-item {
  font-size: 0.88rem;
  color: var(--gray-300);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.trust-item svg { flex-shrink: 0; }

.hero .btn-outline {
  border-color: var(--white);
  color: var(--white);
}
.hero .btn-outline:hover { background: var(--white); color: var(--black); }

.hero-panel {
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  border-radius: 8px;
  padding: 36px;
}
.hero-panel h3 { margin-bottom: 6px; }
.hero-panel p { color: var(--gray-300); margin-bottom: 22px; }
.hero-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.hero-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 0.94rem;
}
.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Cards grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 30px 26px;
  background: var(--white);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--black); transform: translateY(-2px); }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card .icon svg { stroke: var(--white); }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.94rem; }

/* Steps (comment ça marche) */
.steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 8px;
}
.step .num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gray-200);
  display: block;
  margin-bottom: 6px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; margin-bottom: 0; }

/* Zone list */
.zone-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.zone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.zone-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding: 12px 14px;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.zone-list li svg { flex-shrink: 0; }
.zone-note { font-size: 0.85rem; color: var(--gray-500); margin-top: 16px; }

/* Carte interactive de zone */
.map-shell {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 560px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
}
.zone-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--gray-200);
}
.zone-panel {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 340px;
  max-width: calc(100% - 48px);
  background: var(--black);
  color: var(--white);
  border-radius: 8px;
  padding: 26px;
  z-index: 10;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}
.zone-panel h3 { margin-bottom: 14px; font-size: 1.1rem; }
.zone-search { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }
.zone-input-wrap { position: relative; flex: 1; min-width: 0; }
.zone-input-wrap input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
}
.zone-input-wrap input::placeholder { color: rgba(255, 255, 255, 0.5); }
.zone-input-wrap input:focus { outline: none; border-color: var(--white); }
.zone-search .btn { padding: 11px 16px; font-size: 0.88rem; white-space: nowrap; }

.zone-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  list-style: none;
  margin: 0;
  padding: 4px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}
.zone-suggestions li {
  padding: 9px 10px;
  font-size: 0.85rem;
  color: var(--gray-300);
  cursor: pointer;
  border-radius: 3px;
  line-height: 1.3;
}
.zone-suggestions li:hover,
.zone-suggestions li.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}
.zone-result {
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 0.86rem;
  margin-bottom: 16px;
  line-height: 1.5;
}
.zone-result a { color: var(--white); text-decoration: underline; }
.zone-result.zone-loading,
.zone-result.zone-error {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--gray-300);
}
.zone-result.in-zone {
  background: rgba(80, 200, 120, 0.15);
  border: 1px solid rgba(80, 200, 120, 0.4);
  color: #bdf2cd;
}
.zone-result.out-zone {
  background: rgba(220, 90, 90, 0.15);
  border: 1px solid rgba(220, 90, 90, 0.4);
  color: #f5c6c6;
}
.zone-list--compact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.zone-list--compact li {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gray-300);
}
.leaflet-tooltip.zone-label {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--black);
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 4px #fff;
  pointer-events: none;
}
.leaflet-tooltip.zone-label::before { display: none; }

@media (max-width: 880px) {
  .map-shell { min-height: auto; display: flex; flex-direction: column; border: none; background: transparent; gap: 0; }
  .zone-map { position: relative; height: 320px; order: 2; border-radius: 8px; overflow: hidden; }
  .zone-panel { position: relative; top: auto; left: auto; width: 100%; max-width: 100%; border-radius: 8px; margin-bottom: 0; order: 1; }
}

/* Sélecteur d'appareil (tarifs) */
.device-finder {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 28px;
  background: var(--gray-100);
}
.finder-selects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.finder-selects select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--near-black);
}
.finder-selects select:disabled { color: var(--gray-500); background: var(--gray-100); }
.finder-selects select:focus { outline: none; border-color: var(--black); }

.device-result { margin-top: 26px; }
.device-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 26px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 24px;
}
.device-photo {
  width: 160px;
  height: 160px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.device-photo img { width: 100%; height: 100%; object-fit: cover; }
.device-photo--png { background: var(--white); }
.device-photo--png img { object-fit: contain; padding: 12px; width: 100%; height: 100%; box-sizing: border-box; }
.device-photo-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.device-info h3 { margin-bottom: 4px; }

@media (max-width: 640px) {
  .finder-selects { grid-template-columns: 1fr; }
  .device-card { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .device-photo { width: 100%; height: 140px; }
  .device-finder { padding: 16px; }

  /* Le tableau devient une liste empilée : plus de scroll horizontal. */
  .table-wrap { overflow-x: visible; border: none; border-radius: 0; }
  table.price-table { font-size: 0.92rem; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
  table.price-table thead { display: none; }
  table.price-table, table.price-table tbody, table.price-table tr, table.price-table td { display: block; width: auto; }
  table.price-table tr {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-top: 1px solid var(--gray-200);
  }
  table.price-table tr:first-child { border-top: none; }
  table.price-table tr:nth-child(even) { background: var(--gray-100); }
  table.price-table td { padding: 0; border-top: none; background: transparent; }
  table.price-table td:first-child { flex: 1 1 auto; }
  table.price-table td.price { flex: 0 0 auto; white-space: nowrap; }
}

/* Table (tarifs) */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}
table.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
table.price-table caption {
  text-align: left;
  padding: 18px 20px 8px;
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--gray-100);
}
table.price-table th {
  text-align: left;
  padding: 14px 20px;
  background: var(--black);
  color: var(--white);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
table.price-table td {
  padding: 13px 20px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-700);
}
table.price-table tr:nth-child(even) td { background: var(--gray-100); }
table.price-table td.price { font-weight: 700; color: var(--black); white-space: nowrap; }

.category-block { margin-bottom: 36px; }
.category-block h3 { margin-bottom: 12px; }

.price-status {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 24px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
  color: var(--gray-700);
}
.price-status.is-error {
  border-color: var(--black);
  background: var(--white);
}

/* Contact / forms */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.info-list { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .icon-sm {
  width: 36px; height: 36px; border-radius: 6px; background: var(--black);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.info-list .icon-sm svg { stroke: var(--white); }
.info-list strong { display: block; font-size: 0.95rem; }
.info-list span, .info-list a { color: var(--gray-700); font-size: 0.92rem; }

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--near-black);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--black);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--gray-500); }

/* CTA band */
.cta-band {
  text-align: center;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band .btn-row { justify-content: center; margin-top: 24px; }

/* Legal pages */
.legal-content h2 { margin-top: 40px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content ul { color: var(--gray-700); padding-left: 22px; }
.legal-content li { margin-bottom: 8px; }
.legal-updated { color: var(--gray-500); font-size: 0.88rem; margin-bottom: 40px; }
.placeholder {
  background: #fff3d6;
  border: 1px dashed #c9a227;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--black);
  color: var(--gray-300);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--gray-900);
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-grid p { color: var(--gray-500); font-size: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--gray-300); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--white); }
.footer-logo { font-size: 1.3rem; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--gray-500);
}

/* Mobile */
@media (max-width: 880px) {
  .site-header .container { height: auto; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; gap: 12px; }
  .header-actions { width: 100%; justify-content: space-between; flex-wrap: nowrap; gap: 10px; }
  .phone-link .phone-text small { display: none; }
  .header-actions .btn { padding: 10px 16px; font-size: 0.85rem; white-space: nowrap; flex-shrink: 0; }
  .phone-link { min-width: 0; }
  .phone-link .phone-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 46vw; }
  .hero-grid, .zone-wrap, .contact-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: 1fr 1fr; }
  .zone-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .steps-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
}

@media (max-width: 420px) {
  .phone-link .phone-text strong { max-width: 34vw; font-size: 0.82rem; }
}

@media (max-width: 880px) {
  /* Sur mobile, une fois la page défilée, le logo laisse la place au
     téléphone et au bouton pour garder un header compact. */
  .site-header--home.is-scrolled .logo { display: none; }
}
