/* ===========================
   NOS COURS – FEUILLE DEDIEE
   (complète main.css sans le modifier)
   =========================== */

/* ---- Variables locales (en renfort du thème) ---- */
:root {
  --c-yellow-1: #fff9c4;
  --c-yellow-2: #ffe766;
  --c-green-1: #e3f7db;
  --c-green-2: #66c167;
  --c-blue-1:  #e3f0ff;
  --c-blue-2:  #6aa8ff;
  --c-red-1:   #ffe1e1;
  --c-red-2:   #ff6b6b;
  --c-grey-1:  #eeeeee;
  --c-grey-2:  #bdbdbd;
  --c-pink-1:  #ffe4ff;
  --c-pink-2:  #ff69ff;
  --c-dark-1:  #444444;
  --c-dark-2:  #000000;

  /* si un autre CSS passe après, on garde notre bordure */
  --border:    #e1e4e8;
}
body { --border: #e1e4e8; }

/* ===========================
   HERO (harmonisé avec front-page)
   =========================== */
.hero.cours-hero {
  background: linear-gradient(135deg, #fff, var(--bg-alt));
  padding: clamp(80px, 10vw, 140px) 0 70px;
  text-align: center;
}
.hero.cours-hero .badge {
  border-color: var(--border);
}
.hero.cours-hero .hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin: 0.6em 0 0.3em;
}
.hero.cours-hero .lead {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.08rem;
  color: var(--text-muted);
}

/* ===========================
   GRILLE DES CARTES (on réutilise .grid .grid--3)
   =========================== */
#grids-title + .grid.grid--3 .card {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
  padding: 18px 18px 16px;
}
#grids-title + .grid.grid--3 .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
  border-color: rgba(233,69,96,.35);
}
#grids-title + .grid.grid--3 .card h3 {
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 6px;
}

/* ===========================
   CARTES COURS – base + variantes couleurs
   =========================== */
.course-card {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  display: grid;
  gap: 8px;
  transition: transform .15s ease, box-shadow .2s ease;
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.08);
}
.course-card h3 {
  margin: 0 0 .35rem;
  font-weight: 800;
}

/* bandeau supérieur doux */
.course-card::before {
  content: "";
  display: block;
  height: 10px;
  border-radius: 16px 16px 0 0;
  margin: -20px -20px 12px;
}

/* Variantes */
.course-card--yellow { background: linear-gradient(180deg, var(--c-yellow-1), #fff); }
.course-card--yellow::before { background: linear-gradient(90deg, var(--c-yellow-2), #ffd54f); }

.course-card--green { background: linear-gradient(180deg, var(--c-green-1), #fff); }
.course-card--green::before { background: linear-gradient(90deg, #7fd081, var(--c-green-2)); }

.course-card--blue { background: linear-gradient(180deg, var(--c-blue-1), #fff); }
.course-card--blue::before { background: linear-gradient(90deg, #86b9ff, var(--c-blue-2)); }

.course-card--red { background: linear-gradient(180deg, var(--c-red-1), #fff); }
.course-card--red::before { background: linear-gradient(90deg, #ff8a8a, var(--c-red-2)); }

.course-card--grey { background: linear-gradient(180deg, var(--c-grey-1), #fff); }
.course-card--grey::before { background: linear-gradient(90deg, #cfcfcf, var(--c-grey-2)); }

.course-card--pink { background: linear-gradient(180deg, var(--c-pink-1), #fff); }
.course-card--pink::before { background: linear-gradient(90deg, #ff86ff, var(--c-pink-2)); }

.course-card--dark {
  color: #fff;
  background: linear-gradient(180deg, #505050, var(--c-dark-1));
  border-color: #000;
}
.course-card--dark::before { background: linear-gradient(90deg, #111, var(--c-dark-2)); }
.course-card--dark a { color: #ffd54f; }

/* badges méta */
.course-meta {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}
.course-badge {
  display: inline-block;
  font-weight: 700;
  font-size: .9rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
}
.course-card--yellow .course-badge { background: rgba(255, 215, 80, .22); }
.course-card--green  .course-badge { background: rgba(90, 190, 100, .20); }
.course-card--blue   .course-badge { background: rgba(110, 168, 255, .20); }
.course-card--red    .course-badge { background: rgba(255, 107, 107, .22); }
.course-card--grey   .course-badge { background: rgba(189, 189, 189, .22); }
.course-card--pink   .course-badge { background: rgba(255, 105, 255, .20); }
.course-card--dark   .course-badge { background: rgba(255,255,255,.12); }

/* ===========================
   LISTE HORAires – look « slot »
   =========================== */
.course-schedule {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.course-schedule .slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  position: relative;
}
.course-schedule .day {
  color: #111;
  font-weight: 700;
}
.course-schedule .hour {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: .2px;
  color: var(--accent);
}
.course-schedule .hour::before { /* séparateur visuel fin */
  content: "— ";
  opacity: .6;
  margin-right: .25ch;
}

/* icône calendrier décorative */
.course-schedule .slot::before {
  content: "";
  width: 16px; height: 16px;
  margin-right: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm13 7H4v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V9Zm-3 3v2h-2v-2h2Z'/%3E%3C/svg%3E") no-repeat 50% 50% / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm13 7H4v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V9Zm-3 3v2h-2v-2h2Z'/%3E%3C/svg%3E") no-repeat 50% 50% / 100% 100%;
  opacity: .7;
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
}
.course-schedule .slot { padding-left: 34px; }

/* variantes slots par couleur */
.course-card--yellow .slot { background: rgba(255, 215, 80, .18); }
.course-card--green  .slot { background: rgba(90, 190, 100, .16); }
.course-card--blue   .slot { background: rgba(110, 168, 255, .16); }
.course-card--red    .slot { background: rgba(255, 107, 107, .16); }
.course-card--grey   .slot { background: rgba(189, 189, 189, .18); }
.course-card--pink   .slot { background: rgba(255, 105, 255, .16); }
.course-card--dark   .slot { background: rgba(255,255,255,.12); color:#fff; border-color: rgba(255, 255, 255, 0.557); }
.course-card--dark .day { color:#fff; }
.course-card--dark .hour { color:#ffd54f; }

/* responsive slots */
@media (max-width: 600px) {
  .course-schedule .slot {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}

/* ===========================
   LISTES PILL “carte”
   =========================== */
#grids-title + .grid.grid--3 .u-list.u-list--cards { gap: 10px; }
#grids-title + .grid.grid--3 .u-list.u-list--cards li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fbfbfd;
}
#grids-title + .grid.grid--3 .u-list .dot {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 0;
}

/* ===========================
   Encadré Tarifs (section alt)
   =========================== */
#tarifs .card { text-align: left; }
#tarifs .card .lead { margin: .4rem 0 .2rem; }

/* Badge “target” quand on arrive avec #ancre */
.card.is-target {
  outline: 3px solid rgba(233,69,96,.35);
  box-shadow: 0 0 0 6px rgba(233,69,96,.12), var(--shadow-soft);
}

/* ===========================
   Section “Lieu & accès”
   =========================== */
#access-title + .muted { margin-top: .3rem; }

/* ===========================
   Grille responsive optionnelle
   =========================== */
.course-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 980px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  #grids-title + .grid.grid--3 { gap: 16px; }
}
@media (max-width: 640px) {
  .course-grid { grid-template-columns: 1fr; }
}

/* ===========================
   Accessibilité & Motion-safe
   =========================== */
.course-card:focus-within,
.course-card a:focus-visible,
.course-schedule .slot:focus-visible {
  outline: 3px solid rgba(233,69,96,.45);
  outline-offset: 2px;
  border-radius: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .course-card,
  #grids-title + .grid.grid--3 .card,
  .course-schedule .slot {
    transition: none !important;
  }
}