/* =========================================================
   CCR CUSTOMS — feuille de style principale
   Thème sombre premium, accent bleu électrique.
   ========================================================= */

:root {
  /* Fonds */
  --bg: #07090c;
  --bg-2: #0b0d10;
  --bg-3: #10141a;
  --surface: #12161d;
  --surface-2: #171c24;
  --border: #232a34;
  --border-strong: #2e3744;

  /* Texte */
  --text: #f2f5f9;
  --text-soft: #c3ccd9;
  --text-muted: #8b96a6;

  /* Accent bleu électrique */
  --accent: #0a7cff;
  --accent-bright: #3f9dff;
  --accent-soft: rgba(10, 124, 255, 0.14);
  --accent-line: rgba(10, 124, 255, 0.34);
  --danger: #ff5c6c;
  --success: #2fd38a;

  /* Rayons / ombres */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --shadow-accent: 0 14px 38px rgba(10, 124, 255, 0.22);

  --container: 1200px;
  --header-h: 74px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
a { color: var(--accent-bright); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #7ab8ff; }

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 0.5em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.35rem); }
h3 { font-size: 1.25rem; }
.h2 { font-size: clamp(1.55rem, 1.1rem + 1.6vw, 2.2rem); }
.h3 { font-size: 1.35rem; }
.h4 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-size: 0.92em; color: var(--text-soft); }
.muted { color: var(--text-muted); }
.small { font-size: 0.88rem; }
.sr-only {
  position: absolute; 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: 0; top: 0; z-index: 200;
  transform: translateY(-120%);
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 0 0 var(--r-sm) 0;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; color: #fff; }

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

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem;
  font-weight: 700; color: var(--accent-bright); margin: 0 0 0.75rem;
}
.lead { font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem); color: var(--text-soft); max-width: 68ch; }
.gradient-text {
  background: linear-gradient(100deg, var(--accent-bright), #9fd0ff 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------
   Header / navigation
   --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 9, 12, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); background: rgba(7, 9, 12, 0.94); }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); max-width: 100%; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); flex: 0 1 auto; min-width: 0; }
.brand:hover { color: var(--text); }
.brand img { transition: transform 0.4s var(--ease); }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.12rem; letter-spacing: 0.08em; }
.brand-accent { font-size: 1.12rem; letter-spacing: 0.08em; color: var(--accent-bright); font-weight: 700; }
.brand-text strong + .brand-accent { margin-left: 0; }
.brand-text {
  flex-flow: row wrap; align-items: baseline; gap: 0 6px; min-width: 0;
}
.brand-text small {
  flex: 1 0 100%; font-size: 0.68rem; color: var(--text-muted);
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
/* Sur petit écran, la baseline est masquée pour que l'en-tête tienne */
@media (max-width: 560px) {
  .brand-text small { display: none; }
  .brand-text strong, .brand-accent { font-size: 1.05rem; }
}

.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 28px; min-width: 0; }
.primary-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.primary-nav > ul a {
  display: block; padding: 9px 14px; border-radius: var(--r-sm);
  color: var(--text-soft); font-weight: 500; font-size: 0.95rem;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.primary-nav > ul a:hover { color: var(--text); background: var(--surface); }
.primary-nav > ul a.is-active { color: var(--accent-bright); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-user {
  font-size: 0.86rem; color: var(--text-muted);
  max-width: 150px; min-width: 0; flex: 0 1 auto;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 1180px) { .nav-user { max-width: 92px; } }
.cart-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--text-soft); font-size: 0.9rem; font-weight: 500;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.cart-link:hover, .cart-link.is-active {
  color: var(--text); border-color: var(--accent-line); background: var(--accent-soft);
}
.cart-link span:not(.cart-badge) { display: none; }
@media (min-width: 1240px) { .cart-link span:not(.cart-badge) { display: inline; } }
.cart-badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 0.76rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease);
}
.cart-badge.is-empty { background: var(--surface-2); color: var(--text-muted); }
.cart-badge.is-bump { transform: scale(1.35); }

.nav-toggle {
  margin-left: auto; width: 44px; height: 40px; display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  background: transparent; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  cursor: pointer; padding: 0 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 10px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 18px 24px 26px; margin: 0;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.25s var(--ease);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .primary-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .primary-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .primary-nav > ul a { padding: 13px 14px; font-size: 1rem; }
  .nav-actions { flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
  .cart-link span:not(.cart-badge) { display: inline; }
}

/* ---------------------------------------------------------
   Boutons
   --------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-size: 0.95rem; font-weight: 600; line-height: 1.2;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #fff; box-shadow: var(--shadow-accent);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 44px rgba(10, 124, 255, 0.36); }

.btn-outline { border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.btn-outline:hover { color: var(--text); border-color: var(--accent-line); background: var(--surface-2); transform: translateY(-2px); }

.btn-ghost { color: var(--text-soft); background: transparent; border-color: transparent; }
.btn-ghost:hover { color: var(--accent-bright); background: var(--accent-soft); }

.btn-danger { color: var(--danger); background: rgba(255, 92, 108, 0.08); border-color: rgba(255, 92, 108, 0.28); }
.btn-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.6rem 0 0; }
.btn-row.center { justify-content: center; }

/* ---------------------------------------------------------
   Messages flash
   --------------------------------------------------------- */
.flash-zone { padding-top: 18px; display: grid; gap: 10px; }
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 18px; border-radius: var(--r); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-soft); font-size: 0.94rem;
  animation: slide-in 0.4s var(--ease) both;
}
.flash-success { border-color: rgba(47, 211, 138, 0.35); background: rgba(47, 211, 138, 0.08); color: #b7f0d4; }
.flash-error { border-color: rgba(255, 92, 108, 0.35); background: rgba(255, 92, 108, 0.08); color: #ffc9ce; }
.flash-info { border-color: var(--accent-line); background: var(--accent-soft); color: #cfe6ff; }
.flash-close { background: none; border: 0; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: 0.65; }
.flash-close:hover { opacity: 1; }
.flash.is-hidden { opacity: 0; transform: translateY(-6px); transition: opacity 0.3s, transform 0.3s; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(60px, 7vw, 110px) 0 clamp(50px, 6vw, 90px); }
.hero-glow {
  position: absolute; top: -280px; left: 50%; transform: translateX(-50%);
  width: 1100px; height: 700px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(10, 124, 255, 0.3), transparent 62%);
  filter: blur(14px);
}
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 20%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; max-width: 900px; }
.hero-title { margin-bottom: 1rem; }
.hero-stats {
  list-style: none; margin: 3rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden;
}
.hero-stats li { background: var(--bg-2); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.hero-stats strong { font-size: 1.6rem; color: var(--accent-bright); letter-spacing: -0.02em; }
.hero-stats span { font-size: 0.84rem; color: var(--text-muted); }

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */
.section { padding: clamp(56px, 6vw, 96px) 0; }
.section-tight { padding: clamp(36px, 4vw, 60px) 0 clamp(56px, 6vw, 90px); }
.section-alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head.stacked { display: block; }
.section-head h2 { margin-bottom: 0; }
.section-lead { color: var(--text-muted); max-width: 70ch; margin-bottom: 2.4rem; }

.page-head {
  padding: clamp(48px, 5vw, 76px) 0 clamp(20px, 3vw, 34px);
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse 70% 120% at 10% -10%, rgba(10, 124, 255, 0.12), transparent 70%), var(--bg-2);
}
.page-head.slim { padding-bottom: clamp(18px, 2vw, 26px); }
.page-head h1 { margin-bottom: 0.6rem; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.86rem; color: var(--text-muted); }
.breadcrumb span[aria-hidden] { opacity: 0.4; }

/* ---------------------------------------------------------
   Cartes
   --------------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(170deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.grid { display: grid; gap: 22px; }
.grid > *, .devis-grid > *, .cart-layout > *, .detail-grid > *,
.auth-grid > *, .contact-grid > *, .footer-grid > *, .cta-panel > *,
.stack > *, .field, .field > *, .summary-card > * { min-width: 0; }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.why-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.service-card { display: flex; flex-direction: column; }
.service-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(10, 124, 255, 0.1), transparent 55%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.service-card:hover::after { opacity: 1; }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-icon {
  width: 46px; height: 46px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px; background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent-bright);
}
.card-icon svg { width: 24px; height: 24px; }
.tag {
  display: inline-block; padding: 4px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600;
}
.card-title { font-size: 1.16rem; margin-bottom: 0.45rem; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent-bright); }
.card-desc { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 1rem; }
.card-features { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 8px; }
.card-features li { position: relative; padding-left: 22px; font-size: 0.88rem; color: var(--text-soft); }
.card-features li::before {
  content: ""; position: absolute; left: 4px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.card-footer {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.price { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.price-unit { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-left: 2px; }
.price-xl { font-size: clamp(2rem, 1.4rem + 1.6vw, 2.6rem); color: var(--accent-bright); }
.price-note { color: var(--text-muted); font-size: 0.86rem; }
.card-more { display: inline-flex; gap: 6px; margin-top: 14px; font-size: 0.86rem; font-weight: 600; }
.card-more span { transition: transform 0.25s var(--ease); }
.card-more:hover span { transform: translateX(4px); }

.why-card { padding: 28px 26px; }
.why-card .card-icon { margin-bottom: 16px; }
.why-card h3 { margin-bottom: 0.4rem; }
.why-card p { color: var(--text-muted); font-size: 0.93rem; margin: 0; }
.why-card:hover { transform: translateY(-4px); border-color: var(--accent-line); }

/* Étapes */
.steps { list-style: none; margin: 2.4rem 0 0; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: step; }
.steps li { position: relative; padding: 28px 26px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-2); }
.step-num { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 10px; }
.steps h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.steps p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

.mini-steps { color: var(--text-soft); padding-left: 20px; margin: 0 0 1rem; }
.mini-steps li { margin-bottom: 0.5rem; font-size: 0.94rem; }
.mini-steps.tight li { font-size: 0.9rem; }

.check-list { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 11px; }
.check-list li { position: relative; padding-left: 30px; color: var(--text-soft); font-size: 0.95rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.check-list li::after {
  content: ""; position: absolute; left: 5.5px; top: 0.62em;
  width: 7px; height: 4px; border-left: 2px solid var(--accent-bright);
  border-bottom: 2px solid var(--accent-bright); transform: rotate(-45deg);
}

/* Panneaux */
.notice {
  margin: 1.4rem 0 0; padding: 15px 18px; border-radius: var(--r);
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  color: var(--text-soft); font-size: 0.92rem;
}
.notice strong { color: var(--text); }
.info-panel {
  margin-top: 3rem; padding: clamp(26px, 3vw, 40px);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: radial-gradient(ellipse 80% 140% at 0% 0%, rgba(10, 124, 255, 0.12), transparent 65%), var(--bg-2);
}
.info-panel h2 { font-size: 1.5rem; }
.info-panel p { color: var(--text-muted); max-width: 70ch; margin: 0; }
.info-cols { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: left; }

.cta-panel {
  display: grid; gap: 34px; grid-template-columns: 1.4fr 1fr; align-items: center;
  padding: clamp(28px, 3.4vw, 48px);
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  background: radial-gradient(ellipse 70% 120% at 100% 0%, rgba(10, 124, 255, 0.18), transparent 60%), var(--surface);
  box-shadow: var(--shadow);
}
.cta-actions { display: grid; gap: 12px; }
@media (max-width: 860px) { .cta-panel { grid-template-columns: 1fr; } }

.contact-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 12px; }
.contact-list li {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 11px; border-bottom: 1px solid var(--border); font-size: 0.93rem;
}
.contact-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-list li > span:first-child { color: var(--text-muted); }

/* ---------------------------------------------------------
   Filtres catalogue
   --------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 2rem; }
.chip {
  padding: 8px 17px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-soft); font-size: 0.88rem; font-weight: 500;
  transition: all 0.22s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--accent-line); transform: translateY(-1px); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.is-active:hover { color: #fff; }
.empty { color: var(--text-muted); padding: 40px 0; }

/* ---------------------------------------------------------
   Page détail
   --------------------------------------------------------- */
.detail-grid { display: grid; gap: 36px; grid-template-columns: 1.6fr 1fr; align-items: start; }
.detail-main .tag { margin-bottom: 14px; }
.detail-aside { position: sticky; top: calc(var(--header-h) + 22px); }
.price-card { display: flex; flex-direction: column; gap: 12px; }
.price-card .card-icon { width: 52px; height: 52px; }
.price-card .price { margin: 0; }
.sep { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
@media (max-width: 920px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
}

/* ---------------------------------------------------------
   Formulaires
   --------------------------------------------------------- */
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 0.88rem; font-weight: 600; color: var(--text-soft); }
.field > span small { font-weight: 400; color: var(--text-muted); }
.field > span em { color: var(--accent-bright); font-style: normal; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; max-width: 100%; min-width: 0;
  padding: 13px 15px; font-family: inherit; font-size: 0.97rem;
  color: var(--text); background: var(--bg-3);
  border: 1px solid var(--border-strong); border-radius: var(--r);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  appearance: none;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%238b96a6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px;
  padding-right: 40px; cursor: pointer;
  text-overflow: ellipsis;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: #65707f; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--danger); }
.error-text { color: #ffb3bb; font-size: 0.82rem; }

.qty-field { display: inline-grid; gap: 6px; }
.qty-field > span { font-size: 0.82rem; color: var(--text-muted); }
.qty-field input { width: 86px; text-align: center; padding: 11px 10px; }

.auth-grid { display: grid; gap: 34px; grid-template-columns: 1fr 1fr; align-items: start; }
.auth-card { padding: clamp(26px, 3vw, 40px); }
.auth-aside { padding-top: 12px; }
@media (max-width: 900px) { .auth-grid { grid-template-columns: 1fr; } }

.devis-grid { display: grid; gap: 30px; grid-template-columns: 1.5fr 1fr; align-items: start; }
.devis-aside { display: grid; gap: 18px; }
.form-card { padding: clamp(26px, 3vw, 40px); }
@media (max-width: 920px) { .devis-grid { grid-template-columns: 1fr; } }
.success-panel { display: grid; gap: 14px; }
.success-panel h2 { color: var(--success); margin: 0; }

/* ---------------------------------------------------------
   Panier
   --------------------------------------------------------- */
.cart-layout { display: grid; gap: 28px; grid-template-columns: 1.6fr 1fr; align-items: start; }
.cart-items { display: grid; gap: 16px; }
.cart-row { display: grid; gap: 20px; grid-template-columns: 1fr auto; align-items: center; padding: 22px 24px; }
.cart-row:hover { border-color: var(--border-strong); }
.cart-row-main .tag { margin-bottom: 10px; }
.cart-row-main h2 { margin-bottom: 0.3rem; }
.cart-row-main h2 a { color: var(--text); }
.cart-row-main h2 a:hover { color: var(--accent-bright); }
.cart-row-main p { margin-bottom: 0.4rem; }
.unit-price { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.unit-price strong { color: var(--text-soft); }
.cart-row-actions { display: grid; gap: 10px; justify-items: end; }
.qty-form { display: flex; align-items: flex-end; gap: 8px; }
.subtotal { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--accent-bright); }
.cart-clear { display: flex; justify-content: flex-end; }

.cart-summary { position: sticky; top: calc(var(--header-h) + 22px); }
.summary-card { display: grid; gap: 10px; }
.summary-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.summary-lines li { display: flex; justify-content: space-between; gap: 14px; font-size: 0.9rem; color: var(--text-soft); }
.summary-lines em { color: var(--text-muted); font-style: normal; }
.summary-count { font-size: 0.86rem; color: var(--text-muted); margin: 0; text-transform: uppercase; letter-spacing: 0.1em; }
.empty-state { padding: clamp(40px, 5vw, 70px) 26px; }

@media (max-width: 960px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}
@media (max-width: 620px) {
  .cart-row { grid-template-columns: 1fr; }
  .cart-row-actions { justify-items: stretch; }
  .qty-form { justify-content: space-between; }
  .subtotal { font-size: 1.4rem; }
}

/* ---------------------------------------------------------
   Contact
   --------------------------------------------------------- */
.contact-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: start; }
.contact-card { display: grid; gap: 12px; align-content: start; }
.contact-card .btn { margin-top: auto; }
.contact-email { font-size: 1.1rem; font-weight: 600; margin: 0; word-break: break-all; }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: clamp(42px, 5vw, 68px) 0 26px; margin-top: auto; }
.footer-grid { display: grid; gap: 34px; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
.footer-brand p { color: var(--text-muted); font-size: 0.92rem; margin-top: 16px; max-width: 34ch; }
.footer-col h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col li { font-size: 0.92rem; color: var(--text-soft); }
.footer-col a { color: var(--text-soft); }
.footer-col a:hover { color: var(--accent-bright); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border);
}
.footer-bottom p { margin: 0; font-size: 0.84rem; color: var(--text-muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------
   Animations discrètes
   --------------------------------------------------------- */
@keyframes slide-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* Le contenu est visible par defaut : l'animation n'est appliquee que si
   le JavaScript s'execute (classe posee sur <body> avant le premier rendu).
   Sans JS, rien n'est masque. */
.reveal { opacity: 1; transform: none; }
body.js-anim .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
body.js-anim .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal, body.js-anim .reveal { opacity: 1; transform: none; }
}

/* Impression */
@media print {
  .site-header, .site-footer, .btn, .nav-toggle, .flash-zone { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ccc; background: #fff; }
}
