/* =================================================================
   EACB — Pages intérieures (inscription, interclub, à propos, contact)
   Complète eacb-home.css : les pages réutilisent ses classes .eh-
   (titres, boutons, sections, terrain, panneau d'infos, photos).
   Ici : uniquement ce qui est propre aux pages intérieures (.ep-).
   ================================================================= */

/* ---------- Bandeau de titre ---------- */
.ep-hero {
    position: relative;
    padding: 2.5rem 0 5rem;
    color: #fff;
    background-color: var(--eh-navy);
    background-image:
        linear-gradient(180deg, rgba(10, 42, 66, .7) 0%, rgba(10, 42, 66, .88) 100%),
        var(--eh-hero-img, none);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.ep-hero__flight {
    position: absolute;
    top: 0; right: 0;
    width: 78%;
    height: 100%;
    overflow: visible;
    opacity: .45;
    pointer-events: none;
}

.ep-hero__inner { position: relative; z-index: 1; }

.ep-crumb {
    display: flex; flex-wrap: wrap; gap: .5rem;
    font-size: .9375rem; color: #C9DCEA;
    margin-bottom: 1.25rem;
}
.ep-crumb a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ep-crumb a:hover { color: var(--eh-yellow); }

.eacb-page .ep-hero__title {
    font-family: var(--eh-display);
    font-weight: 900;
    font-size: clamp(3.2rem, 16vw, 6.5rem);
    line-height: .88;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    overflow-wrap: anywhere;
}

@media (min-width: 992px) {
    .ep-hero { padding: 4rem 0 6.5rem; }
    .ep-hero__flight { width: 46%; opacity: .8; }
}

/* le panneau d'infos chevauche le bandeau, sans le fond bleu de l'accueil */
.eacb-page .eh-board { background: none; }
/* sans panneau, la première section colle au bandeau normalement */

/* ---------- Titres secondaires / texte ---------- */
.eacb-page .ep-h3 {
    font-family: var(--eh-display);
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--eh-ink);
    margin: 2.5rem 0 1rem;
}

.eacb-page .ep-lead { font-size: 1.0625rem; max-width: 40rem; }

.eacb-page .eh-prose ul,
.eacb-page .eh-prose ol { padding-left: 1.2rem; margin: 0 0 1rem; }
.eacb-page .eh-prose li { margin-bottom: .35rem; }
.eacb-page .eh-prose a { color: var(--eh-blue); font-weight: 600; }

/* ---------- Cartes (cotisations) ---------- */
.ep-card {
    background: #fff;
    border: 2px solid var(--eh-ink);
    border-top: 8px solid var(--eh-yellow);
    border-radius: 4px;
    padding: 1.5rem 1.25rem 1.75rem;
}

.eacb-page .ep-card__title {
    font-family: var(--eh-display);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1;
    color: var(--eh-ink);
    margin: 0 0 1rem;
}

.ep-card--dark { background: var(--eh-navy); border-color: var(--eh-navy); border-top-color: var(--eh-yellow); color: #fff; }
.eacb-page .ep-card--dark .ep-card__title { color: #fff; }
.eacb-page .ep-card--dark .eh-prose a { color: var(--eh-yellow); }
.ep-card--dark strong { color: var(--eh-yellow); }

@media (min-width: 768px) {
    .ep-card { padding: 2rem 2rem 2.25rem; }
}

.ep-poster { max-width: 100%; height: auto; border-radius: 4px; box-shadow: 14px 14px 0 var(--eh-blue); }

/* ---------- Chiffres clés : tuiles de tableau de score ---------- */
.eacb-page .ep-stats-sec { padding: 3.5rem 0; }

.ep-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1rem;
    margin: 0;
}

.ep-stat { display: grid; gap: .6rem; justify-items: center; text-align: center; }

.ep-stat__num {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 5.5rem;
    padding: .1em .3em;
    font-family: var(--eh-display);
    font-weight: 900;
    font-size: clamp(3rem, 13vw, 4.75rem);
    line-height: 1.1;
    color: var(--eh-yellow);
    background: var(--eh-ink);
    border-radius: 8px;
}
.ep-stat__num::after {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    height: 3px;
    background: var(--eh-blue);
    transform: translateY(-50%);
}

.ep-stat__label { font-weight: 600; color: #fff; max-width: 14rem; }

@media (min-width: 992px) {
    .ep-stats { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
}

/* ---------- Terrain en version claire (horaires) ---------- */
.ep-court--light,
.ep-court--light .eh-zone { border-color: var(--eh-blue); }
.eacb-page .ep-court--light .eh-zone__title { color: var(--eh-ink); }
.ep-court--light .eh-court__net {
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 6px),
        var(--eh-blue);
}

/* ---------- Étapes d'inscription ---------- */
.ep-steps { counter-reset: ep-step; list-style: none; margin: 0; padding: 0; }

.ep-steps > li {
    counter-increment: ep-step;
    position: relative;
    padding: 0 0 1.5rem 4rem;
    min-height: 4rem;
}
.ep-steps > li::before {
    content: counter(ep-step);
    position: absolute; left: 0; top: 0;
    display: grid; place-items: center;
    width: 2.75rem; height: 3.25rem;
    font: 900 2.1rem/1 var(--eh-display);
    color: var(--eh-yellow);
    background: var(--eh-ink);
    border-radius: 6px;
}
/* trait qui relie les étapes */
.ep-steps > li:not(:last-child)::after {
    content: "";
    position: absolute; left: calc(1.375rem - 1.5px); top: 3.25rem; bottom: 0;
    width: 3px; background: var(--eh-blue);
}

.eacb-page .ep-steps p { margin: 0 0 .5rem; padding-top: .35rem; }
.ep-steps ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.ep-steps ul li { margin-bottom: .35rem; }

/* ---------- Documents à télécharger ---------- */
.ep-docs { display: grid; grid-template-columns: 1fr; gap: .75rem; margin: 0; }

.eacb-page .ep-doc {
    display: flex; align-items: center; gap: .9rem;
    min-height: 3.75rem; padding: .75rem 1rem;
    background: #fff;
    border: 2px solid var(--eh-ink);
    border-radius: 6px;
    color: var(--eh-ink); font-weight: 700; line-height: 1.25; text-decoration: none;
    transition: background-color .15s, color .15s;
}
.ep-doc i { font-size: 1.35rem; color: var(--eh-blue); transition: color .15s; }
.eacb-page .ep-doc:hover { background: var(--eh-ink); color: #fff; }
.ep-doc:hover i { color: var(--eh-yellow); }

@media (min-width: 576px) { .ep-docs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .ep-docs { grid-template-columns: repeat(3, 1fr); } }

.eacb-page .ep-help { margin: 2.5rem 0 0; padding-top: 1.25rem; border-top: 2px solid #D5DEE6; max-width: 40rem; }
.ep-help a { color: var(--eh-blue); font-weight: 700; overflow-wrap: anywhere; }

/* ---------- HelloAsso ---------- */
/* mobile : le widget prend toute la largeur de l'écran (pas de marges ni de bordures latérales) */
.ha-wrapper {
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5);
    overflow: hidden;
    border-block: 2px solid var(--eh-ink);
}
.ha-iframe {
    display: block;
    width: 1px; min-width: 100%; max-width: 100%;   /* iOS : empêche l'iframe de s'élargir à la taille de son contenu */
    min-height: 1900px;          /* fallback mobile, remplacé par le postMessage */
    border: 0; overflow: hidden;
}
@media (min-width: 768px) {
    .ha-wrapper { margin-inline: 0; border: 2px solid var(--eh-ink); border-radius: 4px; }
    .ha-iframe { min-height: 1600px; }
}
@media (min-width: 992px) { .ha-iframe { min-height: 1000px; } }

/* ---------- Tuiles photo (équipes, gymnases) ---------- */
.ep-tiles { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .ep-tiles { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } }

.ep-tile {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    border-bottom: 5px solid var(--eh-blue);
}

/* photos paysage : cadre 3:2, recadrage centré si le format diffère */
.ep-tile__img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.ep-tile__body {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
    padding: 1.1rem 1.25rem 1.25rem;
}
.ep-tile__body--stack { display: block; }

.eacb-page .ep-tile__title {
    font-family: var(--eh-display);
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--eh-ink);
    margin: 0;
}
.eacb-page .ep-tile__text { margin: .5rem 0 0; font-size: .9375rem; color: var(--eh-muted); }

.ep-tag {
    display: inline-block;
    padding: .3rem .7rem;
    font-weight: 700; font-size: .9375rem; line-height: 1.2;
    color: var(--eh-ink); background: var(--eh-yellow);
    border-radius: 4px;
}

/* ---------- Contact : formulaire Contact Form 7 ---------- */
.ep-form label { display: block; font-weight: 600; margin-bottom: 1rem; }
.ep-form p { margin: 0; }

.ep-form input[type="text"],
.ep-form input[type="email"],
.ep-form input[type="tel"],
.ep-form select,
.ep-form textarea {
    display: block; width: 100%;
    margin-top: .35rem;
    padding: .8rem 1rem;
    font: 400 1rem/1.4 var(--eh-body);
    color: var(--eh-ink);
    background: #fff;
    border: 2px solid #9FB2C2;
    border-radius: 6px;
}
.ep-form textarea { min-height: 9rem; resize: vertical; }
.ep-form input:focus,
.ep-form select:focus,
.ep-form textarea:focus { outline: 0; border-color: var(--eh-blue); box-shadow: 0 0 0 3px rgba(24, 82, 127, .25); }

.ep-form input[type="submit"],
.ep-form button[type="submit"] {
    min-height: 3.25rem; padding: .75rem 1.8rem; margin-top: .5rem;
    font: 700 1rem var(--eh-body);
    color: var(--eh-ink); background: var(--eh-yellow);
    border: 2px solid var(--eh-yellow); border-radius: 6px; cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.ep-form input[type="submit"]:hover,
.ep-form button[type="submit"]:hover { background: var(--eh-ink); border-color: var(--eh-ink); color: #fff; }

.ep-form .wpcf7-not-valid-tip { color: #B3261E; font-weight: 600; font-size: .9375rem; margin-top: .3rem; }
.ep-form .wpcf7-response-output { margin: 1rem 0 0 !important; padding: .9rem 1rem !important; border: 2px solid var(--eh-blue) !important; border-radius: 6px; font-weight: 600; }

/* ---------- Contact : coordonnées ---------- */
.ep-contact {
    background: var(--eh-ink);
    color: #fff;
    border-left: 8px solid var(--eh-yellow);
    border-radius: 4px;
    padding: 1.5rem 1.25rem 1.5rem 1.5rem;
}
.ep-contact + .ep-contact { margin-top: 1.5rem; }

.eacb-page .ep-contact__title {
    font-family: var(--eh-display);
    font-weight: 800;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--eh-yellow);
    margin: 0 0 .5rem;
}
.eacb-page .ep-contact__note { margin: 0 0 .75rem; color: #C9D6E0; font-size: .9375rem; }

.ep-contact__list { margin: 0; }
.ep-contact__list li { display: flex; align-items: baseline; gap: .9rem; padding: .45rem 0; }
.ep-contact__list i { flex: none; width: 1.1rem; text-align: center; color: var(--eh-yellow); }
.ep-contact__list a { color: #fff; text-decoration: none; overflow-wrap: anywhere; }
.ep-contact__list a:hover { color: var(--eh-yellow); text-decoration: underline; }

/* ---------- Contact : plan ---------- */
.ep-map { background: var(--eh-mist); padding-top: 4rem; }
.ep-map iframe {
    display: block; width: 100%; height: 360px; border: 0;
    border-top: 5px solid var(--eh-blue);
    margin-top: 1.25rem;
}
@media (min-width: 992px) { .ep-map iframe { height: 480px; } }

@media (prefers-reduced-motion: reduce) {
    .eacb-page .ep-doc, .ep-doc i, .ep-form input, .ep-form button { transition: none; }
}

/* =================================================================
   GALERIE
   ================================================================= */
/* filtres : défilement horizontal au pouce sur mobile */
.ep-filters {
    display: flex; gap: .5rem;
    overflow-x: auto;
    margin: 0 -.75rem; padding: 4px .75rem .75rem;
    -webkit-overflow-scrolling: touch;
}
.eacb-page .ep-filter {
    flex: none;
    min-height: 2.75rem; padding: .5rem 1.1rem;
    font: 700 .9375rem var(--eh-body);
    color: var(--eh-ink); background: #fff;
    border: 2px solid var(--eh-ink); border-radius: 6px; cursor: pointer;
    transition: background-color .15s, color .15s;
}
.eacb-page .ep-filter:hover { background: var(--eh-mist); }
.eacb-page .ep-filter[aria-pressed="true"] { background: var(--eh-ink); color: var(--eh-yellow); }

.eacb-page .ep-gal__count { margin: .25rem 0 1rem; font-size: .9375rem; color: var(--eh-muted); }

@media (min-width: 768px) {
    .ep-filters { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0 0 .75rem; }
}

.ep-gal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    margin: 0;
}
@media (min-width: 768px) { .ep-gal { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }
@media (min-width: 1200px) { .ep-gal { grid-template-columns: repeat(4, 1fr); } }

.ep-gal__item[hidden] { display: none; }

.ep-gal__link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background: var(--eh-mist);
    cursor: zoom-in;
}
.ep-gal__link img {
    display: block; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.ep-gal__link:hover img { transform: scale(1.05); }
.eacb-page .ep-gal__link:focus-visible { outline: 3px solid var(--eh-blue); outline-offset: 2px; }

/* ----- Visionneuse (dialog natif) ----- */
.ep-lightbox {
    width: 100vw; height: 100dvh; max-width: none; max-height: none;
    margin: 0; padding: 3.75rem .5rem;
    border: 0; background: transparent;
    overflow: hidden;
}
.ep-lightbox[open] { display: grid; place-items: center; }
.ep-lightbox::backdrop { background: rgba(6, 22, 35, .94); }

.ep-lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }

.ep-lightbox__count {
    position: absolute; left: 1rem; top: 1.1rem; margin: 0;
    font: 800 1.25rem/1 var(--eh-display); color: var(--eh-yellow) !important;
}

.ep-lightbox__btn {
    position: absolute;
    display: grid; place-items: center;
    width: 2.75rem; height: 2.75rem; padding: 0 0 .15em;
    font-size: 1.75rem; line-height: 1;
    color: #fff; background: var(--eh-ink);
    border: 2px solid #fff; border-radius: 6px; cursor: pointer;
}
.ep-lightbox__btn:hover { background: var(--eh-yellow); border-color: var(--eh-yellow); color: var(--eh-ink); }
.ep-lightbox__btn:focus-visible { outline: 3px solid var(--eh-yellow); outline-offset: 2px; }
.ep-lightbox__btn--close { top: .5rem; right: .5rem; }
.ep-lightbox__btn--prev  { bottom: .5rem; left: .5rem; }
.ep-lightbox__btn--next  { bottom: .5rem; right: .5rem; }

@media (min-width: 992px) {
    .ep-lightbox { padding: 3rem 5rem; }
    .ep-lightbox__btn--prev, .ep-lightbox__btn--next { top: 50%; bottom: auto; transform: translateY(-50%); }
    .ep-lightbox__btn--prev { left: 1rem; }
    .ep-lightbox__btn--next { right: 1rem; }
    .ep-lightbox__btn--close { top: 1rem; right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ep-gal__link img, .eacb-page .ep-filter { transition: none; }
    .ep-gal__link:hover img { transform: none; }
}
