/* Empêche le header sticky de masquer la section "Pôles de mobilité"
   lorsque le menu redirige vers l'ancre #services */
#services {
    scroll-margin-top: 90px;
}

/* ===================== MODALES GENERIQUES ===================== */
/* Utilisé par : menu (Qui sommes-nous / Contact) et footer (Services) */

.site-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(1, 4, 10, 0.75);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.site-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.site-modal {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 860px;
    max-height: 85vh;
    background-color: var(--bg-dark, #01176C);
    background: linear-gradient(135deg, #01176C 0%, #000428 100%);
    border: 1px solid var(--line, rgba(255,255,255,0.09));
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-modal-backdrop.open .site-modal {
    transform: translateY(0) scale(1);
}

/* ----- Image (gauche) ----- */
.site-modal-media {
    flex: 0 0 42%;
    position: relative;
    min-height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #000428;
}

.site-modal-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(1, 4, 10, 0.15) 0%, rgba(1, 4, 10, 0.55) 100%);
}

.site-modal-media .site-modal-icon {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 1;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gv-orange, #F29200);
    color: #000;
    border-radius: 50%;
    font-size: 1.4rem;
}

/* ----- Contenu (droite) ----- */
.site-modal-content {
    flex: 1 1 58%;
    padding: 2.5rem 2.5rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-modal-eyebrow {
    font-family: var(--font-heading, 'Aldrich', sans-serif);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gv-orange, #F29200);
    margin: 0;
}

.site-modal-title {
    font-family: var(--font-heading, 'Aldrich', sans-serif);
    font-size: 1.7rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
}

.site-modal-text {
    font-family: var(--font-body, 'Arial', sans-serif);
    font-size: 0.98rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    white-space: pre-line;
}

.site-modal-extra {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
}

.site-modal-extra li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body, 'Arial', sans-serif);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.site-modal-extra li i {
    color: var(--gv-orange, #F29200);
}

.site-modal-extra li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.site-modal-extra li a:hover {
    color: var(--gv-orange, #F29200);
}

/* ----- Bouton fermer ----- */
.site-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s ease;
}

.site-modal-close:hover {
    background: var(--gv-orange, #F29200);
    color: #000000;
    transform: rotate(90deg);
}

/* Etat sans image (modale texte seul) */
.site-modal.no-media .site-modal-media {
    display: none;
}

.site-modal.no-media .site-modal-content {
    flex: 1 1 100%;
}

/* ===================== RESPONSIVE : PLEIN ECRAN SUR MOBILE ===================== */
@media (max-width: 768px) {
    .site-modal-backdrop {
        padding: 0;
    }

    .site-modal {
        flex-direction: column;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }

    .site-modal-media {
        flex: 0 0 auto;
        height: 38vh;
        min-height: 200px;
    }

    .site-modal-content {
        flex: 1 1 auto;
        padding: 1.75rem 1.5rem 2.5rem;
    }

    .site-modal-title {
        font-size: 1.4rem;
    }

    .site-modal-close {
        top: 1rem;
        right: 1rem;
        background: rgba(0, 0, 0, 0.55);
    }
}

/* ===================== MODALE "QUI SOMMES-NOUS" (carousel) ===================== */
.about-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(1, 4, 10, 0.75);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.about-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.about-modal {
    position: relative;
    display: flex;
    width: 100%;
    max-width: 920px;
    max-height: 85vh;
    background: linear-gradient(135deg, #01176C 0%, #000428 100%);
    border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-modal-backdrop.open .about-modal {
    transform: translateY(0) scale(1);
}

/* ----- Texte (gauche) ----- */
.about-modal-info {
    flex: 0 0 42%;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.about-modal-info .site-modal-title {
    min-height: 2.2em;
    transition: opacity 0.3s ease;
}

.about-modal-info .site-modal-text {
    min-height: 6.5em;
    transition: opacity 0.3s ease;
}

.about-modal-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.about-modal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.about-modal-dot.active {
    background: var(--gv-orange, #F29200);
    width: 26px;
    border-radius: 6px;
}

/* ----- Carousel (droite) ----- */
.about-modal-carousel {
    position: relative;
    flex: 1 1 58%;
    overflow: hidden;
    min-height: 420px;
}

.about-modal-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.about-modal-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.about-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 2;
}

.about-modal-nav:hover {
    background: var(--gv-orange, #F29200);
    color: #000000;
}

.about-modal-nav.prev { left: 1rem; }
.about-modal-nav.next { right: 1rem; }

@media (max-width: 768px) {
    .about-modal-backdrop { padding: 0; }

    .about-modal {
        flex-direction: column;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }

    .about-modal-carousel {
        order: -1;
        flex: 0 0 auto;
        height: 38vh;
        min-height: 200px;
    }

    .about-modal-info {
        flex: 1 1 auto;
        padding: 1.75rem 1.5rem 2.5rem;
        overflow-y: auto;
    }

    .about-modal-info .site-modal-title {
        font-size: 1.4rem;
        min-height: 0;
    }

    .about-modal-info .site-modal-text {
        min-height: 0;
    }
}

/* ===================== MODALE "CONTACT" (formulaire) ===================== */
.contact-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(1, 4, 10, 0.75);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.contact-modal {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #01176C 0%, #000428 100%);
    border: 1px solid var(--line, rgba(255, 255, 255, 0.09));
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(24px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-modal-backdrop.open .contact-modal {
    transform: translateY(0) scale(1);
}

.contact-modal-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.75rem;
}

.contact-modal-row {
    display: flex;
    gap: 1rem;
}

.contact-modal-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-modal-field label {
    font-family: var(--font-body, 'Arial', sans-serif);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.contact-modal-field input,
.contact-modal-field textarea {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    color: #ffffff;
    font-family: var(--font-body, 'Arial', sans-serif);
    font-size: 0.92rem;
    outline: none;
    resize: vertical;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.contact-modal-field input::placeholder,
.contact-modal-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.contact-modal-field input:focus,
.contact-modal-field textarea:focus {
    border-color: var(--gv-orange, #F29200);
    background: rgba(255, 255, 255, 0.1);
}

.contact-modal-submit {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    background: var(--gv-orange, #F29200);
    color: #000000;
    border: none;
    font-family: var(--font-heading, 'Aldrich', sans-serif);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(242, 146, 0, 0.35);
}

@media (max-width: 768px) {
    .contact-modal-backdrop { padding: 0; }

    .contact-modal {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }

    .contact-modal-content {
        padding: 1.75rem 1.5rem 2.5rem;
    }

    .contact-modal-row {
        flex-direction: column;
        gap: 1rem;
    }
}
