/* Carrefour Milénis — Template G — WebStudio Caraïbes */
@import "tokens.css";

*, *::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);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-primary);
}
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: .75rem; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.25rem); margin-bottom: .5rem; }
p  { margin-bottom: 1rem; color: var(--color-text); }
a  { color: var(--color-primary); }
a:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; border-radius: 2px; }

/* ── Layout utilities ── */
.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: 1rem; }
.section { padding-block: 3rem; }
.section--alt { background: var(--color-surface); }

/* ── Sticky tel CTA (mobile-first) ── */
.sticky-tel {
  position: fixed;
  bottom: 1rem; right: 1rem;
  z-index: 200;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 50px;
  padding: .75rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  box-shadow: 0 4px 16px rgba(200,16,46,.35);
  transition: transform .15s, background .15s;
}
.sticky-tel:hover { background: #a50d25; transform: scale(1.04); color: #fff; }
.sticky-tel svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Horaires ribbon ── */
.horaires-ribbon {
  background: var(--color-primary);
  color: #fff;
  font-size: .82rem;
  font-family: var(--font-display);
  padding: .45rem 0;
  text-align: center;
  letter-spacing: .02em;
}
.horaires-ribbon strong { color: #FFD700; }

/* ── Header ── */
.site-header {
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0; z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .7rem;
}
.logo-link { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo-link svg { height: 52px; width: auto; }

/* ── Nav ── */
.nav { display: none; }
.nav-list { list-style: none; display: flex; gap: .25rem; }
.nav-list a {
  display: block;
  padding: .45rem .75rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-primary);
  transition: background .15s, color .15s;
}
.nav-list a:hover, .nav-list a.active {
  background: var(--color-primary);
  color: #fff;
}
.header-tel {
  display: none;
  align-items: center;
  gap: .4rem;
  background: var(--color-secondary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  padding: .5rem 1rem;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.header-tel:hover { background: #a50d25; color: #fff; }

/* Hamburger */
.burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  border-radius: var(--radius);
}
.burger span { display: block; width: 24px; height: 2px; background: var(--color-primary); border-radius: 2px; }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--color-primary);
  padding: 1rem;
  gap: .25rem;
}
.mobile-nav.open { display: flex; }
/* smooth slide override applied below in prefers-reduced-motion block */
.mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  transition: background .15s;
}
.mobile-nav a:hover { background: rgba(255,255,255,.15); }

@media (min-width: 768px) {
  .nav { display: block; }
  .header-tel { display: flex; }
  .burger { display: none; }
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #254f9a 100%);
  color: #fff;
  padding-block: clamp(2.5rem, 8vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; max-width: 680px; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 5vw, 2.8rem); margin-bottom: 1rem; }
.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.9);
  margin-bottom: 1.5rem;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.75rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: .82rem;
  font-family: var(--font-display);
  font-weight: 600;
  padding: .35rem .75rem;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}
.badge--red { background: var(--color-secondary); border-color: var(--color-secondary); }
.badge--green { background: var(--color-accent); border-color: var(--color-accent); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .75rem 1.5rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.btn--primary { background: var(--color-secondary); color: #fff; }
.btn--outline { background: transparent; border: 2px solid rgba(255,255,255,.6); color: #fff; }
.btn--accent { background: var(--color-accent); color: #fff; }

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (min-width: 540px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 540px) { .card-grid--4 { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.1); }
.card-icon {
  width: 48px; height: 48px;
  background: var(--color-primary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  color: #fff;
  font-size: 1.4rem;
}
.card-icon--red { background: var(--color-secondary); }
.card-icon--green { background: var(--color-accent); }
.card h3 { color: var(--color-primary); margin-bottom: .5rem; }
.card ul { list-style: none; padding: 0; }
.card ul li {
  padding: .2rem 0;
  padding-left: 1.1rem;
  position: relative;
  font-size: .92rem;
  color: var(--color-text-light);
}
.card ul li::before { content: '✓'; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }

/* ── Horaires table ── */
.horaires-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.horaires-table th,
.horaires-table td {
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.horaires-table th { background: var(--color-primary); color: #fff; font-family: var(--font-display); }
.horaires-table tr:last-child td { border-bottom: none; }
.horaires-table tr:nth-child(even) td { background: var(--color-surface); }
.badge-ouvert { background: var(--color-accent); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 50px; margin-left: .5rem; }

/* ── FAQ ── */
.faq-list { margin-top: 1.5rem; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1rem 1.25rem;
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: background .15s;
}
.faq-question:hover { background: var(--color-surface); }
.faq-question[aria-expanded="true"] { background: var(--color-primary); color: #fff; }
.faq-question[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); filter: invert(1); }
.faq-chevron { width: 18px; height: 18px; flex-shrink: 0; transition: transform .2s; }
.faq-answer {
  display: none;
  padding: 1rem 1.25rem;
  font-size: .95rem;
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}
.faq-answer.open { display: block; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: .75rem; }
.contact-row { display: flex; align-items: flex-start; gap: .75rem; }
.contact-row svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--color-primary); margin-top: .1rem; }
.contact-row a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.contact-row a:hover { text-decoration: underline; }
.map-wrapper { border-radius: var(--radius); overflow: hidden; border: 2px solid var(--color-border); }
.map-wrapper iframe { display: block; width: 100%; height: 280px; border: none; }

/* ── Form ── */
.contact-form { display: flex; flex-direction: column; gap: .75rem; }
.form-group { display: flex; flex-direction: column; gap: .3rem; }
.form-group label { font-size: .88rem; font-weight: 600; color: var(--color-text); }
.form-group input,
.form-group textarea,
.form-group select {
  padding: .65rem .9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color .15s;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,58,107,.15);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-rgpd { font-size: .78rem; color: var(--color-text-light); margin-top: .25rem; }

/* ── Galerie services ── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (min-width: 600px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.service-icon { font-size: 1.6rem; flex-shrink: 0; }
.service-text h3 { font-size: 1rem; margin-bottom: .25rem; }
.service-text p { font-size: .88rem; color: var(--color-text-light); margin: 0; }

/* ── Bandeau promo créole ── */
.promo-banner {
  background: var(--color-secondary);
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 2rem;
}
.promo-banner .creole { font-size: 1.4rem; font-family: var(--font-display); font-weight: 700; margin-bottom: .25rem; }
.promo-banner .traduction { font-size: .9rem; opacity: .9; }
.promo-banner .bqp { margin-top: .5rem; font-size: .85rem; background: rgba(255,255,255,.15); display: inline-block; padding: .25rem .75rem; border-radius: 50px; }

/* ── Footer ── */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.85);
  padding-block: 2.5rem;
  margin-top: 2rem;
}
.footer-inner {
  display: grid;
  gap: 2rem;
}
@media (min-width: 640px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { display: flex; flex-direction: column; gap: .5rem; }
.footer-brand svg { height: 40px; width: auto; }
.footer-brand svg text { fill: #fff; }
.footer-tagline { font-size: .88rem; opacity: .8; }
.footer-section h4 { color: #fff; font-size: .95rem; margin-bottom: .75rem; }
.footer-section ul { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.footer-section ul li a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .88rem; }
.footer-section ul li a:hover { color: #fff; }
.footer-section p { font-size: .88rem; opacity: .8; margin: 0; }
.footer-tel { color: #FFD700; font-weight: 700; font-family: var(--font-display); text-decoration: none; font-size: 1rem; }
.footer-tel:hover { color: #fff; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8rem;
  opacity: .7;
}
.footer-bottom a { color: inherit; }

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 1rem;
  z-index: 300;
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .85rem;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; flex: 1; min-width: 200px; }
.cookie-btn {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  white-space: nowrap;
}

/* ── Breadcrumb ── */
.breadcrumb {
  padding: .6rem 0;
  font-size: .82rem;
  color: var(--color-text-light);
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { opacity: .5; }

/* ── Section header ── */
.section-header { margin-bottom: 1.5rem; }
.section-header p { color: var(--color-text-light); font-size: 1.05rem; max-width: 640px; }
.section-divider { width: 48px; height: 4px; background: var(--color-secondary); border-radius: 2px; margin-block: .75rem; }

/* ── Mentions ── */
.mentions-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: .88rem;
  color: var(--color-text-light);
  line-height: 1.7;
}
.mentions-block h3 { color: var(--color-primary); font-size: 1rem; margin-bottom: .5rem; }

/* ── Access info ── */
.access-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.access-list li { display: flex; gap: .5rem; align-items: flex-start; font-size: .95rem; }
.access-list .from { font-weight: 600; color: var(--color-primary); min-width: 130px; flex-shrink: 0; }

/* Print */
@media print { .sticky-tel, .site-header, .cookie-banner, .burger, .mobile-nav { display: none !important; } }

/* ════════════════════════════════════════════════════════════
   Animations — Template G · Carrefour Milénis
   CSS-first, GPU-friendly, sans librairie externe
   ════════════════════════════════════════════════════════════ */

/* Garde-fou accessibilité (WCAG 2.3.1) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

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

  /* ── 1. Scroll reveal (IntersectionObserver + classes JS) ── */
  .will-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
  }
  .will-reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  /* Section-divider : s'étend quand la section parente est révélée */
  .section-divider {
    width: 0;
    transition: width .5s ease .4s;
  }
  .is-visible .section-divider {
    width: 48px;
  }

  /* ── 2. Sticky CTA tel — pulse rouge (5 cycles × 1.5 s) ── */
  @keyframes tel-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(200,16,46,.35); }
    50%       { box-shadow: 0 4px 16px rgba(200,16,46,.35),
                            0 0 0 10px rgba(200,16,46,.13); }
  }
  .sticky-tel {
    animation: tel-pulse 1.5s ease-in-out 5;
  }

  /* ── 3. Mobile nav — slide-down cubic-bezier ── */
  .mobile-nav {
    display: flex !important;
    overflow: hidden;
    max-height: 0;
    padding-block: 0;
    transition: max-height .35s cubic-bezier(.4,0,.2,1),
                padding-block .35s cubic-bezier(.4,0,.2,1);
  }
  .mobile-nav.open {
    max-height: 22rem;
    padding-block: 1rem;
  }

  /* ── 4. Card hover — élévation + bordure primaire ── */
  .card {
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  }
  .card:hover {
    border-color: rgba(26,58,107,.35);
  }

  /* ── 5. Service-item hover ── */
  .service-item {
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,.09);
  }

  /* ── 6. Focus ring animé (offset glissant) ── */
  a:focus-visible,
  button:focus-visible,
  .btn:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
    transition: outline-offset .15s ease;
  }
  a:focus-visible:active,
  button:focus-visible:active {
    outline-offset: 1px;
  }

}
