@import url('/assets/tokens.css');

/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

/* ─── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.45rem); }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ─── Layout ────────────────────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  padding: 2.5rem 0;
}

/* ─── Header ────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1140px;
  margin: 0 auto;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-link img {
  height: 48px;
  width: auto;
}

/* ─── Navigation ────────────────────────────────────────────────── */
nav ul {
  list-style: none;
  padding: 0;
  display: none;
}

nav ul.nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 99;
}

nav a {
  display: block;
  padding: 0.4rem 0.5rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-text);
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-bg));
}

/* ─── Nav Toggle (Hamburger) ────────────────────────────────────── */
.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.4rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(150deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 75%, #000e2f) 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.1rem;
  opacity: 0.92;
  max-width: 58ch;
  margin-bottom: 1.5rem;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ─── Hours Bar ─────────────────────────────────────────────────── */
.hours-bar {
  background: var(--color-secondary);
  color: #111827;
  padding: 0.65rem 1rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-size: 1rem;
  text-align: center;
}

.btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--color-secondary);
  color: #111827;
  border-color: var(--color-secondary);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--color-secondary) 85%, #000);
  border-color: color-mix(in srgb, var(--color-secondary) 85%, #000);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background: color-mix(in srgb, var(--color-accent) 85%, #000);
  border-color: color-mix(in srgb, var(--color-accent) 85%, #000);
}

.btn-secondary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-primary) 85%, #000);
  border-color: color-mix(in srgb, var(--color-primary) 85%, #000);
}

/* ─── Services Grid ─────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.service-card {
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.service-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.service-card-body {
  padding: 1.25rem;
}

.service-card h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.service-card p {
  color: #4B5563;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.link-more {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.link-more:hover {
  color: color-mix(in srgb, var(--color-primary) 75%, #000);
  text-decoration: underline;
}

/* ─── Page Hero ─────────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(150deg, var(--color-primary) 0%, color-mix(in srgb, var(--color-primary) 75%, #000e2f) 100%);
  color: #fff;
  padding: 2.5rem 0;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.6rem;
}

.page-hero p {
  opacity: 0.9;
  font-size: 1.05rem;
}

/* ─── Background Light ──────────────────────────────────────────── */
.bg-light {
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-bg));
}

/* ─── CTA Section ───────────────────────────────────────────────── */
.cta-section {
  background: var(--color-primary);
  color: #fff;
  text-align: center;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

/* ─── Services List (services page) ────────────────────────────── */
.services-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-article {
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.service-article h2 {
  color: var(--color-primary);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.service-article ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.75rem;
}

.service-article ul li {
  margin-bottom: 0.4rem;
  color: #374151;
}

/* ─── Contact ───────────────────────────────────────────────────── */
.contact-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-info h3 {
  color: var(--color-primary);
  font-size: 1rem;
  margin-bottom: 0.4rem;
  margin-top: 1.25rem;
}

.contact-info h3:first-child {
  margin-top: 0;
}

.phone-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.25rem;
}

.phone-link:hover {
  text-decoration: underline;
}

address {
  font-style: normal;
}

/* ─── Form ──────────────────────────────────────────────────────── */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
}

input,
textarea {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

textarea {
  min-height: 130px;
  resize: vertical;
}

button[type="submit"] {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  align-self: flex-start;
}

button[type="submit"]:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.form-legal {
  font-size: 0.8rem;
  color: #6b7280;
}

/* ─── Map ───────────────────────────────────────────────────────── */
.map-container {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  margin-bottom: 0.75rem;
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
}

/* ─── About ─────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.about-intro {
  font-size: 1.1rem;
  color: #374151;
  margin-bottom: 1rem;
}

.fact-box {
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
  border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.fact-box h4 {
  color: var(--color-primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.fact-box ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.fact-box ul li {
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  color: #374151;
}

/* ─── Mentions légales ──────────────────────────────────────────── */
.mentions-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 2rem;
  margin-top: 2rem;
}

.mentions-section h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.mentions-section p {
  color: #374151;
  font-size: 0.95rem;
}

/* ─── Visual Placeholders ───────────────────────────────────────── */
.visual-placeholder {
  display: block;
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-primary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-secondary) 18%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-aspect="4:3"]  { aspect-ratio: 4 / 3; }
.visual-placeholder[data-aspect="1:1"]  { aspect-ratio: 1 / 1; }
.visual-placeholder[data-aspect="3:4"]  { aspect-ratio: 3 / 4; }
.visual-placeholder[data-aspect="21:9"] { aspect-ratio: 21 / 9; }

.visual-placeholder[data-tone="secondary"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-secondary) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-secondary) 10%, var(--color-bg)) 55%,
      color-mix(in srgb, var(--color-primary) 16%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-tone="accent"] {
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--color-accent, var(--color-primary)) 22%, var(--color-bg)) 0%,
      color-mix(in srgb, var(--color-primary) 12%, var(--color-bg)) 60%,
      color-mix(in srgb, var(--color-secondary) 16%, var(--color-bg)) 100%
    );
}
.visual-placeholder[data-tone="muted"] {
  background: color-mix(in srgb, var(--color-text) 8%, var(--color-bg));
}

/* ─── Footer ────────────────────────────────────────────────────── */
footer {
  background: var(--color-text);
  color: #d1d5db;
  padding: 2rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

footer h4 {
  color: #f9fafb;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}

footer p {
  font-size: 0.9rem;
}

footer a {
  color: var(--color-secondary);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer address {
  font-style: normal;
  font-size: 0.9rem;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.3rem;
}

.footer-bottom p:last-child {
  margin-bottom: 0;
}

/* ─── Intro text ────────────────────────────────────────────────── */
.intro-text {
  color: #4B5563;
  max-width: 65ch;
  margin-bottom: 2rem;
}

/* ─── Skip link (a11y) ──────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ─── Responsive — Tablet (≥ 640px) ────────────────────────────── */
@media (min-width: 640px) {
  nav ul {
    display: flex;
    flex-direction: row;
    position: static;
    gap: 0.25rem;
    border: none;
    box-shadow: none;
    padding: 0;
    background: none;
  }

  .nav-toggle {
    display: none;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── Responsive — Desktop (≥ 1024px) ──────────────────────────── */
@media (min-width: 1024px) {
  section {
    padding: 3.5rem 0;
  }

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

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

  .services-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .map-container iframe {
    height: 340px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS — Template B · Laverie Pressing Express Grand-Bourg
   Animation pass Lot 7+ · WEB-2412
═══════════════════════════════════════════════════════════════════ */

/* ─── Reduced motion kill-switch (a11y non-négociable) ─────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (prefers-reduced-motion: no-preference) {

  /* 1. Hero — staggered fade-in-up on load */
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero h1         { animation: fadeInUp 0.55s ease both; }
  .hero-tagline    { animation: fadeInUp 0.55s 0.12s ease both; }
  .hero .cta-group { animation: fadeInUp 0.55s 0.24s ease both; }

  /* Page hero stagger (pages secondaires) */
  .page-hero h1 { animation: fadeInUp 0.5s ease both; }
  .page-hero p  { animation: fadeInUp 0.5s 0.1s ease both; }

  /* 2. Hours bar — slide-down on load */
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .hours-bar { animation: slideDown 0.4s 0.36s ease both; }

  /* 3. Scroll-reveal sections (garde .js-reveal = activé seulement si JS tourne) */
  .js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.65s ease, transform 0.65s ease;
  }
  .js-reveal [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* 4. Service cards — hover lift */
  .service-card {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
  }
  .service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(14, 116, 144, 0.15);
  }

  /* Service articles (page services) — hover lift */
  .service-article {
    transition: box-shadow 0.25s ease, transform 0.25s ease;
  }
  .service-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(14, 116, 144, 0.12);
  }

  /* 5. Visual placeholders — gradient shimmer */
  @keyframes placeholderShimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  .visual-placeholder {
    background-size: 200% 200%;
    animation: placeholderShimmer 6s ease-in-out infinite;
  }

  /* 6. CTA section — pulse ring sur le bouton d'appel principal */
  @keyframes pulseRing {
    0%   { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.5); }
    70%  { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
  }
  .cta-section .btn-primary {
    animation: pulseRing 2.4s ease-out infinite;
  }

}
