/* ===================================================================
   Styles des shortcodes ACF (fichier shortcodes-acf.php)
   =================================================================== */


/* -------------------------------------------------------------------
   [acf_services] — section_3 > services (icone + texte)
   ------------------------------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    background: transparent;
    border: 1px solid #182530;
    border-radius: 8px;
    min-width: 0;          /* autorise la grid-item à rétrécir < contenu */
    box-sizing: border-box;
}


.service-card-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.service-card-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.service-card-text {
    color: #182530;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;  /* coupe les mots trop longs si nécessaire */
    hyphens: auto;
}

/* Tablette : passe en 1 colonne avant que ça ne se serre trop */
@media screen and (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Mobile : padding compact */
@media screen and (max-width: 600px) {
    .service-card {
        padding: 14px 16px;
        gap: 14px;
    }
    .service-card-icon {
        width: 32px;
        height: 32px;
    }
    .service-card-text {
        font-size: .95rem;
    }
}

/* -------------------------------------------------------------------
   [acf_video_accessible] — section_6 > video (url) + texte_accessible
   ------------------------------------------------------------------- */
.video-accessible {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.video-accessible-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.video-accessible-embed iframe,
.video-accessible-embed video,
.video-accessible-embed object,
.video-accessible-embed embed {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    display: block;
}

/* Bouton "Version accessible" */
.video-accessible-toggle {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 4px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #BBFEF1;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.video-accessible-toggle:focus-visible {
    outline: #34B4A3 solid 2px;
    outline-offset: 3px;
    border-radius: 2px;
}
.video-accessible-chevron {
    transition: transform .25s ease;
}
.video-accessible-toggle[aria-expanded="true"] .video-accessible-chevron {
    transform: rotate(180deg);
}

/* Panneau (liste des options) */
.video-accessible-panel[hidden] {
    display: none;
}
.video-accessible-options {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 0 4px;
}
.video-accessible-option {
    display: inline-block;
    padding: 10px 22px;
    background: transparent;
    border: 1px solid #34B4A3;
    border-radius: 999px;
    color: #BBFEF1;
    font-weight: 700;
    font-size: .95rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.video-accessible-option:hover,
.video-accessible-option:focus-visible {
    background: #34B4A3;
    color: #04221D;
    outline: none;
}

/* ----- Modale transcription ----- */
.video-accessible-modal[hidden] {
    display: none;
}
.video-accessible-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.video-accessible-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 34, 29, 0.72);
    backdrop-filter: blur(4px);
}
.video-accessible-modal-dialog {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    background: #04221D;
    border: 1px solid rgba(52, 180, 163, 0.4);
    border-radius: 16px;
    padding: 32px 36px;
    overflow-y: auto;
    color: #BBFEF1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.video-accessible-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(187, 254, 241, 0.3);
    border-radius: 50%;
    color: #BBFEF1;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.video-accessible-modal-close:hover,
.video-accessible-modal-close:focus-visible {
    background: #34B4A3;
    border-color: #34B4A3;
    color: #04221D;
    outline: none;
}
.video-accessible-modal-title {
    margin: 0 50px 20px 0;
    color: #fff;
}
.video-accessible-modal-body {
    line-height: 1.7;
}
.video-accessible-modal-body p {
    margin: 0 0 1em;
}
.video-accessible-modal-body p:last-child {
    margin-bottom: 0;
}
.video-accessible-modal-body em {
    color: #BBFEF1;
    opacity: 0.8;
}

/* Bloque le scroll de la page quand la modale est ouverte */
html.video-modal-open,
body.video-modal-open {
    overflow: hidden !important;
    height: 100%;
    /* Conserve la position de scroll en empêchant le saut visuel */
    touch-action: none;
}

@media screen and (max-width: 600px) {
    .video-accessible-modal {
        padding: 12px;
    }
    .video-accessible-modal-dialog {
        padding: 24px 20px;
        max-height: 90vh;
    }
}


/* -------------------------------------------------------------------
   [acf_bureaux_etude_description] — liste avec icônes check
   ------------------------------------------------------------------- */
.bureaux-etude-list {
    list-style: none;
    padding: 24px 28px;
    margin: 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-weight: 400;
}
.bureaux-etude-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: #BBFEF1;
    line-height: 1.45;
}
.bureaux-etude-icon {
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
    margin-top: 2px;
}
.bureaux-etude-text {
    font-size: 1rem;
    min-width: 0;
}

@media screen and (max-width: 600px) {
    .bureaux-etude-list {
        padding: 20px 22px;
        gap: 14px;
    }
    .bureaux-etude-text {
        font-size: .95rem;
    }
}


/* -------------------------------------------------------------------
   [acf_niveaux_contrats]
   ------------------------------------------------------------------- */
.niveaux-contrat-list {
    list-style: none;
    padding: 24px 28px;
    margin: 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-weight: 400;
}
.niveaux-contrat-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    color: #1E1E1E;
    line-height: 1.45;
}
.niveaux-contrat-icon {
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
    margin-top: 2px;
}
.niveaux-contrat-text {
    font-size: 1rem;
    min-width: 0;
}

@media screen and (max-width: 600px) {
    .niveaux-contrat-list  {
        padding: 20px 22px;
        gap: 14px;
    }
    .niveaux-contrat-text {
        font-size: .95rem;
    }
}

/* -------------------------------------------------------------------
   [acf_contrat_sav]
   ------------------------------------------------------------------- */
.contrat-sav-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.contrat-sav-item {
    width: calc(50% - 8px);
    border: 1px solid #BBFEF1;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    font-weight: 400;
    align-items: center;
}

@media  screen and (max-width: 960px) {
    .contrat-sav-item {
        width: 100%;
    }

}



/* -------------------------------------------------------------------
   [acf_contrat_sav]
   ------------------------------------------------------------------- */
.nature-alarmes-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
}

.nature-alarmes-item {
    width: calc(50% - 8px);
    border: 1px solid #1E1E1E;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    font-weight: 400;
    align-items: center;
    color: #1E1E1E;
}

@media  screen and (max-width: 960px) {
    .nature-alarmes-item {
        width: 100%;
    }

}

/* -------------------------------------------------------------------
   [acf_cas_usage] — cas d'usage des solutions
   ------------------------------------------------------------------- */

.acf-wrapper-usage {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: flex-start;
    gap: 30px;
    .usage-element {
        display: flex;
        gap: 20px;
        width: calc(50% - 15px);
        border-bottom: 1px solid;
        align-items: center;
        padding: 20px 0;
        .titre{
            font-weight: 700;
        }
        p{
            padding: 0;
            font-weight: 400;
        }
    }
    /* Pas de border-bottom sur la dernière ligne :
       - dernier item (toujours sur la dernière ligne)
       - avant-dernier SI total pair (alors lui aussi est sur la dernière ligne) */
    .usage-element:last-child,
    .usage-element:nth-last-child(2):nth-child(even),
    .usage-element:nth-last-child(2):nth-child(odd){
        border-bottom: 0;
    }
}

/* Sur mobile la disposition passe en 1 colonne : on rétablit le border
   sur l'avant-dernier (sauf le tout dernier qui reste sans). */
@media screen and (max-width: 900px) {
    .acf-wrapper-usage .usage-element {
        width: 100%;
    }
    .acf-wrapper-usage .usage-element:nth-last-child(2):nth-child(odd) {
        border-bottom: 1px solid;
    }
    .acf-wrapper-usage .usage-element:last-child {
        border-bottom: 0;
    }
}




/* -------------------------------------------------------------------
   [acf_implantations] — carte avec hotspots + cards
   ------------------------------------------------------------------- */
.implantations-map {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}
.implantations-map-bg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* Marker (bouton +) */
.implantations-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #BBFEF1;
    color: #04221D;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 0 rgba(187, 254, 241, 0.5);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
    z-index: 2;
}
.implantations-marker::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(187, 254, 241, 0.18);
    z-index: -1;
    animation: implantations-pulse 2.4s ease-out infinite;
}
@keyframes implantations-pulse {
    0%   { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}
.implantations-marker:hover,
.implantations-marker:focus-visible,
.implantations-marker[aria-expanded="true"] {
    background: #34B4A3;
    color: #04221D;
    transform: translate(-50%, -50%) scale(1.1);
    outline: none;
    z-index: 3;
}

.implantations-marker-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Card popup */
.implantations-card {
    position: absolute;
    transform: translate(-50%, calc(-100% - 28px));
    background: hsl(170deg 82% 4% / 64%);
    backdrop-filter: blur(15px);
    border-radius: 8px;
    padding: 22px 26px;
    color: #BBFEF1;
    z-index: 4;
    pointer-events: auto;
}
.implantations-card[hidden] {
    display: none;
}
/* Vrai triangle pointant vers le marker ::after = triangle de remplissage) */
.implantations-card::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    transform: translateX(-50%);
    pointer-events: none;
}
.implantations-card::after {
    bottom: -8px;
    border-top: 9px solid rgba(4, 34, 29, 0.92);
}

/* Layout interne : 1 ou plusieurs bureaux côte à côte */
.implantations-card-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    gap: 28px;
}
/* Séparateur vertical entre bureaux (sauf après le dernier) */
.implantations-card-bureau + .implantations-card-bureau {
    position: relative;
    padding-left: 28px;
}
.implantations-card-bureau + .implantations-card-bureau::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #BBFEF1;
}

.implantations-card-title {
    margin: 0 0 10px;
    color: #BBFEF1;

    font-weight: 700;
}
.implantations-card-address {
    font-weight:400;
    margin: 0 0 14px;
    line-height: 1.5;
    color: #BBFEF1;
    font-style: normal;
}
.implantations-card-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #BBFEF1;
    text-decoration: none;
    font-weight: 700;
    transition: color .2s ease;
}
.implantations-card-phone:hover,
.implantations-card-phone:focus-visible {
    color: #34B4A3;
    outline: none;
}

@media screen and (max-width: 700px) {
    .implantations-marker {
        width: 30px;
        height: 30px;
    }
    /* Sur mobile : on stacke les bureaux verticalement */
    .implantations-card-grid {
        grid-auto-flow: row;
        grid-auto-columns: 1fr;
        gap: 18px;
    }
    .implantations-card-bureau + .implantations-card-bureau {
        padding-left: 0;
        padding-top: 18px;
    }
    .implantations-card-bureau + .implantations-card-bureau::before {
        left: 0;
        right: 0;
        top: 0;
        bottom: auto;
        width: auto;
        height: 1px;
    }
    .implantations-card.has-multiple {
        max-width: 280px;
    }
}


@media screen and (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    .service-card {
        padding: 16px 18px;
        gap: 14px;
    }
}

/* nos services cards on page nos services */
.service-card-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.service-card-element {
    width: calc(25% - 15px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px;
    border: 1px solid #BBFEF1;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
}
.service-card-image {
    width: 100%;
    aspect-ratio: 430 / 250;
    object-fit: cover;
    border-radius: 4px;
}
.service-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.service-card-titre {
    color: #BBFEF1;
    margin: 0;
}
.service-card-description {
    color: #F0F0F0;
    margin: 0;
    line-height: 1.5;
}
.service-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
}
.service-card-button {
    width: fit-content;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Hover : reprend l'effet d'expansion du bouton */
.service-card-element:hover .service-card-button {
    padding-right: 2.5em !important;
    padding-left: 1.5em !important;
}
.service-card-element:hover .service-card-button::after {
    opacity: 1;
    margin-left: .3em;
}

.no-service-card {
    color: #BBFEF1;
    font-style: italic;
    text-align: center;
    width: 100%;
}

@media screen and (max-width: 900px) {
    .service-card-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .service-card-element {
        width: calc(80% - 12px);
    }
}

@media screen and (max-width: 600px) {
    .service-card-element {
        width: 100%;
    }
}
