/* ============================================================
   JR ÉNERGIES — STYLE COMMUN
   HEADER CALÉ SUR LE CADRE BLANC
   ============================================================ */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f4f6f9;
    color: #18233a;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}


/* ============================================================
   HEADER
   IMPORTANT : même largeur que le cadre principal = 1200 px
   ============================================================ */

.jr-header {
    width: 100%;
    background: #fff;
    border-top: 3px solid #edf0f4;
    border-bottom: 1px solid #e2e6eb;
}

.jr-header-main {
    width: 1200px !important;
    max-width: calc(100% - 40px) !important;
    height: 145px;
    min-height: 145px;

    margin: 0 auto !important;
    padding: 8px 0 0 !important;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 0 !important;

    position: relative !important;
}


/* ============================================================
   LOGO
   Départ exactement sur le bord gauche du cadre
   ============================================================ */

.jr-brand {
    flex: 0 0 390px !important;
    width: 390px !important;
    height: 120px;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;

    position: relative !important;
    z-index: 5 !important;
}

.jr-brand-link {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.jr-logo {
    display: block !important;

    width: 390px !important;
    max-width: none !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: contain;
}


/* ============================================================
   PICTOGRAMMES
   Placés à droite dans les 1200 px
   ============================================================ */

.jr-services {
    position: static !important;

    flex: 0 0 600px !important;
    width: 600px !important;
    max-width: none !important;

    height: 115px;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;

    transform: none !important;

    z-index: 4 !important;
}

.jr-pictos {
    display: block !important;

    width: 600px !important;
    max-width: none !important;
    height: 100px !important;

    margin: 8px 0 0 !important;
    padding: 0 !important;

    object-fit: contain !important;
    object-position: right center !important;
}


/* ============================================================
   TEST
   ============================================================ */

.jr-status {
    position: absolute !important;

    right: 0 !important;
    top: 18px !important;

    z-index: 10 !important;

    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.jr-test-badge {
    min-width: 88px;
    height: 44px;
    padding: 0 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1.5px solid #70dfb7;
    border-radius: 24px;

    background: #f8fffc;
    color: #13815e;

    font-size: 18px;
    font-weight: 700;
}


/* ============================================================
   TITRE
   Même largeur et même bord gauche que le cadre
   ============================================================ */

.jr-section-title {
    width: 1200px !important;
    max-width: calc(100% - 40px) !important;

    margin: 0 auto !important;
    padding: 0 0 18px !important;

    color: #65738b;
    font-size: 21px;
    font-weight: 500;
}


/* ============================================================
   BANDEAU TEST
   ============================================================ */

.jr-test-banner {
    width: 100%;
    min-height: 58px;

    background: #fff2c7;
    border-top: 2px solid #e7b52b;
    border-bottom: 2px solid #e7b52b;

    color: #82530b;
}

.jr-test-banner-content {
    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;

    padding: 10px 20px;
    font-size: 18px;
}

.jr-test-banner-content strong {
    font-weight: 800;
}

.jr-test-separator {
    color: #b98415;
}


/* ============================================================
   CONTENU
   ============================================================ */

.jr-main {
    width: 100%;
    min-height: calc(100vh - 220px);

    padding: 32px 20px 55px;
}


/* ============================================================
   CADRE PRINCIPAL
   ============================================================ */

.jr-card {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 32px;

    background: #fff;

    border: 1px solid #dfe5ec;
    border-radius: 18px;

    box-shadow: 0 5px 22px rgba(30, 50, 80, .06);
}


/* ============================================================
   CONTENU GÉNÉRAL
   ============================================================ */

.jr-card h1,
.jr-card h2,
.jr-card h3 {
    margin-top: 0;
    color: #18233a;
}

.jr-card h1 {
    margin-bottom: 10px;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 750;
}

.jr-card h2 {
    font-size: 29px;
    font-weight: 700;
}

.jr-card h3 {
    font-size: 21px;
    font-weight: 700;
}

.jr-subtitle {
    margin-top: 0;
    margin-bottom: 28px;
    color: #69778e;
    font-size: 17px;
    line-height: 1.5;
}

.jr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.jr-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.jr-info {
    padding: 20px;
    background: #f7f9fb;
    border: 1px solid #edf0f4;
    border-radius: 13px;
}

.jr-info-label {
    display: block;
    margin-bottom: 6px;
    color: #69778e;
    font-size: 15px;
    font-weight: 500;
}

.jr-info-value {
    color: #18233a;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}


/* ============================================================
   CHAMPS
   ============================================================ */

.jr-field {
    margin-bottom: 20px;
}

.jr-field label {
    display: block;
    margin-bottom: 7px;
    color: #53627a;
    font-size: 15px;
    font-weight: 600;
}

.jr-field input,
.jr-field select,
.jr-field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 15px;

    border: 1px solid #d6dde6;
    border-radius: 9px;

    background: #fff;
    color: #18233a;

    font-family: inherit;
    font-size: 16px;
    outline: none;
}

.jr-field textarea {
    min-height: 120px;
    resize: vertical;
}

.jr-field input:focus,
.jr-field select:focus,
.jr-field textarea:focus {
    border-color: #176dcc;
    box-shadow: 0 0 0 3px rgba(23,109,204,.10);
}


/* ============================================================
   BOUTONS
   ============================================================ */

.jr-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.jr-button {
    min-height: 52px;
    padding: 0 25px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 10px;

    background: #e8edf4;
    color: #18233a;

    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;

    cursor: pointer;
}

.jr-button-primary {
    background: #176dcc;
    color: #fff;
}

.jr-button-success {
    background: #198754;
    color: #fff;
}

.jr-button-danger {
    background: #c93434;
    color: #fff;
}


/* ============================================================
   ALERTES
   ============================================================ */

.jr-alert {
    margin-bottom: 22px;
    padding: 17px 20px;

    border-radius: 11px;
    border: 1px solid #dfe5ec;

    background: #f7f9fb;
    color: #34425a;

    line-height: 1.5;
}

.jr-alert-warning {
    background: #fff7df;
    border-color: #f0d58a;
    color: #74510d;
}

.jr-alert-success {
    background: #edf9f1;
    border-color: #b9e3c5;
    color: #216437;
}

.jr-alert-danger {
    background: #fff0f0;
    border-color: #edbcbc;
    color: #8d2525;
}


/* ============================================================
   FOOTER
   ============================================================ */

.jr-footer {
    width: 100%;
    background: #173e68;
    color: #fff;
}

.jr-footer-content {
    width: 1200px;
    max-width: calc(100% - 40px);

    min-height: 70px;

    margin: 0 auto;
    padding: 12px 0;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 80px;
}

.jr-footer-item {
    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 15px;
}

.jr-footer-icon {
    font-size: 20px;
}


/* ============================================================
   MOBILE — HEADER COMPACT
   ============================================================ */

@media (max-width: 750px) {

    .jr-header {
        width: 100%;
        overflow: hidden;
    }

    .jr-header-main {
        position: relative !important;

        width: 100% !important;
        max-width: none !important;

        height: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 12px 12px 4px !important;

        display: block !important;
    }

    /* --------------------------------------------------------
       LOGO
       -------------------------------------------------------- */

    .jr-brand {
        position: static !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .jr-brand-link {
        display: block !important;

        width: auto !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;
    }

    .jr-logo {
        display: block !important;

        width: 280px !important;
        max-width: 80vw !important;

        height: auto !important;

        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* --------------------------------------------------------
       PICTOGRAMMES
       Aucun espace vertical forcé
       -------------------------------------------------------- */

    .jr-services {
        position: static !important;

        width: 100% !important;
        max-width: none !important;

        height: auto !important;
        min-height: 0 !important;

        margin: 6px 0 0 !important;
        padding: 0 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        transform: none !important;
    }

    .jr-pictos {
        display: block !important;

        width: 100% !important;
        max-width: 620px !important;

        height: auto !important;
        max-height: none !important;

        margin: 0 auto !important;
        padding: 0 !important;

        object-fit: contain !important;
        object-position: center !important;
    }

    /* --------------------------------------------------------
       TEST
       -------------------------------------------------------- */

    .jr-status {
        position: absolute !important;

        top: 12px !important;
        right: 12px !important;

        width: auto !important;
        height: auto !important;

        z-index: 20 !important;
    }

    .jr-test-badge {
        min-width: 68px;

        height: 36px;

        padding: 0 14px;

        font-size: 15px;
    }

    /* --------------------------------------------------------
       TITRE
       -------------------------------------------------------- */

    .jr-section-title {
        width: 100% !important;
        max-width: none !important;

        margin: 0 !important;

        padding: 7px 20px 14px !important;

        font-size: 18px !important;
        line-height: 1.3;
    }

    /* --------------------------------------------------------
       BANDEAU TEST
       -------------------------------------------------------- */

    .jr-test-banner-content {
        min-height: 50px;

        padding: 9px 12px;

        flex-direction: column;

        gap: 3px;

        text-align: center;

        font-size: 14px;
    }

    .jr-test-separator {
        display: none;
    }

    /* --------------------------------------------------------
       MODE TEST / SANDBOX
       La bande doit rester visible sur téléphone.
       -------------------------------------------------------- */

    .jr-test-banner {
        display: block !important;
        width: 100% !important;
        min-height: 54px !important;

        margin: 0 !important;
        padding: 0 !important;

        background: #fff2c7 !important;

        border-top: 2px solid #e7b52b !important;
        border-bottom: 2px solid #e7b52b !important;

        color: #82530b !important;
    }

    .jr-test-banner-content {
        display: flex !important;

        width: 100% !important;
        min-height: 50px !important;

        align-items: center !important;
        justify-content: center !important;

        flex-direction: column !important;

        gap: 3px !important;

        padding: 8px 12px !important;

        text-align: center !important;

        font-size: 14px !important;
        line-height: 1.3 !important;
    }

    .jr-test-banner-content strong {
        display: block !important;
        font-size: 15px !important;
    }

    .jr-test-banner-content span {
        display: block !important;
    }

    .jr-test-separator {
        display: none !important;
    }

    /* --------------------------------------------------------
       CONTENU
       -------------------------------------------------------- */

    .jr-main {
        width: 100%;

        min-height: 0;

        padding: 18px 12px 30px;
    }

    .jr-card {
        width: 100%;
        max-width: 1200px;

        margin: 0 auto;

        padding: 22px 17px;

        border-radius: 14px;
    }

    .jr-card h1 {
        font-size: 29px;
    }

    .jr-grid {
        grid-template-columns: 1fr;
    }

    .jr-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .jr-button {
        width: 100%;
    }

    /* --------------------------------------------------------
       FOOTER
       -------------------------------------------------------- */

    .jr-footer-content {
        width: 100%;
        max-width: none;

        min-height: 70px;

        padding: 20px 15px;

        display: flex;
        flex-direction: column;

        gap: 12px;
    }

    .jr-footer-item {
        white-space: normal;

        justify-content: center;

        text-align: center;
    }
}


/* ============================================================
   OVERRIDE FINAL — BANDE MODE TEST
   ============================================================ */

.jr-test-banner {
    display: block !important;
    width: 100% !important;
    min-height: 58px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.jr-test-banner-content {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 750px) {
    .jr-test-banner {
        min-height: 54px !important;
    }

    .jr-test-banner-content {
        min-height: 50px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
        padding: 8px 12px !important;
        text-align: center !important;
        font-size: 14px !important;
    }

    .jr-test-banner-content strong {
        display: block !important;
    }

    .jr-test-banner-content span {
        display: block !important;
    }

    .jr-test-separator {
        display: none !important;
    }
}
