/* =========================================================
   MM Services · feuille de style
   Palette : orange #E66A2E, anthracite #4A4A4A, fond #F9F9F9
   Typos   : Poppins (titres) + Urbanist (corps)
   ========================================================= */

:root {
  --orange: #E66A2E;
  --orange-dark: #C9551D;
  --orange-soft: #FFF5F0;
  --anthracite: #4A4A4A;
  --anthracite-strong: #2F2F2F;
  --muted: #606268;        /* assombri pour passer WCAG AA sur fond blanc */
  --muted-soft: #7A7C82;   /* pour les hints très secondaires uniquement */
  --line: #E5E5E5;
  --line-strong: #D4D4D4;
  --fond: #F9F9F9;
  --surface: #FFFFFF;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 15px;

  --shadow-card: 0 1px 2px rgba(40, 30, 20, 0.04), 0 8px 28px rgba(40, 30, 20, 0.07);
  --shadow-pop: 0 1px 3px rgba(40, 30, 20, 0.08), 0 20px 50px rgba(40, 30, 20, 0.18);

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 22px;
  --space-5: 32px;
  --space-6: 48px;

  --font-body: 'Urbanist', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset léger ---------- */

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

html { -webkit-text-size-adjust: 100%; }

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

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--anthracite-strong);
  line-height: 1.2;
  margin: 0;
}

p { margin: 0; }

button { font: inherit; cursor: pointer; }

a { color: var(--orange-dark); }

/* ---------- Header ---------- */

.site-header {
  padding: var(--space-4) var(--space-3) 0;
  display: flex;
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--anthracite-strong);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(230, 106, 46, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--anthracite-strong);
}
.brand-text em {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.3px;
}

/* ---------- Container & intro ---------- */

.container {
  max-width: 620px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-6);
}

.intro {
  text-align: center;
  margin: var(--space-5) auto var(--space-4);
}

.intro h1 {
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.intro h1 .accent { color: var(--orange); }

.intro p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------- Ligne de rassurance ---------- */

.trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--anthracite);
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(230, 106, 46, 0.14);
  color: var(--orange);
  flex-shrink: 0;
}

.trust-icon svg {
  width: 12px;
  height: 12px;
}

/* ---------- Carte simulateur ---------- */

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5) var(--space-4);
}

.simulator {
  border-top: 8px solid var(--orange);
}

/* ---------- Formulaire ---------- */

form { display: flex; flex-direction: column; gap: var(--space-4); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; }

.field > label,
.field > legend,
.label-row label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--anthracite-strong);
  margin-bottom: 8px;
}

legend { padding: 0; }

.optional {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.label-row label { margin-bottom: 0; }

input[type="text"] {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--anthracite-strong);
  transition: border-color .15s, box-shadow .15s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(230, 106, 46, 0.15);
}

/* ---------- Tiles radio ---------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.tiles-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 480px) {
  .tiles-3 { grid-template-columns: 1fr; }
}

.tile {
  position: relative;
  display: block;
  cursor: pointer;
}

.tile input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.tile-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  text-align: left;
  min-height: 76px;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .12s;
}

.tile.compact .tile-content { min-height: 60px; padding: 12px 10px; }

.tile:hover .tile-content {
  border-color: var(--orange);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 106, 46, 0.10);
}

.tile-emoji {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 1.35rem;
  line-height: 1;
  background: rgba(230, 106, 46, 0.10);
  border-radius: 10px;
  margin-bottom: 4px;
  transition: background .15s, transform .15s;
}
.tile-title { font-weight: 700; color: var(--anthracite-strong); font-size: 0.98rem; }
.tile-sub { font-size: 0.84rem; color: var(--muted); line-height: 1.4; }

.tile input:focus-visible + .tile-content {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(230, 106, 46, 0.18);
}

.tile input:checked + .tile-content {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.tile input:checked + .tile-content .tile-emoji {
  background: rgba(230, 106, 46, 0.22);
  transform: scale(1.05);
}

.tile input:active + .tile-content { transform: scale(0.985); }

/* ---------- Range volume ---------- */

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--line-strong);
  border-radius: 999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  background: var(--orange);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  background: var(--orange);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(230, 106, 46, 0.25);
}

.volume-out {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--anthracite-strong);
  font-size: 1rem;
}

.volume-out strong {
  color: var(--orange);
  font-size: 1.2rem;
}

.range-hint {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.4;
}

.range-hint em { font-style: normal; color: var(--muted-soft); }

/* ---------- Résultat ---------- */

.result {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--orange-soft);
  border: 1px dashed var(--orange);
  border-radius: var(--radius-md);
  text-align: center;
}

.result-label {
  font-size: 0.85rem;
  color: var(--anthracite);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.result-price {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--orange);
  margin: 6px 0 4px;
  line-height: 1;
}

.result-unit { font-size: 1.6rem; }

.result-help {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 4px 0 0;
}

.result-note {
  font-size: 0.8rem;
  color: var(--muted-soft);
  margin: 12px auto 0;
  max-width: 40ch;
  line-height: 1.5;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 22px;
  text-decoration: none;
  transition: background .15s, transform .05s, box-shadow .15s, opacity .15s;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 6px 18px rgba(230, 106, 46, 0.32);
}

.btn-primary:hover:not(:disabled) { background: var(--orange-dark); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-block { display: flex; width: 100%; margin-top: var(--space-3); }

/* ---------- Modale ---------- */

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 600px) {
  .modal { align-items: center; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  animation: fadein .15s ease-out;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: var(--space-5) var(--space-4) var(--space-4);
  box-shadow: var(--shadow-pop);
  animation: slideup .2s ease-out;
}

@media (min-width: 600px) {
  .modal-panel { border-radius: 18px; }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--muted);
  border-radius: 50%;
}

.modal-close:hover { background: var(--fond); color: var(--anthracite-strong); }

#modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}

.modal-note {
  margin-top: var(--space-3);
  padding: 12px 14px;
  background: var(--orange-soft);
  border-radius: var(--radius-sm);
  color: var(--anthracite-strong);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ---------- Canaux ---------- */

.channels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: transform .05s, box-shadow .15s, filter .15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.channel:hover { filter: brightness(1.05); }
.channel:active { transform: translateY(1px); }

.channel-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.20);
  flex-shrink: 0;
}

.channel-icon svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

.channel-text { display: flex; flex-direction: column; line-height: 1.25; gap: 2px; }
.channel-text strong { font-family: var(--font-head); font-weight: 700; font-size: 1.02rem; }
.channel-text em { font-style: normal; font-size: 0.85rem; opacity: 0.92; }

.channel-whatsapp { background: #25D366; }
.channel-sms { background: #4A4A4A; }
.channel-email { background: #E66A2E; }
.channel-messenger { background: #0084FF; }

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: var(--space-4) var(--space-3) var(--space-5);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ---------- Responsive — petits écrans (≤ 420px) ---------- */

@media (max-width: 420px) {
  .container { padding: var(--space-3) 12px var(--space-5); }
  .card { padding: var(--space-4) var(--space-3); }
  .simulator { border-top-width: 6px; }

  .intro { margin: var(--space-4) auto var(--space-3); }
  .intro h1 { font-size: 1.55rem; }

  .result { padding: var(--space-3); }
  .result-price { font-size: 2.3rem; }
  .result-unit { font-size: 1.4rem; }

  .tile-content { padding: 12px 10px; min-height: 64px; }
  .tile.compact .tile-content { padding: 10px 10px; min-height: 56px; }
  .tile-title { font-size: 0.95rem; }

  .modal-panel { padding: var(--space-4) var(--space-3) var(--space-3); }
}

/* ---------- Animations ---------- */

@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideup { from { transform: translateY(20px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
