:root {
    --ramery-blue: #003D7C;
    --ramery-blue-light: #EEF4FA;
    --ramery-blue-border: #C9DBEC;

    --ramery-red: #D41317;

    --text: #1F2933;
    --gray: #4A4A49;
    --muted: #6B7280;

    --border: #DDE4EB;
    --background: #F4F7FA;

    --white: #FFFFFF;
}

/* ============================================================
   GLOBAL
   ============================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

    background:
        linear-gradient(
            180deg,
            #FFFFFF 0,
            #F3F7FB 180px,
            #F7F9FB 100%
        );

    color: var(--text);

    min-height: 100vh;
}


/* ============================================================
   HEADER RAMERY
   ============================================================ */

.topbar {
    min-height: 104px;

    background: var(--white);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px 24px;

    border-bottom: 1px solid #E2E8EF;
}

.brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ramery-logo {
    display: block;

    width: 220px;
    height: auto;

    max-width: 80vw;

    object-fit: contain;
}


/* ============================================================
   PAGE
   ============================================================ */

.shell {
    width: 100%;
    max-width: 660px;

    margin: 0 auto;

    padding: 30px 18px 60px;
}


/* ============================================================
   CARD
   ============================================================ */

.card {
    position: relative;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 22px;

    box-shadow:
        0 10px 30px rgba(0, 61, 124, 0.07);

    overflow: hidden;
}

.access-card {
    padding: 38px 38px 34px;

    text-align: center;
}


/* Motif discret inspiré de la trame Ramery */

.access-card::after {
    content: "";

    position: absolute;

    left: -40px;
    right: -40px;
    bottom: -45px;

    height: 125px;

    pointer-events: none;

    opacity: 0.32;

    background-image:
        radial-gradient(
            circle,
            rgba(0, 61, 124, 0.34) 1px,
            transparent 1.5px
        );

    background-size: 9px 9px;

    transform: rotate(-2deg);

    mask-image:
        linear-gradient(
            to bottom,
            transparent 0%,
            black 48%,
            black 100%
        );
}


/* ============================================================
   TITRES
   ============================================================ */

.eyebrow {
    margin: 0;

    color: var(--ramery-blue);

    font-size: 14px;
    font-weight: 750;

    letter-spacing: 0.14em;

    text-transform: uppercase;
}

.title-accent {
    width: 48px;
    height: 4px;

    margin: 14px auto 23px;

    background: var(--ramery-red);

    border-radius: 10px;
}

.access-card h1 {
    margin: 0 0 12px;

    color: var(--ramery-blue);

    font-size: 38px;
    line-height: 1.12;

    font-weight: 750;
}

.lead {
    margin: 0 auto 26px;

    max-width: 470px;

    color: var(--gray);

    font-size: 18px;
    line-height: 1.45;
}


/* ============================================================
   QR
   ============================================================ */

.qr-zone {
    width: min(100%, 360px);

    margin: 12px auto 24px;

    padding: 12px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #FFFFFF;
}

.qr-zone svg {
    display: block;

    width: 100%;
    max-width: 330px;

    height: auto;
}


/* ============================================================
   STATUS ACTIF
   ============================================================ */

.access-status {
    max-width: 420px;

    margin: 0 auto 26px;

    padding: 14px 18px;

    display: flex;
    align-items: center;

    gap: 14px;

    text-align: left;

    background: #F3F7FC;

    border: 1px solid var(--ramery-blue-border);

    border-radius: 16px;
}

.access-status-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: var(--ramery-blue);

    color: #FFFFFF;

    font-size: 24px;
    font-weight: 800;
}

.access-status-content strong {
    display: block;

    color: var(--ramery-blue);

    font-size: 17px;

    margin-bottom: 3px;
}

.access-status-content span {
    display: block;

    color: var(--gray);

    font-size: 14px;
}


/* ============================================================
   INFORMATIONS
   ============================================================ */

.access-details {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 0;

    margin: 8px 0 26px;

    text-align: left;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.access-detail {
    padding: 18px 18px;
}

.access-detail:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.access-detail.transporteur {
    grid-column: 1 / -1;

    border-top: 1px solid var(--border);
    border-right: 0;
}

.detail-label {
    display: block;

    margin-bottom: 5px;

    color: var(--ramery-blue);

    font-size: 12px;

    font-weight: 750;

    text-transform: uppercase;

    letter-spacing: 0.05em;
}

.detail-value {
    display: block;

    color: var(--text);

    font-size: 16px;

    font-weight: 600;

    line-height: 1.35;
}


/* ============================================================
   AIDE
   ============================================================ */

.qr-help {
    position: relative;
    z-index: 1;

    margin: 0 auto;

    max-width: 440px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 4px 8px 28px;

    text-align: left;

    color: var(--gray);

    font-size: 14px;

    line-height: 1.45;
}

.brightness-icon {
    color: var(--ramery-blue);

    font-size: 26px;

    line-height: 1;
}


/* ============================================================
   MENTION SECURITE
   ============================================================ */

.security {
    position: relative;
    z-index: 1;

    margin: 4px 0 0;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.4;
}


/* ============================================================
   ETATS NON VALIDES
   ============================================================ */

.state-card {
    padding: 54px 30px;

    text-align: center;
}

.state-card h1 {
    color: var(--text);
}

.status-icon {
    width: 62px;
    height: 62px;

    display: grid;
    place-items: center;

    margin: 0 auto 18px;

    border-radius: 50%;

    color: #FFFFFF;

    font-size: 30px;
    font-weight: 800;
}

.status-icon.error {
    background: var(--ramery-red);
}

.muted {
    color: var(--muted);
}


/* ============================================================
   LOADING
   ============================================================ */

.spinner {
    width: 44px;
    height: 44px;

    margin: 0 auto 20px;

    border: 4px solid #D9E4EF;
    border-top-color: var(--ramery-blue);

    border-radius: 50%;

    animation: spin 1s linear infinite;
}

@keyframes spin {

    to {
        transform: rotate(360deg);
    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 520px) {

    .topbar {
        min-height: 88px;

        padding: 14px 20px;
    }

    .ramery-logo {
        width: 200px;

        height: auto;
    }

    .shell {
        padding: 20px 12px 40px;
    }

    .access-card {
        padding: 30px 20px 26px;
    }

    .access-card h1 {
        font-size: 32px;
    }

    .lead {
        font-size: 16px;
    }

    .qr-zone {
        max-width: 310px;

        padding: 5px;
    }

    .access-status {
        padding: 12px 14px;
    }

    .access-details {
        grid-template-columns: 1fr;
    }

    .access-detail,
    .access-detail:nth-child(odd) {
        border-right: 0;
    }

    .access-detail + .access-detail {
        border-top: 1px solid var(--border);
    }

    .access-detail.transporteur {
        grid-column: auto;
    }

}


/* Très petits téléphones */

@media (max-width: 360px) {

    .access-card {
        padding-left: 14px;
        padding-right: 14px;
    }

    .access-card h1 {
        font-size: 28px;
    }

}