/* ===== Variables ===== */
:root {
    --font-text: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --color-text: #111751;
    --color-white: #FFFFFF;
    --color-bg: #F1F1F1;
    --color-banner: #EFF1FF;
    --color-primary: #D71302;
    --color-primary-dark: #4B0605;
    --color-primary-soft: rgba(215, 19, 2, 0.7);
    --color-primary-dark-soft: rgba(75, 6, 5, 0.8);
    --color-success: #1D8669;
    --color-error: #D71302;
}

/* ===== Base ===== */
* {
    box-sizing: border-box;
    margin: 0;
}

html {
    background-color: var(--color-white);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-bg);
    font-family: var(--font-text);
    color: var(--color-text);
}

input,
button {
    font-family: inherit;
}

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 9rem;
    background-color: var(--color-white);
}

.header img {
    max-height: 100%;
}

/* ===== Banner ===== */
.banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.3rem;
    background-color: var(--color-banner);
}

.banner>img {
    width: 60vw;
}

/* Bloc texte : logo à gauche, titre + sous-titre à droite */
.banner-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.banner-text>div {
    min-width: 0;
}

/* Logo carré (le sélecteur en 2 classes bat les règles ".banner img") */
.banner .banner-logo {
    display: block;
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    max-width: none;
    object-fit: contain;
}

.banner-title {
    font-family: var(--font-title);
    font-size: larger;
    font-weight: 700;
    line-height: 1.6rem;
}

.banner-subtitle {
    font-size: 0.93rem;
    font-weight: 500;
    margin: 1rem 0;
}

/* ===== Content ===== */
.content {
    margin: 1rem 0;
}

.form-wrapper {
    margin: 2rem;
}

/* ===== Info badge ===== */
.badge {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 35rem;
    margin-bottom: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background-color: var(--color-success);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-white);
}

.badge-error {
    background-color: var(--color-error);
}

.badge-icon {
    flex-shrink: 0;
    margin-right: 12px;
    padding: 2px 12px 0 0;
    border-right: 1px solid var(--color-white);
}

.badge-text {
    color: var(--color-white);
    word-break: break-word;
}

.badge-text p {
    line-height: 1.6;
}

.badge-text p+p {
    margin-top: 18px;
}

/* ===== Form ===== */
.form-group {
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    position: relative;
}

.input {
    flex: auto;
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-text);
    border-radius: 16px;
    background-color: var(--color-white);
    color: var(--color-text);
    font-size: medium;
}

.input-error {
    display: flex;
    min-height: 1.5rem;
    font-size: small;
}

.password-toggle {
    display: flex;
    position: absolute;
    top: 30%;
    right: 1rem;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.password-toggle img {
    width: 1.5rem;
    height: auto;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 70px;
    background-color: var(--color-primary-soft);
    color: var(--color-white);
    font-family: var(--font-title);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .35s ease, color .35s ease;
}

.button:hover {
    background-color: var(--color-primary-dark-soft);
}

.button-secondary {
    border-color: var(--color-primary-soft);
    background-color: transparent;
    color: var(--color-primary);
}

.button-secondary:hover {
    background-color: var(--color-primary-soft);
    color: var(--color-white);
}

/* ===== Footer ===== */
.footer {
    padding: calc(1.5rem + 2.5vw);
    background-color: var(--color-text);
}

.footer,
.footer * {
    color: var(--color-white);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.footer-col-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-org {
    font-weight: 700;
}

.footer h2 {
    position: relative;
    margin-bottom: .5rem;
    padding-left: .5rem;
    font-size: 1.2em;
}

.footer h2::before {
    position: relative;
    top: 0;
    left: -.5rem;
}

.title-shortcuts::before {
    content: url(img/icon-lightning.svg);
}

.title-info::before {
    content: url(img/icon-info-footer.svg);
}

.title-partners::before {
    content: url(img/icon-partners.svg);
}

.footer h3 {
    font-size: 0.95em;
    font-weight: 400;
}

.footer ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 0;
    list-style: none;
}

.footer li {
    font-size: 0.95rem;
    font-weight: 700;
    opacity: 0.75;
}

.footer .logo-list {
    flex-direction: row;
    align-items: center;
}

.footer .logo-list.application {
    margin-top: 0.5rem;
}

.footer li img {
    filter: brightness(0) invert(1);
}

.footer-rights {
    width: 100%;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-white);
    text-align: center;
}

/* ===== Responsive ===== */
@media (max-height: 768px) {
    .banner {
        padding: 0;
    }

    .banner img {
        max-width: 10rem !important;
    }

    .banner-subtitle {
        margin: 0.4rem 0;
    }

    .form-wrapper {
        margin: 0.5rem;
    }

    .form-actions {
        margin-top: 1rem !important;
    }
}

@media (max-width: 1200px) {
    .footer-container {
        flex-wrap: wrap;
    }

    .footer-container>div {
        flex-basis: 48%;
        flex-grow: 1;
    }
}

@media (min-width: 768px) {
    .banner {
        flex-direction: row;
        gap: 3rem;
    }

    .banner img {
        max-width: 15rem;
    }

    .content {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .content-wrapper {
        min-width: clamp(20rem, 40vw, 35rem);
        max-width: max-content;
    }

    .form-actions {
        margin-top: 3rem;
    }

    .footer {
        flex-grow: 1;
    }

    .footer-container {
        flex-direction: row;
        justify-content: space-around;
    }
}

/* Écrans larges et très peu hauts : on masque header et footer */
@media (min-width: 1024px) and (max-height: 500px) {

    .header,
    .footer {
        display: none;
    }

    .banner-text {
        max-width: 40rem;
    }

    /* Le titre : les deux h1 côte à côte (le logo est ailleurs, le wrapper texte est ".banner-text>div") */
    .banner-text>div>div {
        display: flex;
        flex-direction: row;
        margin-top: 0.4rem;
    }

    .banner>img {
        max-width: 7rem !important;
    }
}