/* =========================================================
   CCF Horaires — Shortcode [ccf_horaires]
   Styles de structure ; les couleurs passent par des Custom
   Properties surchargeables depuis le thème sans !important.
   ========================================================= */

.ccf-horaires-widget {
  --ccf-hor-ete-bg: #fff4e0;
  --ccf-hor-ete-border: #f0d9a8;
  --ccf-hor-ete-text: #92600a;
  --ccf-hor-fetes-bg: #fdf3e8;
  --ccf-hor-fetes-border: #f0dcc0;
  --ccf-hor-fetes-text: #a8790a;
  --ccf-hor-fermeture-bg: #fdecea;
  --ccf-hor-fermeture-border: #f3c6c1;
  --ccf-hor-fermeture-text: #b71c1c;
  --ccf-hor-text-muted: #7a7066;
  --ccf-hor-radius: 8px;

  font-family: inherit;
  margin-bottom: 1rem;
}

/* [ccf_horaires align="center"] : centre le texte et les pastilles/listes.
   L'accordéon "avenir" garde son alignement interne (résumé en flex avec
   sa propre logique de justification), seul son positionnement suit le
   centrage du parent. */
.ccf-horaires-widget--center {
  text-align: center;
}
.ccf-horaires-widget--center .ccf-horaires-avenir summary {
  justify-content: center;
}
/* Listes tapées dans le champ note (WYSIWYG ACF) : pas de notre classe
   .ccf-horaires-liste, donc puces + indentation par défaut du navigateur —
   à retirer uniquement en mode centré, où elles dénotent. */
.ccf-horaires-widget--center .ccf-horaires-note ul,
.ccf-horaires-widget--center .ccf-horaires-note ol {
  list-style: none;
  padding: 0;
}

/* ── Badge régime spécial ─────────────────────────────── */
.ccf-horaires-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  font-size: 0.95em;
  line-height: 1.3;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  margin: 0 0 0.85em;
}
.ccf-horaires-badge--ete {
  background: var(--ccf-hor-ete-bg);
  color: var(--ccf-hor-ete-text);
  border: 1px solid var(--ccf-hor-ete-border);
}
.ccf-horaires-badge--fetes {
  background: var(--ccf-hor-fetes-bg);
  color: var(--ccf-hor-fetes-text);
  border: 1px solid var(--ccf-hor-fetes-border);
}
.ccf-horaires-badge--fermeture {
  background: var(--ccf-hor-fermeture-bg);
  color: var(--ccf-hor-fermeture-text);
  border: 1px solid var(--ccf-hor-fermeture-border);
}
.ccf-horaires-badge__periode {
  font-weight: 400;
  opacity: 0.85;
}

/* ── Liste des jours/heures ───────────────────────────── */
.ccf-horaires-liste {
  list-style: none;
  margin: 0 0 0.5em;
  padding: 0;
}
.ccf-horaires-liste li {
  padding: 0.15em 0;
  line-height: 1.65;
}
.ccf-horaires-liste li.ccf-horaires-ferme {
  color: var(--ccf-hor-text-muted);
}

/* ── Note personnalisée (été/fêtes) ───────────────────── */
.ccf-horaires-note {
  font-size: 0.92em;
  color: var(--ccf-hor-text-muted);
  margin: 0.6em 0 0;
}
.ccf-horaires-note p:first-child {
  margin-top: 0;
}
.ccf-horaires-note p:last-child {
  margin-bottom: 0;
}
/* Le thème réinitialise souvent les liens/le gras (color: inherit, font-weight:
   inherit) sur le texte courant : on les rend explicitement visibles ici plutôt
   que de dépendre de l'héritage. */
.ccf-horaires-note strong,
.ccf-horaires-note b {
  font-weight: 700;
  color: inherit;
}
.ccf-horaires-note a {
  color: var(--ccf-hor-fetes-text);
  text-decoration: underline;
}
.ccf-horaires-note a:hover {
  text-decoration: none;
}

/* ── Aperçu du nouvel horaire (à venir) ───────────────── */
.ccf-horaires-avenir {
  margin-top: 1.1em;
  border: 1px solid var(--ccf-hor-fetes-border);
  border-radius: var(--ccf-hor-radius);
  padding: 0.7em 1em;
  background: var(--ccf-hor-fetes-bg);
}
.ccf-horaires-avenir summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  color: var(--ccf-hor-fetes-text);
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6em 1em;
}
.ccf-horaires-avenir summary::-webkit-details-marker {
  display: none;
}
.ccf-horaires-avenir__texte {
  flex: 1 1 auto;
}
/* Bouton "Voir le détail" : rend l'accordéon explicitement actionnable, pas
   juste une flèche discrète. */
.ccf-horaires-avenir__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  flex-shrink: 0;
  font-weight: 600;
  font-size: 0.85em;
  padding: 0.35em 0.8em;
  border-radius: 999px;
  background: var(--ccf-hor-fetes-text);
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}
.ccf-horaires-avenir summary:hover .ccf-horaires-avenir__toggle {
  opacity: 0.85;
}
.ccf-horaires-avenir__arrow {
  display: inline-block;
  font-size: 1.1em;
  line-height: 1;
  transition: transform 0.18s ease;
}
.ccf-horaires-avenir[open] .ccf-horaires-avenir__arrow {
  transform: rotate(180deg);
}
.ccf-horaires-avenir__contenu {
  margin-top: 0.85em;
  padding-top: 0.75em;
  border-top: 1px solid var(--ccf-hor-fetes-border);
}
.ccf-horaires-avenir__contenu .ccf-horaires-liste {
  margin-bottom: 0;
}

/* ── [ccf_horaires_jour] — ligne compacte (ex : sous le menu principal) ── */
.ccf-header-horaires-jour {
  margin-top: 1rem;
  text-align: center;
  padding: 0.35rem 0;
}
.ccf-horaires-jour {
  --ccf-hor-jour-ouvert: #666;
  --ccf-hor-jour-attention: #b7791c;
  --ccf-hor-jour-ferme: #666;
  --ccf-hor-jour-dot-ouvert: #8fbf8f;
  --ccf-hor-jour-dot-attention: #e0b978;
  --ccf-hor-jour-dot-ferme: #e0a19c;
  --ccf-hor-jour-bg: #eeece7;

  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85em;
  line-height: 1.3;
  font-family: inherit;
  /* Même géométrie de pastille que .ccf-horaires-badge, en gris neutre */
  padding: 0.35em 0.9em;
  border-radius: 999px;
  background: var(--ccf-hor-jour-bg);
}
.ccf-horaires-jour__dot {
  font-size: 0.7em;
  color: currentColor;
}
.ccf-horaires-jour--ouvert {
  color: var(--ccf-hor-jour-ouvert);
}
.ccf-horaires-jour--ouvert .ccf-horaires-jour__dot {
  color: var(--ccf-hor-jour-dot-ouvert);
}
.ccf-horaires-jour--attention {
  color: var(--ccf-hor-jour-attention);
}
.ccf-horaires-jour--attention .ccf-horaires-jour__dot {
  color: var(--ccf-hor-jour-dot-attention);
}
.ccf-horaires-jour--ferme {
  color: var(--ccf-hor-jour-ferme);
}
.ccf-horaires-jour--ferme .ccf-horaires-jour__dot {
  color: var(--ccf-hor-jour-dot-ferme);
}

/* En mobile, le menu principal se replie (voir .site-navigation dans le
   thème) et .ccf-header-horaires-jour se retrouve juste sous le logo/bouton
   hamburger : on lui laisse plus d'air. Breakpoint aligné sur celui du
   thème (_header.scss, collapse du menu à 991.98px). */
@media (max-width: 991.98px) {
  .ccf-header-horaires-jour {
    margin-top: 3.5rem;
  }
}
