/*
* ============================================================
* STYLE.CSS — Toilettage Rex
* ============================================================
*
* RÔLE : CSS custom uniquement — tout ce qui dépasse Tailwind.
* Complémente (ne remplace pas) les utilitaires Tailwind du HTML.
*
* DIRECTION ESTHÉTIQUE — /ui-ux-pro-max :
* Mix retenu : Warm Editorial (chaleur artisanale, crème/ivoire) +
* Soft Rounded UI (cards et boutons arrondis, ombres douces) +
* touche Hero-Centric pour la composition mosaïque d'ouverture.
* Essence visuelle : un salon lumineux, feutré, qui respire la
* douceur — jamais clinique, jamais "jouet".
* Signature unique : mosaïque photo en 3 formats + carte d'accent
* ronde reprenant le motif du logo (carré arrondi + pastille).
*
* ⚠️ Les tokens (couleurs, polices, radius) vivent dans @theme
*    inline dans le <head>. Ici on utilise var(--color-primary),
*    var(--font-display), etc.
*
* ⚠️ @apply NON disponible (Play CDN) — écrire du CSS classique.
* ============================================================
*/

/* ============================================================
   1. RESET & BASE CUSTOM
   ============================================================ */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background-color: var(--color-surface);
  color: var(--color-ink);
  font-family: var(--font-body);
}

::selection {
  background: var(--color-primary);
  color: var(--color-surface);
}

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

main p {
  max-width: 70ch;
}
.card p, .hero p, .cta p, .map-zones p {
  max-width: none;
}

img { max-width: 100%; height: auto; }

/* Lien d'évitement */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 12px 24px;
  z-index: 9999;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius-card) 0;
}
.skip-link:focus { top: 0; }

/* ============================================================
   2. TYPOGRAPHIE AVANCÉE
   ============================================================ */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
}
.eyebrow--on-dark {
  color: var(--color-secondary);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

/* Mise en exergue inline d'un fragment (H8.1) — reste dans le flux du texte */
.accent-text {
  color: var(--color-primary);
  font-weight: 800;
}
.accent-text--on-dark {
  color: var(--color-secondary);
}

/* ============================================================
   3. ATMOSPHÈRE DE FOND
   ============================================================ */
.texture-grain {
  position: relative;
  isolation: isolate;
}
.texture-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: radial-gradient(circle at 15% 20%, rgba(21,101,192,0.06), transparent 45%),
                     radial-gradient(circle at 85% 75%, rgba(255,183,77,0.10), transparent 40%);
}

.section-dark {
  background: var(--color-primary-dark);
  color: var(--color-surface);
  position: relative;
  overflow: hidden;
}
.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06), transparent 40%),
                     radial-gradient(circle at 80% 80%, rgba(255,183,77,0.12), transparent 45%);
  pointer-events: none;
}

/* ============================================================
   4. COMPOSANTS RÉCURRENTS
   ============================================================ */

/* --- Nav responsive : fallback anti double-menu (H2.4) ---
   Sélecteurs renforcés (a.nav-cta-desktop) : .nav-cta-desktop partage
   son élément avec .btn-primary, qui déclare aussi `display`. Une
   spécificité égale (classe seule) ferait gagner la règle la plus
   tardive du fichier (.btn-primary) quel que soit le viewport — bug
   observé : le CTA desktop restait visible sur mobile à côté du burger.
   L'ajout du sélecteur d'élément (a., button.) augmente la spécificité
   et garantit que ces règles de visibilité l'emportent toujours. */
ul.nav-links-desktop { display: none; list-style: none; padding: 0; margin: 0; }
a.nav-cta-desktop     { display: none; }
button.burger         { display: inline-flex; }

@media (min-width: 1024px) {
  ul.nav-links-desktop { display: flex; }
  a.nav-cta-desktop     { display: inline-flex; }
  button.burger         { display: none; }
}

.site-header {
  border-bottom: 1px solid rgba(38,32,25,0.06);
}

.nav-logo__img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}
.nav-logo__img:hover { opacity: 0.82; }
@media (min-width: 768px) {
  .nav-logo__img { height: 52px; }
}

/* Style de nav propre au projet : pas de soulignement uniforme.
   Le hover ne change que la couleur du texte. L'onglet actif reçoit
   une pastille ronde (écho du logo) devant le libellé — jamais tous
   les onglets. */
.nav-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-ink);
  position: relative;
  padding-left: 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.nav-link:hover {
  color: var(--color-primary);
}
.nav-link.active {
  color: var(--color-primary);
  padding-left: 18px;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-secondary);
}

.burger {
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.burger-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.burger-lines span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger[aria-expanded="true"] .burger-lines span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.burger[aria-expanded="true"] .burger-lines span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] .burger-lines span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-menu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  background: var(--color-surface);
  border-bottom: 1px solid rgba(38,32,25,0.08);
}
.mobile-menu.open {
  max-height: 480px;
}
.mobile-menu ul {
  list-style: none;
  padding: 1rem 1.5rem 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.mobile-menu a {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-ink);
  font-family: var(--font-body);
}
.mobile-menu a.active { color: var(--color-primary); }
.mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: white !important;
  border-radius: var(--radius-btn);
  padding: 0.75rem 1.5rem;
  margin-top: 0.5rem;
}

/* --- Hiérarchie des boutons à 3 niveaux (H3.5) --- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-btn);
  transition: all 0.2s ease;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}
/* Variante sur photo / fond complexe : renfort de lisibilité */
.btn-secondary--on-photo {
  background: rgba(38,32,25,0.28);
  backdrop-filter: blur(8px);
  color: var(--color-surface);
  border-color: var(--color-surface);
}
.btn-secondary--on-photo:hover {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-surface);
}
.link-inline {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.link-inline:hover {
  color: var(--color-primary-light);
}
.link-inline--on-dark {
  color: var(--color-secondary);
}
.link-inline--on-dark:hover {
  color: var(--color-accent);
}

/* Variantes boutons sur bande de couleur pleine (CTA de fin de page,
   Phase 2) : même géométrie que .btn-primary / .btn-secondary (padding,
   radius, transition hérités de la règle groupée ci-dessus), seule la
   "peau" change pour rester lisible sur fond --color-primary. */
.btn-primary--on-brand {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-surface);
}
.btn-primary--on-brand:hover {
  background: var(--color-primary-dark);
  color: var(--color-surface);
  border-color: var(--color-primary-dark);
}
.btn-secondary--on-brand {
  background: transparent;
  color: var(--color-surface);
  border-color: var(--color-surface);
}
.btn-secondary--on-brand:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  transition: all 0.25s ease;
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.service-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--color-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: 1.1rem;
}
.service-card__icon svg { width: 26px; height: 26px; }

/* --- Mosaïque hero (HERO-05) --- */
.hero-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 1rem;
  height: 520px;
}
.hero-mosaic__item {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}
.hero-mosaic__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-mosaic__item--main {
  grid-column: 1 / 5;
  grid-row: 1 / 4;
}
.hero-mosaic__item--tall {
  grid-column: 5 / 7;
  grid-row: 1 / 5;
}
.hero-mosaic__item--wide {
  grid-column: 1 / 5;
  grid-row: 4 / 5;
}
.hero-mosaic__badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: var(--color-surface);
  color: var(--color-primary);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-card);
}

/* --- Bloc overlap image/texte (BLOC-10) --- */
.overlap-photo {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}
.overlap-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.overlap-accent {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: var(--color-secondary);
  z-index: -1;
}
.overlap-accent--top-left {
  top: -20px;
  left: -20px;
}

/* --- FAQ accordéon (BLOC-08) --- */
.faq-item {
  border-bottom: 1px solid rgba(38,32,25,0.1);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-ink);
}
.faq-question__icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}
.faq-question[aria-expanded="true"] .faq-question__icon {
  transform: rotate(45deg);
}
.faq-answer {
  padding: 0 0 1.35rem;
  color: var(--color-ink-soft);
  line-height: 1.7;
}

/* --- Carte zone d'intervention (Leaflet + OSM) --- */
.map-wrapper {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.map-container {
  width: 100%;
  height: 380px;
  background: var(--color-surface-alt);
}
@media (max-width: 768px) {
  .map-container { height: 300px; }
}
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-ink);
}
.leaflet-popup-content { font-family: var(--font-body); margin: 12px 16px; }
.leaflet-popup-tip { background: var(--color-surface); }

.map-zones {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.map-zones li { display: flex; align-items: flex-start; gap: 0.6rem; }
.map-zones svg { flex-shrink: 0; margin-top: 3px; color: var(--color-primary); width: 18px; height: 18px; }

.info-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.75rem;
}

/* ============================================================
   5. MISE EN VALEUR
   ============================================================ */
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.service-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.6;
}
.service-list__dot {
  flex-shrink: 0;
  margin-top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* ============================================================
   6. ANIMATIONS & MICRO-INTERACTIONS
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   7. LIGHTBOX GALERIE (prêt pour pages internes)
   ============================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(38,32,25,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox-overlay[hidden] { display: none; }
.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,248,240,0.15);
  color: var(--color-surface);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,248,240,0.3);
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ============================================================
   8. PAGE MENTIONS LÉGALES
   ============================================================ */
.mentions-legales .container {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}
.mentions-legales h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.25rem;
  color: var(--color-ink);
  margin-bottom: 2rem;
}
.mentions-legales h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--color-ink);
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
}
.mentions-legales p {
  color: var(--color-ink-soft);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.mentions-legales ul {
  list-style: disc;
  color: var(--color-ink-soft);
  line-height: 1.75;
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}
.mentions-legales li { margin-bottom: 0.35rem; }
.mentions-legales a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.mentions-legales a:hover { color: var(--color-primary-light); }

/* ============================================================
   9. FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-primary-dark);
  color: var(--color-surface-alt);
}
.footer-logo { display: inline-block; }
.footer-logo img {
  display: block;
  height: 48px;
  width: auto;
  object-fit: contain;
  max-width: 100%;
}
.footer-heading {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-surface);
  margin-bottom: 1rem;
}
.footer-link {
  color: var(--color-surface-alt);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-link:hover { color: var(--color-secondary); }
.footer-bottom {
  border-top: 1px solid rgba(255,248,240,0.14);
}
.readyup-credit {
  color: inherit;
}
.readyup-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   10. RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 640px) {
  .hero-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 160px);
    height: auto;
  }
  .hero-mosaic__item--main { grid-column: 1 / 3; grid-row: 1 / 2; }
  .hero-mosaic__item--tall { grid-column: 1 / 2; grid-row: 2 / 4; }
  .hero-mosaic__item--wide { grid-column: 2 / 3; grid-row: 2 / 4; }
}
