:root{
  --bg: #f7f9ff;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #242526fd;
  --border: rgba(15,23,42,.12);

  --accent: #e13838; /* rouge judo */

  --radius: 16px;
  --shadow: 0 10px 26px rgba(15,23,42,.10);
  --shadow2: 0 6px 14px rgba(15,23,42,.08);

  --max: 1100px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* =========================
   BASE
   ========================= */
*{ box-sizing: border-box; }
html,body{ height: 100%; }

body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  background-color: #f7f9ffc0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cg transform='rotate(45 160 160)'%3E%3Crect x='-160' y='0' width='320' height='160' fill='none' stroke='rgba(30,64,175,0.08)' stroke-width='2'/%3E%3Crect x='0' y='160' width='320' height='160' fill='none' stroke='rgba(30,64,175,0.08)' stroke-width='2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

img{ max-width: 100%; height: auto; display: block; }

a{ color: inherit; }
.container{ width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

/* Skip link */
.skip{ position:absolute; left:-999px; }
.skip:focus{
  left: 1rem; top: 1rem;
  padding: .6rem 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow2);
  z-index: 99999;
}

/* =========================
   HEADER
   ========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: .85rem 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  text-decoration:none;
}

.brand__logo{
  width: 100px;
  height: 100px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.brand__text{
  display:flex;
  flex-direction:column;
  line-height:1.15;
}

.brand__text span{
  color: var(--muted);
  font-size: .92rem;
}

.nav{
  display:flex;
  align-items:center;
  gap:.9rem;
  flex-wrap:wrap;
}

.nav a{
  text-decoration:none;
  color: var(--muted);
  font-weight: 700;
  padding: .35rem .45rem;
  border-radius: 10px;
}

/* ✅ Contact doit être blanc */
.nav a.btn,
.nav a.btn:visited{
  color:#fff !important;
}

.nav a:hover{
  color: var(--text);
  background: rgba(255,255,255,.04);
}

/* =========================
   BUTTONS
   ========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: .85rem 1.05rem;
  border-radius: 14px;
  font-weight: 900;
  text-decoration:none;
  color: #fff;
  background: var(--accent);
  border: 1px solid rgba(30,64,175,.35);
  box-shadow: 0 10px 18px rgba(30,64,175,.16);
  cursor: pointer;
}

.btn--small{
  padding: .55rem .75rem;
  border-radius: 12px;
  font-weight: 900;
}

.btn--ghost{
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow2);
}

/* =========================
   SECTIONS / CARDS
   ========================= */
.section{ padding: 2.2rem 0; background: transparent; }
.section h2{ margin: 0 0 1rem; font-size: 1.8rem; }
.muted{ color: var(--muted); }

.card,
.hero__card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.grid-2{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* =========================
   HERO
   ========================= */
.hero{ padding: 3rem 0 2rem; }

.hero__grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.2rem;
  align-items: start;
}

.hero h1{
  margin: .2rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
}

.accent{ color: var(--accent); }
.lead{ color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

.hero__cta{
  display:flex;
  gap:.8rem;
  flex-wrap:wrap;
  margin: 1.1rem 0;
}

.quick{ margin:0; padding-left: 1.1rem; color: var(--muted); }

/* =========================
   BADGES
   ========================= */
.badge{
  display:inline-block;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,.03);
  font-size: .85rem;
}

/* =========================
   INFOS RAPIDES
   ========================= */
.infos__title{
  margin: 0 0 .9rem;
  font-size: 1.35rem;
}

.infos__grid{
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.infos__grid dt,
.infos__grid dd{
  margin: 0;
  padding: 0;
}

.infos__item{
  background: rgba(255,255,255,.70);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .9rem;
  box-shadow: var(--shadow2);
}

.infos__label{
  margin: 0 0 .25rem;
  font-size: .92rem;
  font-weight: 800;
  color: var(--muted);
  opacity: .85;
}

.infos__value{
  margin: 0;
  font-weight: 900;
  color: var(--text);
  line-height: 1.15;
}

.infos__badges{
  margin-top: .9rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* =========================
   TABLE (Horaires) - DESKTOP
   ========================= */
.table-wrap{
  margin-top: 1rem;
  margin: 1rem auto 0;
  padding: 0;
  width: 100%;
  overflow:auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
}

.table{
  width:100%;
  border-collapse: collapse;
  min-width: 720px;
}

.table th{
  padding: .85rem .9rem;
  color: var(--muted);
  background: rgba(15,23,42,.03);
  border-bottom: 1px solid var(--border);
}

.table td{
  padding: .85rem .9rem;
  border-bottom: 1px solid rgba(15,23,42,.06);
}

/* Répartition colonnes */
#horaires .table th:nth-child(1),
#horaires .table td:nth-child(1){ width: 40%; }

#horaires .table th:nth-child(2),
#horaires .table td:nth-child(2){ width: 20%; text-align:center; }

#horaires .table th:nth-child(3),
#horaires .table td:nth-child(3){ width: 20%; text-align:center; }

#horaires .table th:nth-child(4),
#horaires .table td:nth-child(4){ width: 20%; text-align:center; }

#horaires .table{ table-layout: fixed; }

/* =========================
   ACCORDEON TABLE (desktop)
   ========================= */
.row-toggle{
  cursor: pointer;
  user-select: none;
  transition: background .18s ease;
}

.row-toggle:hover td{
  background: rgba(30,64,175,.045);
}

.row-toggle:focus{ outline: none; }
.row-toggle:focus-visible{
  outline: 2px solid rgba(30,64,175,.28);
  outline-offset: 4px;
  border-radius: 12px;
}

.group-title{
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
}

.chevron{
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform .22s ease;
  flex: 0 0 auto;
}

.row-toggle.is-open .chevron{
  transform: rotate(-135deg);
}

/* détails : cachés */
.row-details{ display:none; }

.row-details td{
  padding: 0;
  background: rgba(30,64,175,.03);
  border-bottom: 0;
}

.row-toggle.is-open td{
  border-bottom: 0;
}

.details-inner{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .28s ease, opacity .22s ease, transform .22s ease;
}

.details-box{
  margin: .75rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(30,64,175,.16);
  background: rgba(255,255,255,.75);
  box-shadow: var(--shadow2);
  border-left: 4px solid var(--accent);
}

.row-details.is-open{
  display: table-row;
}

.row-details.is-open .details-inner{
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   ✅ HORAIRES EN CARTES (MOBILE)
   ========================= */
.schedule-cards{
  display: none; /* visible sur mobile via media query */
}

.schedule-card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding: 1rem;
  margin: 0 0 1rem;
  cursor: pointer;
  user-select: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.schedule-card:focus{ outline:none; }
.schedule-card:focus-visible{
  outline: 2px solid rgba(30,64,175,.28);
  outline-offset: 4px;
}

.schedule-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15,23,42,.10);
}

.schedule-card__head{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}

.schedule-card__head h3{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 900;
}

.schedule-card__meta{
  margin: 0;
  display:grid;
  gap: .55rem;
}

.schedule-card__meta > div{
  display:grid;
  grid-template-columns: 92px 1fr;
  gap: .75rem;
  align-items: baseline;
}

.schedule-card__meta dt{
  font-weight: 800;
  color: var(--muted);
  opacity: .85;
}

.schedule-card__meta dd{
  margin: 0;
  font-weight: 700;
}

.schedule-card__details{
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px dashed rgba(15,23,42,.14);
  color: var(--muted);
}

.schedule-card.is-open .chevron{
  transform: rotate(-135deg);
}

/* =========================
   PRICING
   ========================= */
.pricing{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.price__value{
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.05;
  overflow-wrap: anywhere; /* ✅ évite les débordements */
  word-break: break-word;
}

.callout{
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(30,64,175,.16);
  background: rgba(30,64,175,.06);
}

/* =========================
   MAP
   ========================= */
.map-placeholder{
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow2);
  background: #fff;
}

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

/* =========================
   SOCIAL (Suivez-nous)
   ========================= */
.social__links{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
  margin-top: .75rem;
}

.social__btn{
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.75);
  box-shadow: var(--shadow2);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.social__btn img{
  flex: 0 0 auto;
}

.social__btn span{
  font-weight: 900;
}

.social__btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
}

.social__btn:focus{
  outline: none;
}

.social__btn:focus-visible{
  outline: 2px solid rgba(30,64,175,.28);
  outline-offset: 4px;
  border-radius: 14px;
}

.social__hint{
  margin: .9rem 0 0;
}

/* Mobile: boutons en colonne */
@media (max-width: 520px){
  .social__links{
    grid-template-columns: 1fr;
  }
}

/* =========================
   TRUST (logos)
   ========================= */
.trust{
  text-align: center;
  position: relative;
}

.trust::before{
  content:"";
  position:absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,64,175,.06), rgba(30,64,175,0));
  pointer-events:none;
  opacity: .65;
}

.trust .container{ position: relative; }

.trust__title{
  margin: 0 0 .6rem;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.trust__underline{
  display:block;
  width: 88px;
  height: 4px;
  margin: .75rem auto 0;
  border-radius: 999px;
  background: rgba(30,64,175,.35);
}

.trust__subtitle{
  margin: 0 auto 1.8rem;
  max-width: 62ch;
  color: var(--muted);
  opacity: .9;
}

.trust__strip{
  display:flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.4rem;
  padding: 1.2rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.65);
  box-shadow: var(--shadow2);
}

.trust__logo{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: .85rem 1rem;
  border-radius: 14px;
  text-decoration:none;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}

.trust__logo img{
  width: auto;
  height: 100px;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(100%) contrast(1.05) brightness(.9);
  opacity: .75;
  transition: filter .25s ease, opacity .25s ease;
}

.trust__logo:hover{
  background: rgba(255,255,255,.9);
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
  transform: translateY(-4px);
}

.trust__logo:hover img{
  filter: grayscale(0%);
  opacity: 1;
}

/* ✅ Filtres villes */
.schedule-filters{
  display:flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: .75rem 0 1rem;
  align-items: center;
}

.filter-btn{
  all: unset;
  cursor: pointer;
  padding: .55rem .9rem;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.75);
  box-shadow: var(--shadow2);
  line-height: 1.1;
}

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

.filter-btn.is-active{
  background: var(--accent);
  border-color: rgba(30,64,175,.35);
  color: #fff;
}

/* ✅ Affichage ville active */
.schedule-set{ display: none; }
.schedule-set.is-active{ display: block; }

/* =========================
   MODAL (Code moral)
   ========================= */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.modal.is-open{
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(5px);
}

.modal__panel{
  position: relative;
  width: min(900px, 95%);
  max-height: 85vh;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
  animation: modalFade .25s ease;
}

@keyframes modalFade{
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal__header{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.85);
}

.modal__title{
  margin: 0;
  font-size: 1.1rem;
}

.modal__close{
  all: unset;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display:grid;
  place-items: center;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow2);
  font-weight: 900;
}

.modal__body{
  overflow-y: auto;
}

.modal__footer{
  padding: .8rem 1rem;
  border-top: 1px solid var(--border);
  display:flex;
  justify-content: flex-end;
  gap: .6rem;
  background: rgba(255,255,255,.85);
}

/* Code moral layout */
.moral-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  padding: 1rem;
}

.moral-item{
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  box-shadow: var(--shadow2);
}

.moral-item h4{
  margin: 0 0 .35rem;
  color: var(--accent);
}

.moral-item p{
  margin: 0;
  color: var(--muted);
  font-style: italic;
}

/* =========================
   MODAL - CARTES LIEUX
   ========================= */
.places-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.place-card{
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  box-shadow: var(--shadow2);
}

.place-card h4{
  margin: 0 0 .5rem;
  color: var(--accent);
  font-weight: 900;
}

.place-line{
  margin: .25rem 0;
  color: var(--muted);
}

.place-card a{
  text-decoration: underline;
  text-underline-offset: .15rem;
}

@media (max-width: 720px){
  .places-grid{
    grid-template-columns: 1fr;
  }
}

/* =========================
   LEGAL / PRIVACY (cards premium)
   ========================= */
.legal-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.legal-card{
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow2);
}

.legal-card h4{
  margin: 0 0 .5rem;
  color: var(--accent);
  font-weight: 900;
}

.legal-card p{
  margin: 0;
  color: var(--muted);
}

.legal-card ul{
  margin: .6rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.legal-note{
  margin-top: .75rem !important;
  font-size: .9rem;
  opacity: .8;
}

.legal-card--muted{
  background: rgba(30,64,175,.06);
  border: 1px solid rgba(30,64,175,.16);
}

@media (max-width: 720px){
  .legal-grid{
    grid-template-columns: 1fr;
  }
}

.tooltip-wrapper {
  position: relative;
  display: inline-block;
  margin-left: 8px;
}

.tooltip-trigger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--accent, #c40000);
}

.tooltip-box {
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: #111;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 10;
}

.tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #111 transparent transparent transparent;
}

/* Hover + Focus (important pour SEO + accessibilité) */
.tooltip-wrapper:hover .tooltip-box,
.tooltip-trigger:focus + .tooltip-box {
  opacity: 1;
  visibility: visible;
}

/* =========================
   CONTACT (fix mobile wrap)
   ========================= */
.contact a{
  overflow-wrap: anywhere;
  word-break: break-word;
  text-underline-offset: .15rem;
}

.contact .sep{ margin: 0 .35rem; color: var(--muted); }
.contact a{ white-space: nowrap; }

/* =========================
   FOOTER
   ========================= */
.footer{
  padding: 1.6rem 0;
  border-top: 1px solid var(--border);
  background: transparent;
}

.footer__grid{
  display:flex;
  justify-content:space-between;
  gap:1rem;
  flex-wrap:wrap;
  color: var(--muted);
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 920px){
  .hero__grid{ grid-template-columns: 1fr; }
  .grid-2, .grid-3, .results{ grid-template-columns: 1fr; }
  .nav{ display:none; }
  .pricing{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px){
  .moral-grid{ grid-template-columns: 1fr; }

  /* ✅ FIX: invalid repeat(1fr) */
  .pricing{ grid-template-columns: 1fr; }

  /* ✅ Tarifs: prix + titres mieux proportionnés en mobile */
  .price__value{
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  /* ✅ Boutons horaires : évite l'effet “bancal” */
  .schedule-filters{
    gap: .55rem;
  }
  .filter-btn{
    padding: .6rem .85rem;
  }
}

@media (max-width: 520px){
  .infos__grid{ grid-template-columns: 1fr; }
  .trust__title{ font-size: 1.75rem; }
  .trust__logo img{ height: 48px; }

  /* ✅ Sur très petit écran: boutons horaires plus “grands” et bien alignés */
  .schedule-filters{
    gap: .5rem;
  }
  .filter-btn{
    font-size: .95rem;
  }
}

/* ✅ Switch mobile : on cache le tableau et on montre les cartes */
@media (max-width: 720px){
  .table-wrap{ display: none; }
  .schedule-cards{ display: block; }
}

/* =========================
   Logos partenaires en couleur sur mobile
   ========================= */
@media (hover: none) {
  .trust__logo img{
    filter: none;
    opacity: 1;
  }
}