/**
 * Styles responsive globaux — inclure après le <style> de chaque page
 * v1
 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 0 !important;
    max-width: 100vw;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    height: auto;
}

.page-width {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 1230px;
    padding-left: clamp(12px, 4vw, 24px) !important;
    padding-right: clamp(12px, 4vw, 24px) !important;
    box-sizing: border-box;
}

/* Bandeau gouvernement */
.govbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.5rem;
    padding-left: 6px;
    padding-right: 6px;
}

.govbar:before,
.govbar:after {
    display: none !important;
    content: none !important;
}

.govbar-logo {
    float: none !important;
    flex-shrink: 0;
}

.govbar-logo img {
    max-width: min(200px, 48vw);
    height: auto;
    max-height: 40px;
}

.govbar-links {
    float: none !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    line-height: 1.4;
    max-width: 100%;
}

.govbar-links li {
    float: none !important;
}

.govbar-link {
    float: none !important;
    display: inline-block;
    padding: 6px 8px !important;
    font-size: 11px;
}

/* En-tête logos */
#header-wrap {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
}

#page-banner {
    position: relative !important;
    top: auto !important;
    left: auto;
}

#header-wrap .pb-connect {
    position: static !important;
    margin: 0.35rem 0 0;
}

#header-wrap .pb-profile {
    float: none !important;
}

#header-wrap .pb-profile .pb-logo {
    max-height: 42px;
    width: auto;
    max-width: min(140px, 42vw);
}

.pb-title .pb-logo {
    max-width: min(100%, 360px);
}

#space-bar {
    height: auto !important;
    min-height: 10px;
}

.main-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.main-content-header h1,
.nostrapline {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Pied de page */
.nav-support-main-wrapper {
    padding-left: clamp(8px, 3vw, 16px);
    padding-right: clamp(8px, 3vw, 16px);
}

.nav-support-wrapper {
    float: none !important;
    width: 100% !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.nav-support {
    float: none !important;
    width: auto !important;
    min-width: 0;
    max-width: 100%;
}

.copyright img {
    max-width: 120px;
    height: auto;
}

/* Formulaires : lignes en colonne sur petit écran */
@media (max-width: 639px) {
    #header-wrap .pb-lang {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        left: auto;
        margin-top: 0.5rem;
        display: inline-block;
    }

    #main-content.main-content,
    .main-content {
        padding-left: clamp(10px, 4vw, 20px) !important;
        padding-right: clamp(10px, 4vw, 20px) !important;
        box-sizing: border-box;
    }

    .main-content-header h1 {
        font-size: clamp(1.05rem, 4.5vw, 1.65rem) !important;
    }

    .l-gr-row {
        display: block !important;
        margin-top: 1rem;
    }

    .l-gr-col2,
    .l-gr-col3 {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        padding-right: 0 !important;
    }

    .l-gr-offset1 {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .hint-icon {
        display: inline-block;
        margin-top: 0.35rem;
    }

    .formButtons {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .formButtons .btn,
    .formButtons input[type="submit"] {
        width: 100% !important;
        box-sizing: border-box;
        min-height: 44px;
        text-align: center;
    }

    .alrt {
        padding: 12px 12px 12px 48px !important;
        font-size: 1rem !important;
    }

    .captcha-box,
    .blocked-msg,
    .error-box {
        max-width: 100% !important;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .page-index .main-content {
        padding: 1.5rem clamp(10px, 4vw, 20px) !important;
    }
}

@media (min-width: 640px) {
    .formButtons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px 12px;
    }

    .formButtons .btn,
    .formButtons input[type="submit"] {
        width: auto;
    }
}

/* Page chargement */
.loading-text {
    text-align: center;
    padding: 0 clamp(10px, 4vw, 24px);
    max-width: 100%;
}
