/* =====================================================================
   IMPERIAL M.C – composants ajoutés (accessibilité, RGPD, formulaires)
   et correctifs responsive issus de l'audit du 17/09/2026.
   ===================================================================== */

[hidden] { display: none !important; }

/* ---------- Icônes (Lucide / Simple Icons) ---------- */
.icon { flex-shrink: 0; }

/* ---------- Accessibilité ---------- */
.sr-only {
  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: 1000;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 8px;
  font-family: var(--font-display); font-weight: 600;
}
.skip-link:focus { top: 12px; }
main:focus { outline: none; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.btn.primary:focus-visible,
.site-footer :focus-visible,
.topbar :focus-visible,
.page-hero :focus-visible,
.hero-showcase :focus-visible,
.cta-band :focus-visible,
.cookie-banner :focus-visible,
.offer-modal :focus-visible,
.lightbox :focus-visible,
.floaty:focus-visible { outline-color: #fff; }
.post-media:focus-visible { outline-offset: -3px; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; }

/* ---------- Header / tiroir mobile ---------- */
.nav-menu > li > a:focus-visible::after { transform: scaleX(1); }
.nav-cta .btn, .nav-tel { white-space: nowrap; }
.nav-toggle { flex-shrink: 0; }
.mobile-drawer { visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
.mobile-drawer.open { visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
.mobile-drawer nav a[aria-current="page"] { color: var(--red); }
.mobile-drawer .drawer-contact p { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.mobile-drawer .drawer-contact .icon { width: 18px; height: 18px; color: var(--red); margin-top: 3px; }

/* ---------- Liens de contenu ---------- */
.info-card .info-title { font-size: 1.05rem; margin-bottom: 4px; }
a.info-card { color: inherit; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Fil d'Ariane ---------- */
nav.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,.35); }

/* ---------- Défilement des logos (boucle infinie : 2 groupes identiques) ---------- */
.logo-track { gap: 0; animation-duration: 84s; }
.logo-group { display: flex; align-items: center; gap: 60px; padding-right: 60px; margin: 0; flex-shrink: 0; }

/* ---------- Icônes : taille par défaut et eyebrow ---------- */
.icon { width: 1.25em; height: 1.25em; }
.eyebrow .icon { width: 18px; height: 18px; }

/* ---------- Avis clients : initiales centrées ---------- */
.testimonial .who .avatar { display: grid; place-items: center; font-size: 15px; color: #fff; line-height: 1; }

/* ---------- Images produits : visibles en entier ---------- */
.ss-media, .product-media { background: #fff; }
.ss-media img, .product-media img { object-fit: contain; }
@media (min-width: 941px) {
  .subservice.reverse { grid-template-columns: 1fr 300px; }
}

/* ---------- Formulaires ---------- */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.quote-form { position: relative; }
.form-required { font-size: 13px; color: var(--slate); margin-bottom: 14px; }
.form-required .req, .field label .req { color: var(--red); }
.field label .hint { display: block; font-weight: 500; color: var(--slate); font-size: 12.5px; }
.field input[type="file"] { padding: 10px 12px; background: #fff; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  margin-right: 12px; border: 0; border-radius: 6px; padding: 8px 14px;
  background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 600; cursor: pointer;
}
.nowrap { white-space: nowrap; }
.form-privacy { grid-column: 1 / -1; font-size: 13px; line-height: 1.55; color: var(--slate); margin: 4px 0 0; }
.form-privacy a { color: var(--red); font-weight: 600; text-decoration: underline; }
.form-status { display: none; padding: 14px 18px; border-radius: 10px; font-size: 14.5px; margin-bottom: 18px; }
.form-status.show { display: block; }
.form-status.success { background: #e9f8ee; border: 1px solid #b6e6c5; color: #1c6b37; }
.form-status.error { background: #fdecee; border: 1px solid #f3b8c2; color: #8f0b22; }
.form-status a { color: inherit; font-weight: 700; text-decoration: underline; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }

/* ---------- Galerie (boutons) ---------- */
.gallery-grid .g-item, button.g-item {
  display: block; width: 100%; padding: 0; border: 0; font: inherit; text-align: left; color: inherit;
}
.gallery-grid .g-item:focus-visible .g-zoom { opacity: 1; transform: scale(1); }
.lightbox .lb-counter {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  color: #d5dae1; font-family: var(--font-display); font-size: 14px; margin: 0;
}

/* ---------- Carte OpenStreetMap soumise au consentement ---------- */
.map-consent {
  min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 28px; background: var(--bg-warm-2);
  background-image: repeating-linear-gradient(45deg, rgba(14,18,24,.03) 0 12px, transparent 12px 24px);
}
.map-consent .icon { width: 34px; height: 34px; color: var(--red); }
.map-consent p { font-size: 14px; color: var(--slate); max-width: 380px; margin: 0; }
.map-consent.loaded { display: block; padding: 0; min-height: 0; background: none; }
.map-consent iframe { border: 0; display: block; }

/* ---------- Bandeau cookies (CNIL) ---------- */
.cookie-banner .btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.cookie-banner .btn.light:hover { background: var(--red); border-color: var(--red); color: #fff; }
.cookie-banner .cookie-actions .btn { flex: 1 1 auto; }
.cookie-prefs { display: grid; gap: 10px; margin-top: 14px; }
.cookie-pref {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 12px 14px;
}
label.cookie-pref { cursor: pointer; }
.cookie-pref strong { display: block; color: #fff; font-size: 14px; font-family: var(--font-display); }
.cookie-pref span { display: block; font-size: 12.8px; line-height: 1.45; color: #c9d0da; }
.cookie-pref .cookie-always { font-size: 12px; font-weight: 600; color: #8fe0ab; white-space: nowrap; }
.switch {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; position: relative; cursor: pointer;
  width: 46px; height: 26px; border-radius: 26px; background: #56606d; transition: background .2s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s var(--ease);
}
.switch:checked { background: var(--red); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Pages légales ---------- */
.legal-body .legal-card-title { margin-top: 0; padding-top: 0; font-size: 1.3rem; }
.legal-toc { background: var(--bg-warm); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 30px; }
.legal-toc p { margin-bottom: 8px; }
.legal-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal-body h2[id], .legal-body h3[id] { scroll-margin-top: 110px; }
.legal-notice { background: var(--bg-warm); }
.legal-notice p { font-size: .95rem; }
.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.legal-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 560px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line-2); color: var(--slate); }
.legal-table th { background: var(--bg-warm); color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-table code { font-size: .88em; background: var(--bg-warm-2); padding: 1px 6px; border-radius: 4px; }

/* ---------- Hero des pages : marges latérales garanties ---------- */
.container.page-hero-inner { padding-left: 22px; padding-right: 22px; }

/* ---------- Hero accueil (tablette & mobile) : texte d'abord, image dessous, tout centré ---------- */
@media (max-width: 940px) {
  .hero-showcase-grid { text-align: center; justify-items: center; }
  .hero-showcase .hero-copy { order: -1; display: flex; flex-direction: column; align-items: center; }
  .hero-showcase .hero-window { order: 0; }
  .hero-showcase .lede { text-align: center; margin-inline: auto; }
  .hero-showcase .hero-actions { justify-content: center; width: 100%; }
  .hero-showcase .hero-offer { justify-content: center; }
  .hero-window .fig-badge b, .hero-window .fig-badge span { white-space: nowrap; }
}

/* ---------- Écrans tactiles : descriptions des cartes visibles ---------- */
@media (hover: none) {
  .service-card p { max-height: none; opacity: 1; margin-bottom: 4px; }
  .service-card { min-height: 320px; }
}

/* ---------- Boutons flottants : à droite pour ne pas masquer le contenu ---------- */
.floaties { left: auto; right: 20px; }
.floaty .tip { left: auto; right: 68px; }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .topbar { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .nav { min-height: 68px; gap: 12px; }
  .brand img { height: 34px; }
  .nav-cta { gap: 10px; }
  .floaties { right: 14px; bottom: 14px; gap: 10px; }
  .floaty { width: 48px; height: 48px; border-radius: 12px; }
  .floaty svg { width: 24px; height: 24px; }
  .floaty .tip { display: none; }
  .site-footer { padding-top: 56px; }
  .footer-grid { padding-bottom: 36px; }
  .footer-bottom { padding: 18px 0 22px; }
  .footer-bottom .container { padding-inline: 70px; }
  .footer-legal .sep { display: none; }
  .footer-legal .container { gap: 0 18px; padding-inline: 70px; }
  .cookie-banner { max-height: calc(100vh - 24px); overflow-y: auto; }
  .lightbox { padding: 16px 16px 80px; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .lightbox .lb-close { top: 14px; right: 14px; width: 44px; height: 44px; }
  .lightbox .lb-counter { bottom: 30px; }
  .hero-showcase .eyebrow::before { display: none; }
  .hero-showcase .hero-actions .btn { flex: 1 1 100%; }
}
@media (max-width: 420px) {
  .nav-cta .btn.sm { padding: 10px 14px; font-size: 13px; }
  .hero-stats .stat { padding: 20px 14px; }
  .hero-stats .stat b { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:hover, .feature:hover, .product-card:hover, .post-card:hover, .testimonial:hover, .info-card:hover { transform: none; }
  .service-card:hover img, .split-media:hover img, .post-card:hover .post-media img,
  .product-card:hover .product-media img, .gallery-grid .g-item:hover img, .subservice:hover .ss-media img { transform: none; }
}
