/* ==========================================================================
   Stage card : badge "X places" (success + warning) prend la couleur du type.
   Le badge "Complet" (badge-danger) reste rouge pour signaler l'indisponibilite.
   Bouton "Ajouter" reprend aussi la couleur du type.
   ========================================================================== */
.stage-card .stage-card-badge.badge-success,
.stage-card .stage-card-badge.badge-warning {
    background-color: var(--card-type-color, #1e4c8a) !important;
    color: #fff !important;
    border: 0 !important;
}
.stage-card .stage-card-actions .btn.btn-primary {
    background-color: var(--card-type-color, #1e4c8a) !important;
    border-color: var(--card-type-color, #1e4c8a) !important;
    color: #fff !important;
}
.stage-card .stage-card-actions .btn.btn-primary:hover {
    filter: brightness(0.88);
    color: #fff !important;
}
.stage-card .stage-card-actions .btn.btn-primary.disabled,
.stage-card .stage-card-actions .btn.btn-primary[disabled] {
    background-color: #adb5bd !important;
    border-color: #adb5bd !important;
    color: #fff !important;
    opacity: 0.7;
}

/* ==========================================================================
   YCMC HEADER - portage du header WordPress
   ========================================================================== */

.ycmc-hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 3vw;
    background: transparent;
}

.ycmc-hd--floating {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    backdrop-filter: blur(10px) brightness(1.3);
    -webkit-backdrop-filter: blur(10px) brightness(1.3);
}

.ycmc-hd__logo img {
    display: block;
    height: 50px;
    width: auto;
    border-radius: 5px;
    box-shadow: 0px 0px 5px #bbbbbb;
}

/* Bloc droite : user + burger */
.ycmc-hd__right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.ycmc-hd__user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e4c8a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 12px;
    background: rgba(255,255,255,0.6);
    border: 1px solid rgba(30, 76, 138, 0.15);
    transition: background 0.2s ease;
}
.ycmc-hd__user:hover {
    background: rgba(255,255,255,0.9);
    color: #1e4c8a;
    text-decoration: none;
}
.ycmc-hd__user-avatar {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e4c8a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.ycmc-hd__user-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #28a745;
    border: 2px solid #fff;
}
.ycmc-hd__user-name { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }

/* Mode admin (non switch) : ROLE_ADMIN visible sur frontend */
.ycmc-hd__user--admin {
    background: rgba(30, 76, 138, 0.08);
    border-color: rgba(30, 76, 138, 0.35);
}
.ycmc-hd__user-badge--admin {
    background: #1e4c8a;
}

/* Mode switch_user : admin impersonne un client */
.ycmc-hd__user--switched {
    background: rgba(232, 73, 15, 0.08);
    border-color: rgba(232, 73, 15, 0.35);
    color: #e8490f;
    position: relative;
    animation: ycmc-switch-pulse 2s ease-in-out infinite;
}
.ycmc-hd__user--switched:hover {
    background: rgba(232, 73, 15, 0.15);
    color: #e8490f;
}
.ycmc-hd__user--switched .ycmc-hd__user-avatar {
    background: #e8490f;
}
.ycmc-hd__user--switched .ycmc-hd__user-dot {
    background: #f8aa00;
}
.ycmc-hd__user-badge {
    display: inline-block;
    background: #e8490f;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
}
.ycmc-hd__switch-exit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #e8490f;
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: 0;
    transition: filter 0.15s ease;
}
.ycmc-hd__switch-exit:hover {
    filter: brightness(0.88);
    color: #fff !important;
    text-decoration: none;
}

.ycmc-hd__admin-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #1e4c8a;
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border: 0;
    transition: filter 0.15s ease;
}
.ycmc-hd__admin-back:hover {
    filter: brightness(0.88);
    color: #fff !important;
    text-decoration: none;
}
@keyframes ycmc-switch-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(232, 73, 15, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(232, 73, 15, 0); }
}

@media screen and (max-width: 767px) {
    .ycmc-hd__user-name { display: none; }
    .ycmc-hd__user { padding: 4px 6px; }
    .ycmc-hd__right { gap: 10px; }
    .ycmc-hd__user-badge { display: none; }
    .ycmc-hd__switch-exit span { display: none; }
    .ycmc-hd__switch-exit { padding: 6px 10px; }
    .ycmc-hd__admin-back span { display: none; }
    .ycmc-hd__admin-back { padding: 6px 10px; }
}

/* Burger */
.ycmc-hd__burger {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.ycmc-hd__burger > * { pointer-events: none; }
.ycmc-hd__burger span {
    display: block;
    width: 45px;
    height: 2px;
    transition: all 0.25s ease;
}
.ycmc-hd__burger span:nth-child(1) { background: #e8490f; }
.ycmc-hd__burger span:nth-child(2) { background: #9dd2c8; width: 60%; }
.ycmc-hd__burger span:nth-child(3) { background: #1e4c8a; }
.ycmc-hd__burger.is-open span:nth-child(1) { transform: translateY(13px) rotate(45deg); background: #fff; }
.ycmc-hd__burger.is-open span:nth-child(2) { opacity: 0; }
.ycmc-hd__burger.is-open span:nth-child(3) { transform: translateY(-14px) rotate(-45deg); background: #fff; }

body.ycmc-hd-locked .ycmc-hd__burger span:nth-child(1),
body.ycmc-hd-locked .ycmc-hd__burger span:nth-child(2),
body.ycmc-hd-locked .ycmc-hd__burger span:nth-child(3) { background: #fff; }

/* Drawer */
body.ycmc-hd-locked { overflow: hidden; }

.ycmc-hd-drawer {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    background: #fff;
}
.ycmc-hd-drawer.is-open { transform: translateX(0); }

.ycmc-hd-drawer__col {
    flex: 1;
    overflow-y: auto;
    padding: 40px 40px 20px;
}

.ycmc-hd-drawer__col--menu {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.ycmc-hd-drawer__col--info {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding-right: 80px;
}

/* Menu (vertically centered) */
.ycmc-hd-menu {
    list-style: none;
    margin: auto 0;
    padding: 0;
    text-align: right;
}
.ycmc-hd-menu li { margin: 0; padding: 0; }
.ycmc-hd-menu > li { padding: 0; border: 0; }
.ycmc-hd-drawer__col--menu .ycmc-hd-menu > li > a {
    display: inline-block;
    padding: 2.5vh 0;
    min-width: 60%;
    text-align: right;
    color: #1e4c8a;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 1.4rem;
    cursor: pointer;
}
.ycmc-hd-menu > li:nth-child(1) > a { border-bottom: 1px solid #1e4c8a; }
.ycmc-hd-menu > li:nth-child(2) > a { border-bottom: 1px solid #9dd2c8; }
.ycmc-hd-menu > li:nth-child(3) > a { border-bottom: 1px solid #f8aa00; }
.ycmc-hd-menu > li:nth-child(4) > a { border-bottom: 1px solid #e8490f; }
.ycmc-hd-menu > li:nth-child(5) > a { border-bottom: 1px solid #af0b57; }
.ycmc-hd-menu > li:nth-child(6) > a { border-bottom: 1px solid #666666; }
.ycmc-hd-menu > li > a:hover { color: #686868; box-shadow: 0px 0px 10px #d5d5d5; }

.ycmc-hd-menu .sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}
.ycmc-hd-menu .menu-item-has-children.is-open > .sub-menu {
    display: block;
    padding: 0;
    margin: 10px 0 0;
}
.ycmc-hd-menu .sub-menu li { padding: 0; }
.ycmc-hd-menu .sub-menu a {
    display: inline-block;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: #1e4c8a;
    text-decoration: none;
    text-transform: uppercase;
    min-width: 60%;
    padding: 0.5vh 1vw;
}
.ycmc-hd-menu .sub-menu a:hover { color: #686868; box-shadow: 0px 0px 10px #d5d5d5; }

/* Drawer right column info */
.ycmc-hd-drawer__info {
    text-align: center;
    max-width: 320px;
}
.ycmc-hd-drawer__info-logo {
    display: block;
    margin: 0 auto 24px;
    max-width: 160px;
    height: auto;
    filter: brightness(0) invert(1);
}
.ycmc-hd-drawer__info-line {
    margin: 10px 0;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: left;
}
.ycmc-hd-drawer__info-line a { color: #fff; text-decoration: none; }
.ycmc-hd-drawer__info-ico svg { width: 22px; height: 22px; display: block; color: #fff; }
.ycmc-hd-drawer__info-addr {
    margin-top: 20px;
    text-align: center;
    color: white !important;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Little menu (boutons colores) */
.little-menu-container {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}
.little-menu-container .resume-cust {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #fff;
    text-decoration: none;
    justify-content: center;
    flex: 1 34%;
    max-width: 350px;
}
.little-menu-container .resume-cust h3 {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}
.account-btn       { background-color: #f8aa00; }
.panier-btn        { background-color: #1e4c8a; }
.reservations-btn  { background-color: #e8490f; }
.pass-btn          { background-color: #9dd2c8; }
.seances-btn       { background-color: #2c6bbf; }
.stagiaires-btn    { background-color: #af0b57; }
.infos-btn         { background-color: #666666; }
.documents-btn     { background-color: #28a745; }
.deconnexion-btn   { background-color: #dc3545; }

/* Icone FontAwesome dans un carre 32x32 (remplacement lord-icon) */
.little-menu-container .resume-cust .lm-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.35rem;
    color: #fff;
    flex: 0 0 32px;
}
.little-menu-desktop .resume-cust .lm-ico { order: 2; }

/* Badge panier (compteur en absolu sur le bouton) */
.little-menu-container .resume-cust.panier-btn { position: relative; }
.panier-count-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e8490f;
    color: #fff;
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    z-index: 2;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Desktop side-menu (right) */
.little-menu-desktop {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 9999;
    width: auto;
    gap: 2px;
    margin: 0;
    align-items: flex-end;
    flex-direction: column;
    flex-wrap: nowrap;
}
.little-menu-desktop .resume-cust {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 56px;
    padding: 12px;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.3s ease;
    gap: 10px;
}
.little-menu-desktop .resume-cust lord-icon {
    flex: 0 0 32px;
    width: 32px !important;
    height: 32px !important;
    order: 2;
}
.little-menu-desktop .resume-cust h3 {
    order: 1;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s ease 0.05s;
    flex: 1;
    text-align: right;
}
.little-menu-desktop .resume-cust:hover { width: 320px; }
.little-menu-desktop .resume-cust:hover h3 { opacity: 1; }

/* Responsive */
@media screen and (min-width: 1025px) {
    .little-menu-mobile { display: none !important; }
}

@media screen and (max-width: 1024px) {
    .little-menu-desktop { display: none !important; }
    .ycmc-hd-drawer { flex-direction: column; }
    .ycmc-hd-drawer__col { padding: 50px 24px 20px; }
    .ycmc-hd-drawer__col--info { display: none; }
    .ycmc-hd-menu { text-align: center; margin: 0 0 20px; width: 80%; }
    .ycmc-hd-drawer__col--menu { display: flex; align-items: center; justify-content: flex-start; }
    .ycmc-hd__burger.is-open span:nth-child(1) { transform: translateY(13px) rotate(45deg); background: #1e4c8a !important; }
    .ycmc-hd__burger.is-open span:nth-child(3) { transform: translateY(-14px) rotate(-45deg); background: #1e4c8a !important; }
    .ycmc-hd-menu > li > a { min-width: 100%; text-align: center; }
}

@media screen and (max-width: 767px) {
    .little-menu-container { flex-direction: column; max-width: 100%; flex-wrap: nowrap; }
    .little-menu-container .resume-cust { max-width: 100%; }
    .ycmc-hd-menu { text-align: center; margin: 10vh 0 20px !important; width: 100%; }
    .ycmc-hd__logo img { height: 35px; }
    .ycmc-hd { padding: 5px 3vw; }
    .ycmc-hd__burger { gap: 10px; }
    .ycmc-hd__burger span { width: 40px; }
    .ycmc-hd__burger.is-open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
}
