/* YCM Cookies – bandeau de consentement et vidéos au clic. Couleurs : variables globales Divi (repli sur la palette du site). */

.ycm-cookies {
    --ycm-blue: var(--gcid-primary-color, #0b5197);
    --ycm-red: var(--gcid-secondary-color, #df282c);
    --ycm-light: #eef3f8;
    position: relative;
    z-index: 100000;
    font-size: 15px;
    line-height: 1.6;
    color: #252525;
}
.ycm-cookies[hidden], .ycm-cookies [hidden] { display: none !important; }

.ycm-cookies__banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 980px;
    margin: 0 auto;
    padding: 20px 24px;
    background: #ffffff;
    border-top: 5px solid var(--ycm-blue);
    box-shadow: 0 12px 40px rgba(11, 81, 151, .25);
    z-index: 100000;
}
.ycm-cookies__title {
    margin: 0 0 6px;
    padding: 0;
    font-family: 'Big Shoulders', sans-serif;
    font-weight: 800;
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--ycm-blue);
}
.ycm-cookies__text { margin: 0 0 14px; padding: 0; }
.ycm-cookies a { color: var(--ycm-blue); text-decoration: underline; }

.ycm-cookies__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ycm-cookies__btn {
    padding: 10px 22px;
    border: 2px solid transparent;
    border-radius: 0;
    font-family: 'Big Shoulders', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}
/* « Tout refuser » et « Tout accepter » ont le même poids visuel (CNIL). Survol : jamais la couleur du fond (blanc). */
.ycm-cookies__btn--refuse { background: var(--ycm-blue); border-color: var(--ycm-blue); color: #ffffff; }
.ycm-cookies__btn--refuse:hover, .ycm-cookies__btn--refuse:focus-visible { background: var(--ycm-red); border-color: var(--ycm-red); }
.ycm-cookies__btn--accept { background: var(--ycm-red); border-color: var(--ycm-red); color: #ffffff; }
.ycm-cookies__btn--accept:hover, .ycm-cookies__btn--accept:focus-visible { background: var(--ycm-blue); border-color: var(--ycm-blue); }
.ycm-cookies__btn--link { background: transparent; border-color: var(--ycm-blue); color: var(--ycm-blue); }
.ycm-cookies__btn--link:hover, .ycm-cookies__btn--link:focus-visible { background: var(--ycm-light); }
.ycm-cookies__btn:focus-visible, .ycm-cookies__close:focus-visible, .ycm-video__play:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

/* Panneau de personnalisation */
.ycm-cookies__panel {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(7, 58, 107, .6);
    z-index: 100001;
}
.ycm-cookies__panel-inner {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 28px;
    background: #ffffff;
    border-top: 5px solid var(--ycm-red);
}
.ycm-cookies__close {
    position: absolute;
    top: 8px;
    right: 12px;
    padding: 4px 10px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    color: var(--ycm-blue);
    cursor: pointer;
}
.ycm-cookies__list { margin: 16px 0 20px; padding: 0; list-style: none; }
.ycm-cookies__item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #d5e0eb;
}
.ycm-cookies__item-title { margin: 0 0 4px; padding: 0; font-weight: 700; color: var(--ycm-blue); }
.ycm-cookies__item-text { margin: 0; padding: 0; font-size: 14px; }
.ycm-cookies__always { flex: none; font-size: 13px; font-weight: 700; color: #3b6e2a; white-space: nowrap; }

.ycm-cookies__switch { position: relative; flex: none; width: 50px; height: 28px; margin-top: 2px; }
.ycm-cookies__switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.ycm-cookies__slider { position: absolute; inset: 0; background: #b8c6d4; border-radius: 28px; transition: background .2s; }
.ycm-cookies__slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform .2s;
}
.ycm-cookies__switch input:checked + .ycm-cookies__slider { background: var(--ycm-blue); }
.ycm-cookies__switch input:checked + .ycm-cookies__slider::before { transform: translateX(22px); }
.ycm-cookies__switch input:focus-visible + .ycm-cookies__slider { outline: 3px solid #ffbf47; outline-offset: 2px; }

@media (max-width: 640px) {
    .ycm-cookies__banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
    .ycm-cookies__actions { justify-content: stretch; }
    .ycm-cookies__btn { flex: 1 1 100%; }
    .ycm-cookies__panel-inner { padding: 22px 18px; }
}

/* Message à la place du hCaptcha tant qu'il n'est pas autorisé */
.ycm-captcha-notice {
    margin: 0 0 12px;
    padding: 14px 18px;
    border-left: 5px solid var(--gcid-secondary-color, #df282c);
    background: #eef3f8;
}
.ycm-captcha-notice p { margin: 0 0 10px; padding: 0; font-size: 15px; }

/* Vidéo YouTube au clic */
.ycm-video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000000;
}
.ycm-video__poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.ycm-video__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .15);
    cursor: pointer;
    transition: background .2s;
}
.ycm-video__play svg { width: 84px; height: auto; transition: transform .2s; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .4)); }
.ycm-video__play:hover { background: rgba(0, 0, 0, .3); }
.ycm-video__play:hover svg { transform: scale(1.08); }
.ycm-video__notice {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 8px 12px;
    background: rgba(7, 58, 107, .85);
    color: #ffffff;
    font-size: 13px;
    line-height: 1.4;
    pointer-events: auto;
}
.ycm-video__notice a { color: #ffffff; text-decoration: underline; }
.ycm-video--playing iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Formulaire HelloAsso intégré ([ycm_helloasso]) ---------- */
.ycm-embed {
    width: 100%;
}
.ycm-embed iframe {
    display: block;
    width: 100%;
    border: 0;
}
.ycm-embed__placeholder {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 28px;
    background: #fff;
    border-top: 4px solid #df282c;
    text-align: center;
}
.ycm-embed__text {
    margin: 0 0 20px;
    color: #252525;
}
.ycm-embed__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.ycm-embed__link {
    color: #0b5197;
    text-decoration: underline;
}
