/* ============================================================
   PJM Structures — Espace Client
   Design : cohérent avec la vitrine, épuré, professionnel
   ============================================================ */

/* ─── Variables (reprises de la vitrine) ─── */
:root {
    --bleu-profond: #1B2A4A;
    --bleu-moyen: #2C4A7C;
    --bleu-clair: #3D6098;
    --gris-anthracite: #2D3436;
    --gris-moyen: #636E72;
    --gris-clair: #B2BEC3;
    --gris-tres-clair: #F1F3F5;
    --blanc: #FFFFFF;
    --accent: #4A90D9;
    --accent-hover: #3A7BC8;
    --succes: #27AE60;
    --erreur: #C0392B;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --ombre-legere: 0 1px 3px rgba(0,0,0,0.06);
    --ombre-moyenne: 0 4px 12px rgba(0,0,0,0.08);
    --transition: 0.3s ease;
}

/* ─── Reset ─── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gris-anthracite);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   LOGIN PAGE — Split layout
   ============================================================ */

.login-page {
    min-height: 100vh;
    background: var(--gris-tres-clair);
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ─── Panneau gauche — Branding ─── */
.login-brand {
    flex: 0 0 420px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2.5rem;
    background: linear-gradient(160deg, var(--bleu-profond) 0%, #243B63 60%, #1a2540 100%);
    color: var(--blanc);
    position: relative;
    overflow: hidden;
}

/* Motif décoratif subtil */
.login-brand::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border: 2px solid rgba(255,255,255,0.06);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand__content {
    position: relative;
    z-index: 1;
}

.login-brand__logo img {
    margin-bottom: 2rem;
}

.login-brand__title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.login-brand__pjm {
    color: var(--blanc);
}

.login-brand__structures {
    color: rgba(255,255,255,0.55);
    margin-left: 0.2em;
    font-weight: 500;
}

.login-brand__desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255,255,255,0.7);
    margin-bottom: 2.5rem;
}

.login-brand__features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-brand__feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.8);
}

.login-brand__feature svg {
    flex-shrink: 0;
    color: rgba(255,255,255,0.5);
}

.login-brand__copy {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.35);
}

/* ─── Panneau droit — Formulaire ─── */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--blanc);
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

/* Logo mobile (caché sur desktop) */
.login-form__logo-mobile {
    display: none;
}

.login-form__header {
    margin-bottom: 2rem;
}

.login-form__header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.35rem;
}

.login-form__header p {
    font-size: 0.9rem;
    color: var(--gris-moyen);
}

/* ─── Alert flash ─── */
.login-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.login-alert--error {
    background: rgba(192, 57, 43, 0.06);
    color: var(--erreur);
    border: 1px solid rgba(192, 57, 43, 0.15);
}

.login-alert--info {
    background: rgba(74, 144, 217, 0.06);
    color: var(--accent);
    border: 1px solid rgba(74, 144, 217, 0.15);
}

.login-alert--success {
    background: rgba(39, 174, 96, 0.06);
    color: var(--succes);
    border: 1px solid rgba(39, 174, 96, 0.15);
}

.login-alert svg {
    flex-shrink: 0;
}

/* ─── Formulaire ─── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gris-anthracite);
    margin-bottom: 0.4rem;
    letter-spacing: 0.02em;
}

.login-field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-field__label-row a {
    font-size: 0.78rem;
    font-weight: 500;
}

.login-field__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field__icon {
    position: absolute;
    left: 0.85rem;
    color: var(--gris-clair);
    pointer-events: none;
    transition: color 0.2s ease;
}

.login-field__input-wrap input {
    width: 100%;
    padding: 0.7rem 0.85rem 0.7rem 2.75rem;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--gris-anthracite);
    background: var(--gris-tres-clair);
    border: 1.5px solid transparent;
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.login-field__input-wrap input::placeholder {
    color: var(--gris-clair);
}

.login-field__input-wrap input:focus {
    background: var(--blanc);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.login-field__input-wrap input:focus ~ .login-field__icon,
.login-field__input-wrap:focus-within .login-field__icon {
    color: var(--accent);
}

/* Toggle password */
.login-field__toggle {
    position: absolute;
    right: 0.7rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gris-clair);
    padding: 0.2rem;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.login-field__toggle:hover {
    color: var(--gris-moyen);
}

/* ─── Bouton principal ─── */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    margin-top: 0.5rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blanc);
    background: var(--bleu-profond);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.login-btn:hover {
    background: var(--bleu-moyen);
    box-shadow: 0 4px 14px rgba(27, 42, 74, 0.25);
}

.login-btn:active {
    transform: scale(0.985);
}

.login-btn svg {
    transition: transform 0.2s ease;
}

.login-btn:hover svg {
    transform: translateX(3px);
}

/* ─── Footer du formulaire ─── */
.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer a {
    font-size: 0.82rem;
    color: var(--gris-moyen);
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--bleu-profond);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ─── Desktop nav (shared nav.php) ─── */
.client-nav {
    display: flex;
    gap: 0.25rem;
    margin-left: 2rem;
}

.client-nav__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--erreur);
    color: var(--blanc);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 2px;
}

/* ─── Hamburger button (mobile only) ─── */
.client-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.client-hamburger span {
    display: block;
    height: 2px;
    background: var(--gris-anthracite);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.client-hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.client-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}
.client-hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── Mobile nav overlay ─── */
.client-mobile-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--blanc);
    z-index: 99;
    display: none;
    flex-direction: column;
    padding: 1.5rem;
    overflow-y: auto;
}

.client-mobile-nav.is-open {
    display: flex;
}

.client-mobile-nav__links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.client-mobile-nav__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gris-moyen);
    text-decoration: none;
    transition: var(--transition);
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: var(--font);
}

.client-mobile-nav__link:hover {
    background: var(--gris-tres-clair);
    color: var(--bleu-profond);
}

.client-mobile-nav__link--active {
    color: var(--accent);
    background: rgba(74, 144, 217, 0.06);
}

.client-mobile-nav__link--logout {
    color: var(--erreur);
}
.client-mobile-nav__link--logout:hover {
    background: rgba(192, 57, 43, 0.06);
    color: var(--erreur);
}

.client-mobile-nav__divider {
    height: 1px;
    background: var(--gris-tres-clair);
    margin: 0.75rem 0;
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand {
        flex: none;
        padding: 2rem 1.5rem 1.5rem;
    }

    .login-brand__features {
        display: none;
    }

    .login-brand__desc {
        margin-bottom: 0;
        font-size: 0.875rem;
    }

    .login-brand__copy {
        display: none;
    }
}

@media (max-width: 768px) {
    .client-nav {
        display: none;
    }

    .client-hamburger {
        display: flex;
    }

    .client-header__user {
        display: none;
    }
}

@media (max-width: 600px) {
    .login-brand {
        display: none;
    }

    .login-form__logo-mobile {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin-bottom: 1.25rem;
        text-decoration: none;
    }

    .login-form__brand-mobile {
        font-size: 1rem;
        letter-spacing: 0.05em;
        color: var(--bleu-profond);
    }

    .login-form__brand-mobile strong {
        font-weight: 700;
    }

    .login-form-panel {
        padding: 1.5rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .login-form__header h2 {
        font-size: 1.35rem;
    }
}

/* ============================================================
   DASHBOARD — Header, cartes, layout
   ============================================================ */

/* ─── Client Header ─── */
.client-header {
    background: var(--blanc);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 0 2rem;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.client-header__inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.client-header__logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.client-header__logo img {
    height: 32px;
    width: auto;
}

.client-header__brand {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: var(--bleu-profond);
}

.client-header__brand strong {
    font-weight: 700;
}

.client-header__brand span {
    font-weight: 400;
    color: var(--gris-moyen);
    margin-left: 0.15em;
}

.client-header__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-header__user {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gris-anthracite);
}

.client-header__user svg {
    color: var(--gris-clair);
}

.client-header__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--gris-moyen);
    transition: all 0.2s ease;
}

.client-header__logout:hover {
    color: var(--erreur);
    border-color: rgba(192, 57, 43, 0.2);
    background: rgba(192, 57, 43, 0.04);
}

/* ─── User Dropdown ─── */
.client-dropdown {
    position: relative;
}

.client-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.65rem;
    background: none;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gris-anthracite);
    transition: all 0.2s ease;
}

.client-dropdown__trigger:hover {
    border-color: rgba(0,0,0,0.15);
    background: rgba(0,0,0,0.02);
}

.client-dropdown__trigger svg:first-child {
    color: var(--gris-clair);
}

.client-dropdown__chevron {
    color: var(--gris-clair);
    transition: transform 0.2s ease;
}

.client-dropdown.is-open .client-dropdown__chevron {
    transform: rotate(180deg);
}

.client-dropdown__name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-dropdown__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--blanc);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--ombre-moyenne);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 1000;
    padding: 0.35rem 0;
}

.client-dropdown.is-open .client-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.client-dropdown__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gris-anthracite);
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    font-family: var(--font);
}

.client-dropdown__item:hover {
    background: var(--gris-tres-clair);
}

.client-dropdown__item svg {
    color: var(--gris-clair);
    flex-shrink: 0;
}

.client-dropdown__item--logout {
    color: var(--erreur);
}

.client-dropdown__item--logout svg {
    color: var(--erreur);
}

.client-dropdown__divider {
    height: 1px;
    background: rgba(0,0,0,0.06);
    margin: 0.3rem 0;
}

@media (max-width: 480px) {
    .client-dropdown__name {
        display: none;
    }
}

/* ─── Client Main ─── */
.dashboard-page {
    background: var(--gris-tres-clair);
    min-height: 100vh;
}

.client-main {
    padding: 2.5rem 2rem;
}

.client-container {
    max-width: 1140px;
    margin: 0 auto;
}

.client-welcome {
    margin-bottom: 2rem;
}

.client-welcome h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.3rem;
}

.client-welcome p {
    font-size: 0.9rem;
    color: var(--gris-moyen);
}

/* ─── Dashboard Header (score + info) ─── */
.dash-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--ombre-legere);
}

.dash-header__welcome h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.25rem;
}

.dash-header__structure {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gris-anthracite);
    margin-bottom: 0.4rem;
}

.dash-header__type {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    background: rgba(74, 144, 217, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.dash-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gris-moyen);
    margin-top: 0.35rem;
}

.dash-header__meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dash-header__meta svg {
    color: var(--gris-clair);
}

.dash-header__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.dash-score-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-score-ring__value {
    position: absolute;
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.dash-score-ring__number {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--bleu-profond);
}

.dash-score-ring__unit {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--gris-clair);
}

.dash-score-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* ─── Dashboard Blocks (3 colonnes) ─── */
.dash-blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.dash-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--ombre-legere);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

a.dash-block {
    cursor: pointer;
}
a.dash-block:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre-moyenne);
}

a.dash-block--documents:hover { border-color: rgba(139, 92, 246, 0.3); }
a.dash-block--conformite:hover { border-color: rgba(39, 174, 96, 0.3); }

.dash-block__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.dash-block--projet .dash-block__icon {
    background: rgba(74, 144, 217, 0.08);
    color: #4A90D9;
}

.dash-block--documents .dash-block__icon {
    background: rgba(139, 92, 246, 0.08);
    color: #8B5CF6;
}

.dash-block--conformite .dash-block__icon {
    background: rgba(39, 174, 96, 0.08);
    color: #27AE60;
}

.dash-block__content {
    flex: 1;
    min-width: 0;
}

.dash-block__content h3 {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gris-moyen);
    margin-bottom: 0.2rem;
}

.dash-block__status,
.dash-block__count,
.dash-block__score-inline {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin: 0;
}

.dash-block__badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--blanc);
    background: var(--accent);
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 0.15rem;
}

.dash-block__detail {
    display: block;
    font-size: 0.75rem;
    color: var(--gris-clair);
    margin-top: 0.1rem;
}

.dash-block__arrow {
    color: var(--gris-clair);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dash-block:hover .dash-block__arrow {
    transform: translateX(3px);
    color: var(--accent);
}

@media (max-width: 900px) {
    .dash-blocks {
        grid-template-columns: 1fr;
    }
    .dash-header {
        flex-direction: column;
        align-items: stretch;
    }
    .dash-header__score {
        align-self: center;
    }
}

@media (max-width: 600px) {
    .dash-header {
        padding: 1.25rem;
    }
    .dash-header__welcome h1 {
        font-size: 1.2rem;
    }
    .dash-header__meta {
        flex-direction: column;
        gap: 0.3rem;
    }
}

/* ─── Cards ─── */
.client-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.client-card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--ombre-legere);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ombre-moyenne);
}

.client-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(74, 144, 217, 0.08);
    color: var(--accent);
    margin-bottom: 1rem;
}

.client-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bleu-profond);
    margin-bottom: 0.5rem;
}

.client-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bleu-profond);
    line-height: 1.2;
}

.client-card__label {
    font-size: 0.78rem;
    color: var(--gris-clair);
    margin-top: 0.25rem;
}

/* ─── Dashboard responsive ─── */
@media (max-width: 768px) {
    .client-cards {
        grid-template-columns: 1fr;
    }

    .client-main {
        padding: 1.5rem 1rem;
    }

    .client-header {
        padding: 0 1rem;
    }
}

/* ============================================================
   AUDIT SCORE CARD — Dashboard
   ============================================================ */

.audit-score-card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--ombre-legere);
    margin-bottom: 1.5rem;
}

.audit-score-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.audit-score-card__header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.2rem;
}

.audit-score-card__date {
    font-size: 0.8rem;
    color: var(--gris-clair);
}

.audit-score-card__ring {
    position: relative;
    flex-shrink: 0;
}

.audit-score-card__ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.audit-score-card__number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bleu-profond);
    line-height: 1;
}

.audit-score-card__unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gris-clair);
    align-self: flex-end;
    margin-bottom: 2px;
}

.audit-score-card__level {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--level-color, var(--gris-moyen));
    margin-bottom: 1.25rem;
}

.audit-score-card__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--level-color, var(--gris-clair));
}

.audit-score-card__summary {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gris-tres-clair);
}

.audit-score-card__summary p {
    font-size: 0.85rem;
    color: var(--gris-moyen);
    line-height: 1.6;
}

/* ─── Audit sections (progress bars) ─── */
.audit-sections {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.audit-section-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.audit-section-row__info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 160px;
    min-width: 0;
}

.audit-section-row__icon {
    display: flex;
    align-items: center;
    color: var(--gris-clair);
    flex-shrink: 0;
}

.audit-section-row__title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gris-anthracite);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-section-row__bar-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.audit-section-row__bar {
    flex: 1;
    height: 6px;
    background: var(--gris-tres-clair);
    border-radius: 3px;
    overflow: hidden;
}

.audit-section-row__fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.audit-section-row__score {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gris-moyen);
    flex-shrink: 0;
    width: 36px;
    text-align: right;
}

@media (max-width: 600px) {
    .audit-score-card {
        padding: 1.25rem;
    }

    .audit-score-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .audit-score-card__ring svg {
        width: 80px;
        height: 80px;
    }

    .audit-score-card__number {
        font-size: 1.3rem;
    }

    .audit-section-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }

    .audit-section-row__info {
        flex: none;
    }
}

/* ============================================================
   DASHBOARD — Documents récents
   ============================================================ */

.dashboard-docs {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--ombre-legere);
}

.dashboard-docs__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dashboard-docs__header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu-profond);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-docs__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(192, 57, 43, 0.08);
    color: var(--erreur);
    font-size: 0.72rem;
    font-weight: 600;
}

.dashboard-docs__all {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-docs__all:hover {
    color: var(--accent-hover);
}

.dashboard-docs__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    gap: 0.75rem;
}

.dashboard-docs__empty p {
    font-size: 0.85rem;
    color: var(--gris-clair);
}

.dashboard-docs__list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* ─── Doc row (shared between dashboard + documents) ─── */
.doc-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.15s ease;
}

.doc-row:hover {
    background: var(--gris-tres-clair);
}

.doc-row--unread {
    background: rgba(74, 144, 217, 0.03);
}

.doc-row--unread:hover {
    background: rgba(74, 144, 217, 0.06);
}

.doc-row__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--gris-tres-clair);
    color: var(--gris-moyen);
    flex-shrink: 0;
}

.doc-row--unread .doc-row__icon {
    background: rgba(74, 144, 217, 0.1);
    color: var(--accent);
}

.doc-row__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-row__title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gris-anthracite);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-row--unread .doc-row__title {
    font-weight: 600;
    color: var(--bleu-profond);
}

.doc-row__meta {
    font-size: 0.75rem;
    color: var(--gris-clair);
}

.doc-row__type {
    font-weight: 600;
    color: var(--gris-moyen);
}

.doc-row__new {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(74, 144, 217, 0.1);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

/* ============================================================
   PARAMÈTRES — Password Settings Page
   ============================================================ */

/* ─── Old header nav (kept for compat, hidden on mobile via 768px rule) ─── */
.client-header__nav {
    display: flex;
    gap: 0.25rem;
    margin-left: 2rem;
}

.client-nav__link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gris-moyen);
    text-decoration: none;
    transition: var(--transition);
}

.client-nav__link:hover {
    color: var(--bleu-profond);
    background: rgba(74, 144, 217, 0.06);
}

.client-nav__link--active {
    color: var(--accent);
    background: rgba(74, 144, 217, 0.08);
}

.client-nav__link span {
    white-space: nowrap;
}

/* ============================================================
   DOCUMENTS PAGE — Full listing
   ============================================================ */

.docs-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.docs-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.15rem;
}

.docs-header p {
    font-size: 0.85rem;
    color: var(--gris-clair);
}

/* ─── Filter tabs ─── */
.docs-filters {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.docs-filter {
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    background: var(--blanc);
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--gris-moyen);
    cursor: pointer;
    transition: var(--transition);
}

.docs-filter:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.docs-filter--active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--blanc);
}

.docs-filter--active:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--blanc);
}

/* ─── Empty state ─── */
.docs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.docs-empty h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gris-anthracite);
    margin-top: 1rem;
    margin-bottom: 0.35rem;
}

.docs-empty p {
    font-size: 0.85rem;
    color: var(--gris-clair);
}

/* ─── Document list ─── */
.docs-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.docs-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--ombre-legere);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.docs-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--ombre-moyenne);
}

.docs-item--unread {
    border-left: 3px solid var(--accent);
}

.docs-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--doc-color, var(--gris-clair)) 10%, transparent);
    color: var(--doc-color, var(--gris-clair));
    flex-shrink: 0;
}

.docs-item__body {
    flex: 1;
    min-width: 0;
}

.docs-item__top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3px;
}

.docs-item__title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gris-anthracite);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.docs-item--unread .docs-item__title {
    font-weight: 600;
    color: var(--bleu-profond);
}

.docs-item__badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 10px;
    background: rgba(74, 144, 217, 0.1);
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.docs-item__meta {
    font-size: 0.75rem;
    color: var(--gris-clair);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.docs-item__type {
    font-weight: 600;
    color: var(--doc-color, var(--gris-moyen));
}

.docs-item__actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.docs-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--gris-moyen);
    text-decoration: none;
    transition: var(--transition);
}

.docs-action:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(74, 144, 217, 0.04);
}

.docs-action--download:hover {
    color: var(--succes);
    border-color: var(--succes);
    background: rgba(39, 174, 96, 0.04);
}

/* ─── Documents responsive ─── */
@media (max-width: 600px) {
    .docs-header {
        flex-direction: column;
    }

    .docs-item {
        padding: 0.85rem 0.85rem;
        gap: 0.65rem;
    }

    .docs-item__icon {
        width: 34px;
        height: 34px;
    }

    .docs-item__meta {
        font-size: 0.7rem;
    }

    .docs-action {
        width: 32px;
        height: 32px;
    }
}

/* ============================================================
   DOCUMENT VIEWER — Modal overlay
   ============================================================ */

.doc-viewer {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.doc-viewer.is-open {
    display: flex;
}

.doc-viewer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.doc-viewer__panel {
    position: absolute;
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 1;
}

.doc-viewer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    gap: 1rem;
    flex-shrink: 0;
}

.doc-viewer__header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bleu-profond);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-viewer__meta {
    font-size: 0.78rem;
    color: var(--gris-clair);
}

.doc-viewer__header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-primary--sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}

.doc-viewer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gris-tres-clair);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--gris-moyen);
    transition: var(--transition);
}

.doc-viewer__close:hover {
    background: rgba(192, 57, 43, 0.08);
    color: var(--erreur);
}

.doc-viewer__body {
    flex: 1;
    overflow: auto;
    background: #f5f5f5;
}

.doc-viewer__iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.doc-viewer__image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 100%;
}

.doc-viewer__image img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-md);
    box-shadow: var(--ombre-moyenne);
}

.doc-viewer__fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    min-height: 300px;
}

.doc-viewer__fallback p {
    font-size: 0.88rem;
    color: var(--gris-moyen);
    text-align: center;
}

@media (max-width: 600px) {
    .doc-viewer__panel {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        border-radius: 0;
    }

    .doc-viewer__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-viewer__header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* ─── Settings header ─── */
.settings-header {
    margin-bottom: 2rem;
}

.settings-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.25rem;
}

.settings-header p {
    font-size: 0.88rem;
    color: var(--gris-moyen);
}

/* ─── Settings section (card) ─── */
.settings-section {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--ombre-legere);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.settings-section__header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gris-tres-clair);
}

.settings-section__header svg {
    color: var(--accent);
    flex-shrink: 0;
}

.settings-section__header h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--bleu-profond);
}

/* ─── Account info grid ─── */
.settings-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.settings-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.settings-info-item label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gris-clair);
}

.settings-info-item span {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--gris-anthracite);
}

/* ─── Settings form ─── */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 480px;
}

.settings-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.settings-form__field > label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bleu-profond);
}

.settings-form .input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.settings-form .input-group > svg {
    position: absolute;
    left: 0.85rem;
    color: var(--gris-clair);
    pointer-events: none;
    z-index: 1;
}

.settings-form .input-group input {
    width: 100%;
    padding: 0.7rem 2.8rem 0.7rem 2.8rem;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.88rem;
    color: var(--gris-anthracite);
    background: var(--blanc);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.settings-form .input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.settings-form .input-group input::placeholder {
    color: var(--gris-clair);
}

.settings-form .toggle-pwd {
    position: absolute;
    right: 0.65rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gris-clair);
    padding: 0.25rem;
    transition: color var(--transition);
    z-index: 1;
}

.settings-form .toggle-pwd:hover {
    color: var(--gris-moyen);
}

/* ─── Password strength bar ─── */
.password-strength {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.15rem;
}

.password-strength__bar {
    flex: 0 0 100px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength__bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength__text {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ─── Match hint ─── */
.match-hint {
    font-size: 0.78rem;
    font-weight: 500;
    min-height: 1.2em;
}

/* ─── Form actions ─── */
.settings-form__actions {
    margin-top: 0.5rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--accent);
    color: var(--blanc);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 8px rgba(74, 144, 217, 0.25);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* ─── Alerts (settings page) ─── */
.alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

.alert--success {
    background: rgba(39, 174, 96, 0.08);
    color: var(--succes);
    border: 1px solid rgba(39, 174, 96, 0.15);
}

.alert--error {
    background: rgba(192, 57, 43, 0.08);
    color: var(--erreur);
    border: 1px solid rgba(192, 57, 43, 0.15);
}

/* ─── Settings responsive ─── */
@media (max-width: 600px) {
    .settings-info-grid {
        grid-template-columns: 1fr;
    }

    .settings-section {
        padding: 1.25rem;
    }

    .settings-form .input-group input {
        font-size: 16px; /* prevent iOS zoom */
    }
}

/* ============================================================
   VÉRIFICATION 2FA — Code Input Page
   ============================================================ */

/* ─── Verify icon (shield/lock) ─── */
.verify-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.1) 0%, rgba(27, 42, 74, 0.08) 100%);
    color: var(--accent);
    margin-bottom: 1rem;
}

.verify-icon--lock {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(239, 68, 68, 0.06) 100%);
    color: #F59E0B;
}

/* ─── Code digit inputs ─── */
.code-input-wrap {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem 0 0.25rem;
}

.code-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bleu-profond);
    background: var(--blanc);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -moz-appearance: textfield;
}

.code-digit::-webkit-inner-spin-button,
.code-digit::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.code-digit:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.code-digit:not(:placeholder-shown) {
    border-color: var(--bleu-profond);
}

/* ─── Verify actions (resend + back) ─── */
.verify-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.resend-form {
    display: inline;
}

.resend-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--gris-moyen);
    cursor: pointer;
    transition: var(--transition);
}

.resend-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(74, 144, 217, 0.04);
}

.back-login-link {
    font-size: 0.8rem;
    color: var(--gris-clair);
    text-decoration: none;
    transition: color var(--transition);
}

.back-login-link:hover {
    color: var(--accent);
}

/* ─── Info alert style ─── */
.login-alert--info {
    background-color: rgba(74, 144, 217, 0.08);
    border-color: rgba(74, 144, 217, 0.15);
    color: var(--accent);
}

/* ============================================================
   FORCED PASSWORD RESET — First login
   ============================================================ */

/* ─── Password strength inline (used on force reset + settings) ─── */
.password-strength-inline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.25rem;
}

.password-strength-inline__bar {
    flex: 0 0 100px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-inline__bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

.password-strength-inline__text {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.match-hint-inline {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    min-height: 1.2em;
    margin-top: 0.2rem;
}

/* ─── 2FA & Force Reset responsive ─── */
@media (max-width: 600px) {
    .code-input-wrap {
        gap: 0.35rem;
    }

    .code-digit {
        width: 42px;
        height: 50px;
        font-size: 1.3rem;
    }

    .verify-icon {
        width: 48px;
        height: 48px;
    }

    .verify-icon svg {
        width: 26px;
        height: 26px;
    }
}

/* ============================================================
   FOOTER — Espace Client
   ============================================================ */

.client-footer {
    background: var(--blanc);
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 2rem;
    margin-top: 3rem;
}

.client-footer__inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.client-footer__top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.client-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--bleu-profond);
    letter-spacing: 0.03em;
}

.client-footer__brand img {
    max-height: 24px;
    width: auto;
    object-fit: contain;
}

.client-footer__brand strong {
    font-weight: 700;
}

.client-footer__tagline {
    font-size: 0.75rem;
    color: var(--gris-clair);
}

.client-footer__address {
    font-size: 0.72rem;
    color: var(--gris-clair);
    margin-top: 0.15rem;
}

.client-footer__links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.client-footer__links a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gris-moyen);
    text-decoration: none;
    transition: color var(--transition);
}

.client-footer__links a:hover {
    color: var(--accent);
}

.client-footer__sep {
    color: var(--gris-clair);
    font-size: 0.75rem;
}

.client-footer__bottom {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.client-footer__bottom p {
    font-size: 0.72rem;
    color: var(--gris-clair);
}

.client-footer__rgpd {
    font-size: 0.68rem !important;
    line-height: 1.5;
}

.client-footer__rgpd abbr {
    text-decoration: none;
    border-bottom: 1px dotted var(--gris-clair);
}

@media (max-width: 600px) {
    .client-footer {
        padding: 1.5rem 1rem;
        margin-top: 2rem;
    }

    .client-footer__links {
        flex-direction: column;
        gap: 0.35rem;
    }

    .client-footer__sep {
        display: none;
    }
}

/* ============================================================
   LEGAL PAGES — Mentions légales / Politique de confidentialité
   ============================================================ */

.legal-page {
    max-width: 800px;
    margin: 0 auto;
}

.legal-page__header {
    margin-bottom: 2.5rem;
}

.legal-page__header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.4rem;
}

.legal-page__header p {
    font-size: 0.9rem;
    color: var(--gris-moyen);
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--bleu-profond);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gris-tres-clair);
}

.legal-section p {
    font-size: 0.88rem;
    color: var(--gris-anthracite);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.legal-section ul {
    margin: 0.5rem 0 0.75rem 1.25rem;
}

.legal-section li {
    font-size: 0.85rem;
    color: var(--gris-anthracite);
    line-height: 1.7;
    margin-bottom: 0.4rem;
}

.legal-section code {
    font-size: 0.82rem;
    background: var(--gris-tres-clair);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--bleu-moyen);
}

/* ─── Legal info grid ─── */
.legal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.75rem 0;
    padding: 1rem;
    background: var(--gris-tres-clair);
    border-radius: var(--radius-md);
}

.legal-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-info__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gris-clair);
}

.legal-info__value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gris-anthracite);
}

.legal-info__value a {
    color: var(--accent);
}

/* ─── Legal data table ─── */
.legal-table-wrap {
    overflow-x: auto;
    margin: 0.75rem 0;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.06);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.legal-table thead {
    background: var(--gris-tres-clair);
}

.legal-table th {
    text-align: left;
    padding: 0.65rem 0.85rem;
    font-weight: 600;
    color: var(--bleu-profond);
    white-space: nowrap;
}

.legal-table td {
    padding: 0.65rem 0.85rem;
    color: var(--gris-anthracite);
    border-top: 1px solid rgba(0,0,0,0.04);
    line-height: 1.5;
}

.legal-table tbody tr:hover {
    background: rgba(74, 144, 217, 0.02);
}

/* ─── Rights grid ─── */
.legal-rights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0;
}

.legal-right {
    display: flex;
    gap: 0.65rem;
    padding: 0.85rem;
    background: var(--blanc);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-md);
}

.legal-right__icon {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
    color: var(--accent);
    flex-shrink: 0;
}

.legal-right strong {
    font-size: 0.82rem;
    color: var(--bleu-profond);
    display: block;
    margin-bottom: 2px;
}

.legal-right p {
    font-size: 0.78rem;
    color: var(--gris-moyen);
    line-height: 1.5;
    margin: 0;
}

/* ─── Callout box ─── */
.legal-callout {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(74, 144, 217, 0.05);
    border: 1px solid rgba(74, 144, 217, 0.15);
    border-radius: var(--radius-md);
    margin-top: 1.25rem;
}

.legal-callout > svg {
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}

.legal-callout strong {
    color: var(--bleu-profond);
}

.legal-callout div {
    font-size: 0.82rem;
    color: var(--gris-anthracite);
    line-height: 1.6;
}

.legal-callout a {
    color: var(--accent);
    font-weight: 500;
}

/* ─── Updated timestamp ─── */
.legal-updated {
    font-size: 0.75rem;
    color: var(--gris-clair);
    text-align: right;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gris-tres-clair);
}

/* ─── Legal pages responsive ─── */
@media (max-width: 768px) {
    .legal-info-grid {
        grid-template-columns: 1fr;
    }

    .legal-rights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .legal-page__header h1 {
        font-size: 1.3rem;
    }

    .legal-table {
        font-size: 0.75rem;
    }

    .legal-table th,
    .legal-table td {
        padding: 0.5rem 0.6rem;
    }

    .legal-callout {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════
   CONFORMITÉ — Page détail audit
   ═══════════════════════════════════════════════ */

.conf-back {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--gris-moyen);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    transition: color 0.2s;
}
.conf-back:hover { color: var(--bleu-principal); }

/* Aucun audit */
.conf-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gris-moyen);
}
.conf-empty h2 {
    margin: 1rem 0 0.5rem;
    font-size: 1.15rem;
    color: var(--gris-fonce);
}
.conf-empty p {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
}

/* En-tête score global */
.conf-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    box-shadow: var(--ombre-legere);
    border: 1px solid rgba(0,0,0,0.06);
    margin-bottom: 2rem;
    gap: 2rem;
}
.conf-hero__info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gris-fonce);
    margin: 0 0 0.25rem;
}
.conf-hero__structure {
    font-size: 0.95rem;
    color: var(--gris-moyen);
    margin: 0 0 0.15rem;
}
.conf-hero__date {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0 0 0.75rem;
}
.conf-hero__level {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
}
.conf-hero__ring {
    position: relative;
    flex-shrink: 0;
}
.conf-hero__ring-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.conf-hero__ring-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gris-fonce);
    line-height: 1;
}
.conf-hero__ring-unit {
    font-size: 0.75rem;
    color: var(--gris-moyen);
}

/* Titre section */
.conf-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gris-fonce);
    margin: 0 0 1rem;
}

/* Grille sections */
.conf-sections {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 2rem;
}
.conf-section {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--blanc);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.conf-section__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-radius: var(--radius-md);
    flex-shrink: 0;
    color: var(--gris-moyen);
}
.conf-section__body {
    flex: 1;
    min-width: 0;
}
.conf-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}
.conf-section__name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gris-fonce);
}
.conf-section__score {
    font-size: 0.88rem;
    font-weight: 700;
}
.conf-section__bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}
.conf-section__bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Synthèse & Recommandations */
.conf-summary,
.conf-recommendations {
    background: var(--blanc);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1rem;
}
.conf-summary h3,
.conf-recommendations h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gris-fonce);
    margin: 0 0 0.6rem;
}
.conf-summary p,
.conf-recommendations p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--gris-moyen);
    margin: 0;
}
.conf-recommendations {
    border-left: 3px solid var(--bleu-principal);
}

/* Note de contact */
.conf-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--gris-moyen);
    margin: 1.5rem 0 0;
}
.conf-contact svg {
    flex-shrink: 0;
    color: var(--bleu-principal);
}

/* ════════════════════════════════════════════
   CARTES DE RISQUE — 4 axes
   ════════════════════════════════════════════ */
.conf-risks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.conf-risk-card {
    background: var(--blanc);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.conf-risk-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.conf-risk-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.conf-risk-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.conf-risk-card__title {
    flex: 1;
    min-width: 0;
}

.conf-risk-card__name {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gris-fonce);
    line-height: 1.3;
}

.conf-risk-card__level {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.conf-risk-card__gauge {
    position: relative;
    flex-shrink: 0;
}

.conf-risk-card__gauge-val {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.conf-risk-card__desc {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--gris-moyen);
    margin: 0 0 0.75rem;
}

.conf-risk-card__bar {
    height: 5px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.conf-risk-card__bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

/* Responsive conformité */
@media (max-width: 640px) {
    .conf-hero {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1.25rem;
    }
    .conf-hero__info { order: 2; }
    .conf-hero__ring { order: 1; }
    .conf-hero__level { justify-content: center; }
    .conf-section { padding: 0.85rem 1rem; }
    .conf-risks { grid-template-columns: 1fr; }
    .conf-risk-card { padding: 1rem 1.15rem; }
    .conf-risk-card__gauge svg { width: 48px; height: 48px; }
    .conf-synthesis { flex-direction: column; }
}

/* ─── Synthèse globale ─── */
.conf-synthesis {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0f6ff 0%, #f8fafd 100%);
    border: 1px solid rgba(74, 144, 217, 0.15);
    border-radius: var(--radius-lg);
    margin-top: 1.5rem;
}
.conf-synthesis__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(74, 144, 217, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent);
}
.conf-synthesis__body { flex: 1; }
.conf-synthesis__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bleu-profond);
    margin-bottom: 0.4rem;
}
.conf-synthesis__text {
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--gris-anthracite);
}
.conf-synthesis__text strong {
    color: var(--bleu-profond);
    font-weight: 600;
}

/* ════════════════════════════════════════════
   HISTORIQUE DES AUDITS
   ════════════════════════════════════════════ */
.conf-history {
    margin-top: 1rem;
}

.conf-history .conf-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conf-history .conf-section-title svg {
    color: var(--gris-moyen);
}

.conf-history__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.conf-history__item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    background: var(--blanc);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.06);
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.conf-history__item:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.07);
    transform: translateX(4px);
    border-color: rgba(0,0,0,0.1);
}

.conf-history__item--active {
    border-color: var(--bleu-principal);
    background: #f0f6ff;
}

.conf-history__item-score {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 60px;
    text-align: center;
    flex-shrink: 0;
}

.conf-history__item-score small {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.6;
}

.conf-history__item-info {
    flex: 1;
    min-width: 0;
}

.conf-history__item-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gris-fonce);
}

.conf-history__badge {
    font-size: 0.68rem;
    font-weight: 600;
    background: var(--bleu-principal);
    color: var(--blanc);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.conf-history__item-date {
    display: block;
    font-size: 0.78rem;
    color: var(--gris-moyen);
    margin-top: 0.15rem;
}

.conf-history__item-bar {
    width: 80px;
    height: 5px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.conf-history__item-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

@media (max-width: 640px) {
    .conf-history__item { flex-wrap: wrap; gap: 0.5rem; }
    .conf-history__item-bar { width: 100%; order: 3; }
}
