/* =========================================================
   VARIABLES GLOBALES & BASE TYPO
   ========================================================= */

:root {
  --bg: #ffffff;
  --text: #333333;
  --muted: #666666;

  --primary: #AD2225; /* rouge logo */
  --accent: #AD2225;

  --container: 1200px;
  --radius: 12px;
  --gap: 1.25rem;

  --card-bg: #f9f9fb;
  --shadow: 0 6px 18px rgba(15,15,15,0.08);

  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

/* =========================================================
   BODY & LAYOUT GLOBAL
   ========================================================= */

/*
  Le header est en position: fixed
  → on réserve sa hauteur pour éviter le recouvrement du contenu
*/
body {
  padding-top: 72px; /* hauteur réelle du header */
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Conteneur central réutilisé partout */
.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem 0;
}

/* =========================================================
   HEADER — FIXED, UNE SEULE LIGNE, TOUJOURS VISIBLE
   ========================================================= */

.site-header {
  position: fixed;      /* solution fiable, cross-browser */
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;        /* toujours au-dessus du contenu */
  background: linear-gradient(90deg, #ab232f 0%, #ab232f 100%);
  color: white;
}

/* On neutralise le padding vertical global du container */
.site-header .container {
  padding: 0.75rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 64px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: white;
  white-space: nowrap;
}

.logo-text {
  font-weight: 700;
  font-size: 1.05rem;
}

/* Navigation desktop */
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}

.nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem;
}

.nav a.cta {
  background: white;
  color: var(--accent);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
}

/* Bouton menu mobile */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 3rem 0;
  color: white;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.15), rgba(0,0,0,0.05)),
    linear-gradient(135deg, #ab232f, #ffffff);
}

/*
  Sécurité stacking context :
  toutes les sections restent sous le header fixed
*/
.hero,
.section {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
}

.hero-text {
  max-width: 56%;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 0.6rem;
}

.hero p {
  margin: 0 0 1rem;
  color: rgba(255,255,255,0.95);
}

.hero-banner {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* =========================================================
   SECTIONS GÉNÉRIQUES
   ========================================================= */

.section {
  padding: 3rem 0;
}

.bg-light {
  background: #fbfbfd;
}

h2 {
  margin: 0 0 1rem;
}

/* =========================================================
   GRILLES & CARTES
   ========================================================= */

.grid {
  display: grid;
  gap: 1rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Bloc "Notre philosophie" */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .about-wrap {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}
.about-photo {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

/* =========================================================
   TARIFS
   ========================================================= */

.pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
}

.price-card {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #eee;
}

.price {
  font-size: 1.6rem;
  color: var(--primary);
}

/* =========================================================
   AVIS / TÉMOIGNAGES
   ========================================================= */

.testimonials {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  border-radius: 8px;
}

.testimonial {
  display: none;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.testimonial.active {
  display: block;
}

.testimonial-controls {
  margin-top: 0.5rem;
}

.testimonial-controls button {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
}

/* =========================================================
   CONTACT
   ========================================================= */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 1.5rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.form-status {
  margin-top: 0.6rem;
  color: green;
}

iframe {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 8px;
}

/* =========================================================
   HORAIRES
   ========================================================= */

table.horaires {
  width: 100%;
  border-collapse: collapse;
}

table.horaires th,
table.horaires td {
  border-bottom: 1px solid #e5e7eb;
  padding: .5rem .75rem;
  text-align: left;
  white-space: nowrap;
}

table.horaires thead th {
  border-bottom: 2px solid #d1d5db;
}

table.horaires th[scope="row"] {
  font-weight: 600;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding: 1rem 0;
  text-align: center;
  background: #f6f7fb;
  color: var(--muted);
}
.footer-seo-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.25;
  font-size: 0.85em;
}

.footer-seo-link:hover {
  opacity: 1;
  text-decoration: underline;
}


/* =========================================================
   BOUTON "RETOUR EN HAUT"
   ========================================================= */

.back-to-top-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  padding: .65rem .8rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  z-index: 1000;
}

.back-to-top-fab.show {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

/* Sécurité ultime : empêche toute duplication visuelle */
.back-to-top-fab + .back-to-top-fab {
  display: none !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .nav {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

/* =========================================================
   ANCRES (HEADER FIXED)
   ========================================================= */

/*
  Permet aux liens #ancre de ne pas passer sous le header
*/
main {
  scroll-margin-top: 90px;
}
