/* ==========================================================================
   Mecapneus Ammour — feuille de style
   Mobile-first. Couleurs de la carte de visite (noir, rouge, blanc),
   typos et rayons centralisés dans :root.
   ========================================================================== */

:root {
  --ink: #111214;          /* noir de la carte */
  --ink-2: #1b1c1f;
  --ink-3: #2a2b30;
  --paper: #f4f4f5;
  --white: #ffffff;
  --text: #111214;
  --muted: #52525b;
  --muted-on-dark: #b4b4bc;
  --line: #e4e4e7;
  --field-border: #c8c8cd;

  --accent: #b52b27;        /* rouge de la carte (fonds, boutons) */
  --accent-hover: #c9352f;
  --accent-bright: #e8504a; /* rouge lisible sur fond noir */
  --accent-ink: #a8241f;    /* rouge lisible sur fond clair */
  --accent-soft: #fbe9e8;

  --wa: #15803d;            /* bouton WhatsApp (contraste AA avec texte blanc) */
  --wa-hover: #116b32;
  --danger: #b42318;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17, 18, 20, .06), 0 10px 30px rgba(17, 18, 20, .10);

  --font-head: "Montserrat", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1160px;
  --header-h: 68px;
  --callbar-h: 68px;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom));
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 .5em;
}

:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--white);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;
  padding: .75em 1.35em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 600 1rem/1.1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--lg { min-height: 54px; padding-inline: 1.6em; font-size: 1.05rem; }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost { border-color: rgba(255, 255, 255, .35); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .06); }

.btn--wa { background: var(--wa); color: var(--white); }
.btn--wa:hover { background: var(--wa-hover); }

/* ---------- Logo texte (reprend la carte : MECA rouge, PNEUS blanc, AMMOUR rouge) ---------- */

.brand {
  display: inline-flex;
  flex-direction: column;
  color: var(--white);
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}
.brand__line1 { font-size: 1.3rem; letter-spacing: .01em; }
.brand__line1 span { color: var(--accent-bright); }
.brand__line2 {
  margin-top: 3px;
  padding-left: .2em;
  font-size: .8rem;
  letter-spacing: .45em;
  color: var(--accent-bright);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 18, 20, .97);
  color: var(--white);
  border-bottom: 2px solid var(--accent);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(17, 18, 20, .9); backdrop-filter: saturate(1.4) blur(8px); }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius-sm);
  color: var(--white);
  cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle .icon--close,
.nav-toggle[aria-expanded="true"] .icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-h) - var(--callbar-h) - env(safe-area-inset-bottom));
  max-height: calc(100dvh - var(--header-h) - var(--callbar-h) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px max(16px, env(safe-area-inset-right)) 20px max(16px, env(safe-area-inset-left));
  background: var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 20px 30px rgba(0, 0, 0, .3);
}
.site-nav[data-open="true"] { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav__link {
  display: block;
  padding: 14px 4px;
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-nav .btn { width: 100%; margin-top: 16px; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex;
    position: static;
    align-items: center;
    gap: 32px;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .site-nav ul { display: flex; gap: 28px; }
  .site-nav__link {
    padding: 6px 0;
    border: 0;
    color: var(--muted-on-dark);
    transition: color .15s;
  }
  .site-nav__link:hover { color: var(--white); }
  .site-nav .btn { width: auto; margin: 0; min-height: 42px; padding: .55em 1.1em; }
}

@media (max-width: 899px) and (max-height: 500px) {
  .site-header { position: relative; }
  html { scroll-padding-top: 12px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 32px 0 64px;
  background: var(--ink);
  color: var(--white);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 60% at 78% 40%, rgba(181, 43, 39, .22), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--accent);
}

.hero__inner {
  position: relative;
  display: grid;
  gap: 28px;
  align-items: center;
}

.hero__art { order: -1; }
.hero__logo { width: 100%; max-width: 400px; height: auto; margin-inline: auto; }

.eyebrow {
  margin: 0 0 .75em;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.hero .eyebrow,
.section--dark .eyebrow { color: var(--accent-bright); }

.hero h1 {
  font-size: clamp(2.1rem, 3.6vw + 1.1rem, 3.75rem);
  font-style: italic;
  text-transform: uppercase;
  margin-bottom: .45em;
}
.hero h1 em { color: var(--accent-bright); }

.hero__lead {
  max-width: 36em;
  font-size: 1.125rem;
  color: var(--muted-on-dark);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 32px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.badges li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  color: #e7e7ea;
}
.badges .icon { color: var(--accent-bright); stroke-width: 2.5; }

@media (min-width: 900px) {
  .hero { padding: 80px 0 104px; }
  .hero__inner { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .hero__art { order: 0; }
  .hero__logo { max-width: 560px; }
}

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

.section { padding: 72px 0; }
.section--white { background: var(--white); }
.section--dark { background: var(--ink); color: var(--white); }

.section__head { max-width: 760px; margin-bottom: 40px; }
.section__head h2 {
  font-size: clamp(1.75rem, 2vw + 1.1rem, 2.6rem);
  text-transform: uppercase;
}
.section__head p { font-size: 1.075rem; color: var(--muted); }
.section__head p:last-child { margin-bottom: 0; }
.section--dark .section__head p { color: var(--muted-on-dark); }

@media (min-width: 900px) {
  .section { padding: 104px 0; }
  .section__head { margin-bottom: 56px; }
}

/* ---------- Services ---------- */

.service-group + .service-group { margin-top: 48px; }
.service-group__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  font-size: 1.3rem;
  text-transform: uppercase;
  border-bottom: 2px solid var(--line);
}
.service-group__title .icon { width: 28px; height: 28px; color: var(--accent); }

.cards { display: grid; gap: 20px; }
@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 640px) and (max-width: 979px) {
  .cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 980px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
}
.card h4 { font-size: 1.1rem; text-transform: uppercase; margin-bottom: .5em; }
.card p { color: var(--muted); margin: 0 0 18px; }

.card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  background: var(--ink);
  border-radius: 14px;
  color: var(--accent-bright);
}
.card__icon .icon { width: 28px; height: 28px; }

.card__tag {
  margin-top: auto;
  padding: 4px 12px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
}

.banner {
  display: grid;
  gap: 20px;
  align-items: center;
  margin-top: 48px;
  padding: 28px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  border-left: 6px solid var(--accent);
}
.banner h3 { font-size: 1.35rem; text-transform: uppercase; margin-bottom: .4em; }
.banner p { margin: 0; color: var(--muted-on-dark); max-width: 60ch; }

@media (min-width: 760px) {
  .banner { grid-template-columns: 1fr auto; padding: 32px 40px; }
}

/* ---------- Avantages ---------- */

.features {
  display: grid;
  gap: 32px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}
.feature h3 { font-size: 1.1rem; text-transform: uppercase; margin: 18px 0 .5em; }
.feature p { margin: 0; color: var(--muted); }
.feature__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-radius: 50%;
  color: var(--white);
}
.feature__icon .icon { width: 26px; height: 26px; stroke-width: 2; }

/* ---------- Fonctionnement ---------- */

.steps {
  display: grid;
  gap: 20px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.step {
  position: relative;
  padding: 28px;
  background: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: var(--radius);
}
.step__num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-head);
  font-size: 2.75rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-bright);
}
.step h3 { font-size: 1.15rem; text-transform: uppercase; margin-bottom: .5em; }
.step p { margin: 0; color: var(--muted-on-dark); }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

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

.zone { display: grid; gap: 8px; }
.zone .section__head { margin-bottom: 24px; }
.zone__note { font-size: 1rem !important; }
.zone__note a { color: var(--accent-ink); font-weight: 600; }

.zone__groups { display: grid; gap: 28px; }
.zone__title {
  margin-bottom: 14px;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 8px 16px;
  font-size: .95rem;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.chips .chips__more {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  font-weight: 600;
}

@media (min-width: 900px) {
  .zone { grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
  .zone .section__head { margin-bottom: 0; }
}

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

.contact { display: grid; gap: 32px; align-items: start; }

.contact__info {
  padding: 28px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  border-top: 6px solid var(--accent);
}
.contact__info h3 { font-size: 1.35rem; text-transform: uppercase; }

.info-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .icon { width: 22px; height: 22px; margin-top: 2px; color: var(--accent-bright); }
.info-list__label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}
.info-list a { display: inline-block; padding-block: 4px; font-weight: 600; text-decoration: none; }
.info-list a:hover { text-decoration: underline; }

.contact__avis {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.contact__avis p { margin: 0 0 14px; font-size: .9rem; color: var(--muted-on-dark); }

.contact__qr { display: none; }

@media (min-width: 640px) and (max-width: 959px) {
  .info-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .contact { grid-template-columns: 4fr 8fr; gap: 48px; }
  .contact__info { position: sticky; top: calc(var(--header-h) + 24px); }
  .contact__qr {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .1);
  }
  .contact__qr img { flex: none; width: 150px; height: 150px; border-radius: var(--radius-sm); }
  .contact__qr p { margin: 0; font-size: .9rem; color: var(--muted-on-dark); }
}

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

.form { display: grid; gap: 20px; }
.form__row { display: grid; gap: 20px; }
@media (min-width: 640px) {
  .form__row--2 { grid-template-columns: 1fr 1fr; }
}

.form__required { margin: 0; font-size: .9rem; color: var(--muted); }

.field { display: grid; gap: 6px; align-content: start; }
.field[hidden] { display: none; }
.field label { font-weight: 600; font-size: .95rem; }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input[type="date"] { min-width: 0; }
.field input::-webkit-date-and-time-value { text-align: left; }
.field select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.field input::placeholder,
.field textarea::placeholder { color: #8a8a93; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(232, 80, 74, .45);
}
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: var(--danger); }

.field__hint { margin: 0; font-size: .85rem; color: var(--muted); }

.form__status { margin: 0; }
.form__status:not(:empty) {
  padding: 14px 16px;
  background: #e8f5ec;
  border: 1px solid #b7dfc3;
  border-radius: var(--radius-sm);
  color: #0f5130;
}
.form__status a { font-weight: 600; }

.form__legal { margin: 0; font-size: .85rem; color: var(--muted); }

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

.site-footer {
  padding: 56px 0 24px;
  background: #0a0a0b;
  color: var(--muted-on-dark);
  border-top: 6px solid var(--accent);
}
.site-footer__inner { display: grid; gap: 32px; }
.site-footer__brand p { max-width: 40ch; margin: 18px 0 0; }
.site-footer__title {
  margin-bottom: 12px;
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
}
.site-footer ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; }
.site-footer li a { display: inline-block; padding-block: 5px; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer .brand:hover { text-decoration: none; }
.site-footer__bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .9rem;
}
.site-footer__bottom p { margin: 0; }

@media (min-width: 760px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Barre d'appel mobile ---------- */

.callbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgba(17, 18, 20, .97);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.callbar .btn { min-height: 48px; padding-inline: .8em; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .callbar { display: none; }
}

/* ---------- Page mentions légales ---------- */

.legal { max-width: 760px; padding-block: 56px 80px; }
.legal h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); text-transform: uppercase; }
.legal h2 { font-size: 1.25rem; text-transform: uppercase; margin-top: 2em; }
.legal a { color: var(--accent-ink); font-weight: 600; }
.legal .btn--primary { color: var(--white); }
.legal .ph { padding: 0 4px; background: var(--accent-soft); border-radius: 4px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-on-dark);
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover { color: var(--white); }
.back-link .icon { transform: scaleX(-1); }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 8px; }
.faq .section__head a { color: var(--accent-bright); font-weight: 600; }
.faq__list { border-top: 1px solid rgba(255, 255, 255, .12); }
.faq__item { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.faq__item summary {
  position: relative;
  padding: 20px 44px 20px 0;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--accent-bright); }
/* Croix « + » qui pivote en « × » à l'ouverture */
.faq__item summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 6px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background:
    linear-gradient(var(--accent-bright), var(--accent-bright)) center / 100% 2px no-repeat,
    linear-gradient(var(--accent-bright), var(--accent-bright)) center / 2px 100% no-repeat;
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__answer { max-width: 68ch; padding-bottom: 22px; color: var(--muted-on-dark); }
.faq__answer p:last-child { margin-bottom: 0; }
.faq__answer strong { color: var(--white); font-weight: 600; }

@media (min-width: 900px) {
  .faq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 56px; align-items: start; }
}

/* ---------- Mouvement réduit ---------- */

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