@import './tokens.css';

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}
h1 { font-size: clamp(1.75rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.1rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: .5rem; }
p  { margin-bottom: 1rem; }
a  { color: var(--color-primary); text-decoration: underline; }
a:hover { color: var(--color-accent); }
ul { padding-left: 1.4rem; }
li { margin-bottom: .35rem; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.section { padding: 4rem 0; }
.section--alt { background: #f0f9fb; }
.section--dark { background: var(--color-primary); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--color-secondary); }

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

/* ── Header ── */
header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .85rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}
.site-logo img { width: 40px; height: 40px; flex-shrink: 0; }
.site-logo .logo-name { display: none; }
@media (min-width: 600px) { .site-logo .logo-name { display: inline; } }

nav { display: none; width: 100%; }
nav.open { display: flex; flex-direction: column; padding-bottom: .5rem; }
nav a {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
nav a:hover, nav a[aria-current="page"] { color: var(--color-secondary); text-decoration: none; }

.menu-toggle {
  background: none;
  border: 2px solid rgba(255,255,255,.5);
  color: #fff;
  border-radius: 4px;
  padding: .4rem .7rem;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
}
.menu-toggle:hover { border-color: var(--color-secondary); color: var(--color-secondary); }

@media (min-width: 768px) {
  nav { display: flex !important; flex-direction: row; gap: 1.5rem; align-items: center; width: auto; }
  nav a { padding: 0; border: none; }
  .menu-toggle { display: none; }
}

/* ── Hero ── */
.hero {
  background: var(--color-primary);
  color: #fff;
  padding: 3.5rem 0 4rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { color: #e5e7eb; max-width: 620px; margin-bottom: 1.5rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .hero-grid { grid-template-columns: 1fr 1fr; } }

/* ── Buttons ── */
.btn {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  padding: .7rem 1.6rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background .2s, color .2s;
  margin-right: .5rem;
  margin-bottom: .5rem;
}
.btn:hover { background: var(--color-accent); color: #fff; }
.btn--outline {
  background: transparent;
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
}
.btn--outline:hover { background: var(--color-secondary); color: var(--color-primary); }

/* ── Info bar ── */
.info-bar { background: var(--color-secondary); padding: .7rem 0; }
.info-bar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  justify-content: center;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  padding: 0 1.25rem;
}
.info-bar a { color: var(--color-primary); text-decoration: none; font-weight: 700; }
.info-bar a:hover { color: var(--color-accent); }

/* ── Cards ── */
.cards-grid { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .cards-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.card h3 { color: var(--color-primary); }
.section--dark .card {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.15);
  color: #fff;
}
.section--dark .card h3 { color: var(--color-secondary); }

/* ── Feature blocks ── */
.feature-block { margin-bottom: 2.5rem; }
.feature-block h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  border-left: 4px solid var(--color-secondary);
  padding-left: .75rem;
  margin-bottom: .75rem;
}

/* ── Two-column ── */
.two-col { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 768px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ── CTA ── */
.cta-section {
  background: var(--color-secondary);
  padding: 3.5rem 0;
  text-align: center;
}
.cta-section h2, .cta-section p { color: var(--color-primary); }
.cta-section p { margin-bottom: 1.5rem; }
.cta-phone {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  display: block;
  margin-bottom: 1rem;
}
.cta-phone:hover { color: var(--color-accent); }

/* ── Social proof ── */
.social-proof {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}
.social-proof .rating {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-secondary);
  display: block;
}
.social-proof .stars { font-size: 1.8rem; margin-bottom: .5rem; }
.social-proof p { color: #e5e7eb; margin: 0; }

/* ── Contact ── */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info dt {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 1.2rem;
}
.contact-info dd { margin-left: 0; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .6rem .9rem;
  border: 2px solid #d4d4d8;
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: #fff;
  color: var(--color-text);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--color-primary); outline: none; }
.form-group textarea { min-height: 130px; resize: vertical; }

/* ── Map ── */
.map-wrapper { margin-top: 2rem; border-radius: 8px; overflow: hidden; }
.map-wrapper iframe { display: block; width: 100%; height: 320px; border: 0; }

/* ── OTA links ── */
.ota-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.ota-list a {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  padding: .55rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  transition: background .2s;
}
.ota-list a:hover { background: var(--color-accent); }

/* ── Footer ── */
footer {
  background: var(--color-primary);
  color: #e5e7eb;
  padding: 2.5rem 0 1.5rem;
  font-size: .9rem;
}
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
footer h4 { font-family: var(--font-display); font-size: 1rem; color: var(--color-secondary); margin-bottom: .75rem; }
footer ul { list-style: none; padding: 0; }
footer li { margin-bottom: .4rem; }
footer a { color: #e5e7eb; text-decoration: none; }
footer a:hover { color: var(--color-secondary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  font-size: .82rem;
  color: #9ca3af;
}

/* ── Breadcrumb ── */
.breadcrumb { font-size: .85rem; color: #6b7280; margin-bottom: 1.5rem; }
.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb span { margin: 0 .4rem; }

/* ── Fade-in (base — visible par défaut, animé si motion OK) ── */
/* Les règles d'animation sont dans le bloc @media ci-dessous */

/* ── Helpers ── */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.tag {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-primary);
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 3px;
  font-family: var(--font-display);
  margin-bottom: .75rem;
}
.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; top: -100%; left: 1rem;
  background: var(--color-primary); color: #fff;
  padding: .5rem 1rem; border-radius: 0 0 4px 4px;
  font-weight: 600; z-index: 9999; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ══════════════════════════════════════════
   ANIMATION PASS — Lot 7 — Ô Jardin Des Surettes
   ══════════════════════════════════════════ */

/* ── Scroll-reveal ── */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .fade-in.visible { opacity: 1; transform: none; }
  /* stagger pour grilles de cards */
  .cards-grid .card.fade-in:nth-child(2) { transition-delay: .1s; }
  .cards-grid .card.fade-in:nth-child(3) { transition-delay: .2s; }
  /* visual-placeholder : légère mise à l'échelle en plus du glissement */
  .visual-placeholder.fade-in {
    transform: translateY(12px) scale(.97);
    /* transition combinée : opacity + transform reveal + shimmer hover */
    transition: opacity .6s ease, transform .6s ease, background-position .9s ease, box-shadow .4s ease;
  }
  .visual-placeholder.fade-in.visible { transform: none; }
}

/* ── Hero entrée décalée ── */
@keyframes heroSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-grid > :first-child { animation: heroSlideIn .65s ease both; }
  .hero-grid > :last-child  { animation: heroSlideIn .65s .18s ease both; }
}

/* ── Hover lift des cartes ── */
@media (prefers-reduced-motion: no-preference) {
  /* opacity incluse pour ne pas écraser le fade-in reveal */
  .card { transition: opacity .6s ease, transform .25s ease, box-shadow .25s ease; }
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,.13);
  }
}

/* ── Micro-interaction boutons ── */
@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background .2s, color .2s, transform .2s ease, box-shadow .2s ease;
  }
  .btn:hover  { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
}

/* ── Visual placeholder — shimmer dégradé au survol ── */
.visual-placeholder { background-size: 200% 200%; background-position: 0% 0%; }
@media (prefers-reduced-motion: no-preference) {
  .visual-placeholder {
    transition: background-position .9s ease, transform .4s ease, box-shadow .4s ease;
  }
  .visual-placeholder:hover {
    background-position: 100% 100%;
    box-shadow: 0 6px 22px rgba(0,0,0,.1);
  }
}

/* ── Social proof — pulsation subtile du score ── */
@keyframes ratingPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}
@media (prefers-reduced-motion: no-preference) {
  .social-proof .rating {
    display: inline-block;
    animation: ratingPulse 2.6s ease-in-out infinite alternate;
  }
}

/* ── CTA phone hover ── */
@media (prefers-reduced-motion: no-preference) {
  .cta-phone { transition: color .2s, transform .22s ease; }
  .cta-phone:hover { transform: scale(1.04); }
}

/* ── OTA links hover lift ── */
@media (prefers-reduced-motion: no-preference) {
  .ota-list a { transition: background .2s, transform .2s ease, box-shadow .2s ease; }
  .ota-list a:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
}

/* ── Focus visible élégant ── */
:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Kill switch accessibilité (WCAG prefers-reduced-motion) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .fade-in { opacity: 1 !important; transform: none !important; }
}
