/* Sandora Experience Manager — front (modale « Choisir ma séance »).
   Style volontairement neutre, surchargeable via CSS custom / Elementor. */

.sem-front-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sem-front-modal[hidden] {
    display: none;
}

.sem-front-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 10, 18, 0.8);
}

.sem-front-modal__box {
    position: relative;
    background: var(--sem-bg-1, #101322);
    color: #fff;
    border-radius: 12px;
    padding: 36px 32px 32px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.sem-front-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: inherit;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}

.sem-front-modal__close:hover {
    opacity: 1;
}

.sem-front-modal__title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

.sem-villes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.sem-ville-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.15s ease, background 0.15s ease;
}

.sem-ville-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
}

.sem-ville-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.sem-ville-card__image--empty {
    background: rgba(255, 255, 255, 0.08);
}

.sem-ville-card__name {
    display: block;
    padding: 10px 12px;
    font-weight: 600;
    text-align: center;
}

/* Bouton du shortcode [sem_villes_modal] */

.sem-villes-modal-button {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 999px;
    background: #e5b94e;
    color: #14172a;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
}

.sem-villes-modal-button:hover {
    filter: brightness(1.08);
    color: #14172a;
}

body.sem-modal-open {
    overflow: hidden;
}

/* Sélecteur d'expérience de la modale générique (accueil / corporate) */
.sem-front-modal__label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #c9a227;
}

.sem-front-modal__select {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    padding: 12px 14px;
    font-size: 16px;
    color: #fff;
    background: rgba(6, 7, 13, 0.55);
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 10px;
}

.sem-front-modal__select:focus {
    outline: 2px solid #c9a227;
    outline-offset: 1px;
}

/* ------------------------------------------------------------------
   Fond vidéo YouTube (hero) : YouTube n'offre plus de paramètre pour
   masquer le bandeau-titre de l'embed (showinfo est mort en 2018, et
   Elementor reconstruit de toute façon sa propre intégration à partir
   du seul ID). On rogne donc le bandeau par un léger sur-zoom de
   l'iframe — uniquement sur les pages du module.
   ------------------------------------------------------------------ */
.sem-page .elementor-background-video-container iframe {
    /* Elementor centre l'iframe via translate(-50%,-50%) — il faut le
       conserver, sinon la vidéo se décale en bas à droite. */
    transform: translate(-50%, -50%) scale(1.25);
}

/* Catalogue des expériences — [sem_experiences] sur l'accueil corporate.
   Gabarit : image de cover en fond, personnage détouré au-dessus, texte en
   bas à gauche sur un dégradé de lisibilité.
   Palette du site : or #C9A227, crème #F3E9D2, nuit #06070D.
   ------------------------------------------------------------------ */
.sem-experiences {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    max-width: 1140px;
    margin: 0 auto;
}

.sem-experience-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 13;
    border-radius: 28px;
    overflow: hidden;
    isolation: isolate;
    text-decoration: none;
    background: #06070D;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease;
}

.sem-experience-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .55);
}

/* --- Fond : image de cover --- */
.sem-experience-card__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sem-experience-card__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}

.sem-experience-card:hover .sem-experience-card__bg {
    transform: scale(1.06);
}

/* Dégradé de lisibilité : sans lui le texte crème passe mal sur une cover claire. */
.sem-experience-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(6, 7, 13, .96) 0%,
        rgba(6, 7, 13, .74) 34%,
        rgba(6, 7, 13, .20) 68%,
        rgba(6, 7, 13, .42) 100%);
}

/* --- Personnage détouré, ancré en bas à droite --- */
/* Le thème et Elementor imposent `img { height: auto }` : sans !important,
   le personnage se déploie à sa taille naturelle (jusqu'à 2560 px de haut)
   et déborde de la carte. */
.sem-experiences .sem-experience-card__figure {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: auto !important;
    height: 88% !important;
    max-height: 88%;
    max-width: 46% !important;
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .55));
    transition: transform .8s cubic-bezier(.22, 1, .36, 1);
}

.sem-experience-card:hover .sem-experience-card__figure {
    transform: translateY(-6px);
}

/* --- Texte --- */
.sem-experience-card__body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
    height: 100%;
    max-width: 64%;
    padding: 30px 32px 32px;
}

/* Sans personnage, le texte reprend toute la largeur. */
.sem-experience-card--nofigure .sem-experience-card__body {
    max-width: 100%;
}

.sem-experience-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sem-experience-card__badge,
.sem-experience-card__count {
    font-size: 11px;
    line-height: 1;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 7px 15px;
    border-radius: 999px;
}

.sem-experience-card__badge {
    border: 1px solid rgba(201, 162, 39, .8);
    color: #E8C963;
}

.sem-experience-card__count {
    border: 1px solid rgba(243, 233, 210, .3);
    color: rgba(243, 233, 210, .78);
}

.sem-experience-card__title {
    font-size: 30px;
    line-height: 1.12;
    font-weight: 700;
    color: #FFF;
}

.sem-experience-card__excerpt {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(243, 233, 210, .82);
}

.sem-experience-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 14px 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, #E0BC4A, #C9A227);
    color: #06070D;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition: background .3s ease, gap .3s ease;
}

.sem-experience-card__cta::after {
    content: "\2192"; /* → */
}

.sem-experience-card:hover .sem-experience-card__cta {
    background: linear-gradient(135deg, #F0D06A, #D8B233);
    gap: 14px;
}

@media (max-width: 1024px) {
    .sem-experience-card__title { font-size: 25px; }
    .sem-experience-card__body  { max-width: 72%; padding: 24px 26px 26px; }
}

@media (max-width: 767px) {
    .sem-experiences { grid-template-columns: 1fr; gap: 22px; }
    .sem-experience-card { aspect-ratio: 4 / 5; }
    /* Encore plus discret : le texte prime sur petit écran. */
    .sem-experiences .sem-experience-card__figure { height: 60% !important; max-width: 56% !important; opacity: .85; }
    .sem-experience-card__body { max-width: 100%; }
    .sem-experience-card__excerpt { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .sem-experience-card,
    .sem-experience-card__bg,
    .sem-experience-card__figure,
    .sem-experience-card__cta { transition: none; }
    .sem-experience-card:hover { transform: none; }
    .sem-experience-card:hover .sem-experience-card__bg,
    .sem-experience-card:hover .sem-experience-card__figure { transform: none; }
}

/* Modale bande-annonce — réutilise la coquille de la modale villes.
   ------------------------------------------------------------------ */
.sem-video-modal__box {
    width: min(1100px, 92vw);
    max-width: none;
    padding: 0;
    background: #000;
    overflow: hidden;
}

.sem-video-modal__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.sem-video-modal__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Le bouton de fermeture doit rester lisible par-dessus la vidéo. */
.sem-video-modal .sem-front-modal__close {
    top: -46px;
    right: 0;
    color: #F3E9D2;
}

@media (max-width: 767px) {
    .sem-video-modal .sem-front-modal__close { top: -40px; }
}
