@import './tokens.css';

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ── */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--color-primary); }
h1 { font-size: clamp(1.75rem, 5vw, 3rem); margin-bottom: 0.75rem; }
h2 { font-size: clamp(1.4rem, 4vw, 2.25rem); margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--color-secondary); }

/* ── Layout ── */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3.5rem 0; }
.section--alt { background: #F9F6F1; }
.section--dark { background: var(--color-primary); color: rgba(255,255,255,0.88); }
.section--dark h1,
.section--dark h2,
.section--dark h3 { color: #fff; }

/* ── Skip link (a11y) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ── Header ── */
.site-header {
  background: var(--color-primary);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-logo { text-decoration: none; }
.site-logo img { height: 40px; width: auto; }
.site-logo:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 4px; border-radius: 2px; }

/* ── Nav toggle ── */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
}
.nav-toggle:focus-visible { outline: 2px solid var(--color-accent); }
.hamburger {
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: background 0.3s;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s;
}
.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

/* ── Main nav (mobile-first: hidden) ── */
.main-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-primary);
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.main-nav.is-open { display: block; }
.main-nav ul { display: flex; flex-direction: column; gap: 0.25rem; }
.main-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.6rem 0;
  display: block;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--color-accent);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.2s, transform 0.1s;
  line-height: 1.4;
}
.btn:hover { opacity: 0.88; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.btn--primary { background: var(--color-secondary); color: #fff; border-color: var(--color-secondary); }
.btn--secondary { background: transparent; color: var(--color-secondary); border-color: var(--color-secondary); }
.btn--accent { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.btn--lg { padding: 1rem 2.25rem; font-size: 1.1rem; }

/* ── Visual Placeholder ── */
.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));
}

/* ── Fade-in animations (JS-driven) ── */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.is-visible { opacity: 1; transform: none; }

/* ── Hero ── */
.hero {
  background: var(--color-primary);
  padding: 3rem 0 2.5rem;
  color: rgba(255,255,255,0.88);
}
.hero .visual-placeholder { margin-bottom: 2rem; }
.hero-content h1 { color: #fff; }
.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-accent);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.hero-lead { color: rgba(255,255,255,0.8); max-width: 60ch; margin-bottom: 0.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }

/* ── Feature cards ── */
.features-grid { display: grid; gap: 1.5rem; }
.feature-card {
  background: var(--color-bg);
  border-left: 4px solid var(--color-accent);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
.feature-card h3 { color: var(--color-primary); margin-bottom: 0.4rem; }
.feature-card p { margin-bottom: 0; color: #374151; }

/* ── CTA banner ── */
.cta-section { text-align: center; }
.cta-section h2 { margin-bottom: 0.5rem; }
.cta-section .cta-lead { max-width: 55ch; margin: 0 auto 0.75rem; }
.cta-rating { font-size: 1rem; color: var(--color-accent); font-weight: 600; margin-bottom: 1.5rem; }

/* ── Page header (inner pages) ── */
.page-header { background: var(--color-primary); padding: 2.75rem 0; text-align: center; }
.page-header h1 { color: #fff; }
.page-header p { color: rgba(255,255,255,0.75); margin: 0.5rem auto 0; max-width: 55ch; }

/* ── Services ── */
.services-intro { padding: 2rem 0 1rem; }
.services-grid { display: grid; gap: 2rem; margin-top: 2rem; }
.service-card {
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-bg);
}
.service-card__body { padding: 1.375rem; }
.service-card__body h3 { margin-bottom: 0.5rem; }
.service-card__list { padding-left: 1.25rem; list-style: disc; }
.service-card__list li { margin-bottom: 0.3rem; color: #374151; }

.service-card--text {
  background: #F9F6F1;
  border: none;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 8px 8px 0;
}
.service-card--text .service-card__body { padding: 1.25rem; }

.services-cta { text-align: center; padding: 2rem 0; }

/* ── About ── */
.about-content { display: grid; gap: 2rem; }
.about-text p { color: #374151; }
.about-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--color-primary);
  border-radius: 8px;
}
.stat { text-align: center; flex: 1; min-width: 100px; }
.stat__number { font-family: var(--font-display); font-size: 2.25rem; color: var(--color-accent); line-height: 1; display: block; }
.stat__label { font-size: 0.875rem; color: rgba(255,255,255,0.75); display: block; margin-top: 0.25rem; }

/* ── Contact ── */
.contact-grid { display: grid; gap: 2.5rem; }
.contact-info__item { margin-bottom: 1.5rem; }
.contact-info__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}
.contact-info__item a { color: var(--color-secondary); text-decoration: none; font-weight: 600; }
.contact-info__item a:hover { text-decoration: underline; }

.contact-form-wrap {
  background: #F9F6F1;
  padding: 2rem;
  border-radius: 8px;
}
.contact-form-wrap h2 { margin-bottom: 1.25rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.4rem; color: var(--color-primary); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(176,114,20,0.15);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-submit { margin-top: 0.5rem; }

.rgpd-notice { font-size: 0.8rem; color: #6B7280; margin-top: 1rem; line-height: 1.5; }
.rgpd-notice a { color: var(--color-accent); }

.map-wrap { border-radius: 8px; overflow: hidden; margin-top: 1.5rem; }
.map-wrap iframe { display: block; width: 100%; height: 280px; border: 0; }

/* ── Footer ── */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,0.8); padding: 2.5rem 0 1.75rem; }
.footer-inner { display: grid; gap: 1.75rem; }
.footer-brand strong { display: block; font-family: var(--font-display); font-size: 1.15rem; color: #fff; margin-bottom: 0.4rem; }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.9rem; margin-bottom: 0.25rem; }
.footer-brand a { color: var(--color-accent); text-decoration: none; }
.footer-brand a:hover { text-decoration: underline; }
.footer-nav-title { font-weight: 600; color: #fff; margin-bottom: 0.6rem; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-nav-list { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-nav-list a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-nav-list a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 1.5rem; padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.45); margin: 0; }
.footer-tel-cta { display: block; }
.footer-tel-cta a {
  display: inline-block;
  background: var(--color-secondary);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.footer-tel-cta a:hover { opacity: 0.88; }

/* ── Tablet (640px+) ── */
@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .about-content { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: block !important;
    position: static;
    padding: 0;
    border: none;
    background: none;
  }
  .main-nav ul { flex-direction: row; gap: 2rem; }
  .main-nav a { font-size: 0.95rem; padding: 0.25rem 0; }

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

  .hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
  .hero .visual-placeholder { margin-bottom: 0; order: 2; }
  .hero-content { order: 1; }

  .footer-inner { grid-template-columns: 2fr 1fr 1fr; align-items: start; }
}
