/* =========================
   Réglages généraux
========================= */

:root {
    --sidebar: #17213a;
    --sidebar-hover: #26365c;
    --primary: #4763e4;
    --background: #f4f6fb;
    --surface: #ffffff;
    --text: #172033;
    --muted: #7a8499;
    --border: #e8ebf2;
    --success: #238b5e;
    --danger: #c94a55;
    --shadow: 0 10px 30px rgba(33, 45, 75, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: #eef2f9;
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
}

/* =========================
   Structure principale
========================= */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.mobile-nav-toggle,
.mobile-nav-trigger {
    display: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 270px;
    height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #16223d 0%, #111a30 100%);
    color: white;
}

.main-content {
    position: relative;
    min-height: 100vh;
    width: calc(100% - 270px);
    margin-left: 270px;
    padding: 30px 34px 45px;
    overflow: hidden;
    background:
        radial-gradient(760px 460px at 100% -120px, color-mix(in srgb, var(--primary) 13%, transparent), transparent 70%),
        radial-gradient(540px 380px at 8% 102%, rgba(110, 132, 188, 0.09), transparent 72%),
        linear-gradient(135deg, #f8faff 0%, #f3f6fc 52%, #f8f9fd 100%);
}

.main-content::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(rgba(31, 49, 88, 0.075) 0.8px, transparent 0.8px);
    background-size: 22px 22px;
    content: "";
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 42%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 42%);
}

.main-content > * {
    position: relative;
    z-index: 1;
}

/* =========================
   Marque et navigation
========================= */

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    background: var(--primary);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 38%, transparent);
    font-size: 22px;
}

.brand h1 {
    font-size: 17px;
    line-height: 1.2;
}

.brand p,
.sidebar-user p {
    margin-top: 4px;
    color: #aeb8cf;
    font-size: 13px;
}

.sidebar-nav {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    padding: 16px 4px 10px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 39px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #d8deed;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: color-mix(in srgb, var(--primary) 23%, #27365b);
    color: white;
    transform: none;
}

.nav-link.active {
    box-shadow: inset 3px 0 0 var(--primary);
    font-weight: 700;
}

.nav-group-label {
    margin: 13px 10px 4px;
    color: #8290af;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-group-label:first-child {
    margin-top: 1px;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 9px 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-account {
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding: 4px 6px 3px;
}

.sidebar-logout {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 4px;
    color: #d8deed;
}

.sidebar-logout:hover {
    background: rgba(220, 78, 89, 0.18);
    color: #fff;
}

.user-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 50%;
    background: #eef1ff;
    color: var(--primary);
    font-weight: 700;
}

/* =========================
   Barre supérieure
========================= */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.topbar h2 {
    font-size: 28px;
}

.topbar > div:first-child > p {
    margin-top: 6px;
    color: var(--muted);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.page-header h1 {
    font-size: 34px;
}

.page-header p {
    margin-top: 6px;
    color: var(--muted);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.topbar-user > span {
    font-size: 20px;
}

.topbar-user p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

/* =========================
   Cartes statistiques
========================= */

.stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    min-height: 145px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card h2 {
    font-size: 31px;
}

.card p {
    margin-top: 7px;
    color: var(--muted);
    font-size: 14px;
}

/* =========================
   Grille du tableau de bord
========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 22px;
    align-items: start;
}

.tableau,
.activity {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-heading p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
}

.primary-btn {
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.primary-btn:hover {
    filter: brightness(0.94);
}

/* =========================
   Tableau
========================= */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 13px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f7f9fd;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

thead th:first-child {
    border-radius: 10px 0 0 10px;
}

thead th:last-child {
    border-radius: 0 10px 10px 0;
}

td {
    font-size: 14px;
}

tbody tr:hover {
    background: color-mix(in srgb, var(--primary) 5%, #fff);
}

/* =========================
   Activités récentes
========================= */

.activity h2 {
    margin-bottom: 20px;
}

.activity-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-item p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

/* =========================
   Bandeaux KRG des tableaux de bord
========================= */

.krg-island {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.1fr);
    min-height: 270px;
    overflow: hidden;
    border-radius: 28px;
    background: #111a30;
    box-shadow: 0 18px 38px rgba(23, 33, 58, 0.18);
    color: #fff;
}

.krg-island-image {
    width: 100%;
    height: 100%;
    min-height: 270px;
    object-fit: cover;
}

.krg-island-content {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    background: linear-gradient(120deg, #111a30 0%, #17213a 64%, #263d86 100%);
}

.krg-island-content::before {
    position: absolute;
    top: -52px;
    right: -50px;
    width: 170px;
    height: 170px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    content: "";
}

.krg-island-kicker {
    margin-bottom: 9px;
    color: #aebcff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.krg-island h2 {
    max-width: 390px;
    font-size: clamp(24px, 2.3vw, 32px);
    line-height: 1.12;
}

.krg-island-description {
    max-width: 440px;
    margin-top: 11px;
    color: #d5dbed;
    font-size: 14px;
    line-height: 1.5;
}

.krg-island-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.krg-island-details div {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
}

.krg-island-details span,
.krg-island-details strong {
    display: block;
}

.krg-island-details span {
    color: #c9d1e9;
    font-size: 11px;
}

.krg-island-details strong {
    margin-top: 5px;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.krg-island-tenant {
    max-width: 970px;
}

.krg-island-owner {
    min-height: 100%;
}

/* =========================
   Accueil propriétaire KRG
========================= */

.krg-hero {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    border-radius: 28px;
    background-image: linear-gradient(90deg, rgba(8, 17, 34, 0.96) 0%, rgba(12, 26, 53, 0.78) 42%, rgba(12, 26, 53, 0.12) 76%), url("images/krg-owner-dashboard-hero.png");
    background-position: center;
    background-size: cover;
    box-shadow: 0 18px 42px rgba(23, 33, 58, 0.18);
    color: #fff;
}

.krg-hero::after {
    position: absolute;
    right: -80px;
    bottom: -105px;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 50%;
    content: "";
}

.krg-hero-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
    padding: 52px;
}

.krg-hero-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #d9e0ff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.krg-hero-brand span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: #5672ff;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0;
}

.krg-hero-eyebrow {
    margin-top: 24px;
    color: #9dacff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.krg-hero h1 {
    max-width: 600px;
    margin-top: 10px;
    font-size: clamp(31px, 4vw, 48px);
    line-height: 1.04;
}

.krg-hero-description {
    max-width: 560px;
    margin-top: 15px;
    color: #d7def2;
    font-size: 16px;
    line-height: 1.55;
}

.krg-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.krg-hero-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.krg-hero-actions a:hover {
    transform: translateY(-2px);
}

.hero-action-primary {
    background: #fff;
    color: #182344;
}

.hero-action-secondary {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.hero-action-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
}

.krg-hero-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.krg-hero-summary span {
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.krg-dashboard-summary {
    margin: 32px 0 24px;
}

.krg-dashboard-summary .section-heading {
    margin-bottom: 16px;
}

.stats-krg {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    margin-bottom: 0;
}

.krg-stat {
    min-height: 148px;
    padding: 21px;
}

.krg-stat p {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.krg-stat h2 {
    margin-top: 14px;
    font-size: clamp(25px, 2.4vw, 34px);
}

.krg-stat small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.krg-stat-primary {
    border-color: #253b97;
    background: #172c78;
    color: #fff;
}

.krg-stat-primary p,
.krg-stat-primary small {
    color: #cdd5ff;
}

.dashboard-rooms {
    margin-top: 0;
}

/* =========================
   Accueil locataire
========================= */

.tenant-dashboard {
    position: relative;
    min-height: 325px;
    overflow: hidden;
    border-radius: 26px;
    background: #17213a;
    box-shadow: 0 16px 34px rgba(23, 33, 58, 0.16);
    color: #fff;
}

.tenant-dashboard-image {
    position: absolute;
    inset: 0 0 0 auto;
    width: 58%;
    height: 100%;
    opacity: 0.48;
    object-fit: cover;
}

.tenant-dashboard::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #17213a 0%, rgba(23, 33, 58, 0.94) 41%, rgba(23, 33, 58, 0.36) 100%);
    content: "";
}

.tenant-dashboard-copy,
.tenant-payment-spot {
    position: relative;
    z-index: 1;
}

.tenant-dashboard-copy {
    align-self: center;
    max-width: 680px;
    padding: 58px 40px;
}

.tenant-dashboard-kicker {
    color: #aebcff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tenant-dashboard h1 {
    margin-top: 10px;
    font-size: clamp(29px, 3.4vw, 42px);
    line-height: 1.08;
}

.tenant-dashboard h1 span {
    color: #9dacff;
    font-weight: 400;
}

.tenant-dashboard-description {
    max-width: 440px;
    margin-top: 12px;
    color: #d5dbed;
    font-size: 14px;
    line-height: 1.55;
}

.tenant-dashboard-details {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 25px;
}

.tenant-dashboard-details span,
.tenant-dashboard-details strong {
    display: block;
}

.tenant-dashboard-details span {
    color: #bfc9e7;
    font-size: 12px;
}

.tenant-dashboard-details strong {
    margin-top: 5px;
    font-size: 16px;
}

.tenant-payment-spot {
    align-self: center;
    margin: 25px 28px 25px 0;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    background: rgba(10, 18, 38, 0.72);
    backdrop-filter: blur(9px);
}

.tenant-payment-spot > p {
    color: #cbd4ec;
    font-size: 13px;
    font-weight: 600;
}

.tenant-payment-spot > strong {
    display: block;
    margin-top: 8px;
    font-size: 27px;
}

.tenant-payment-spot > span {
    display: block;
    margin: 7px 0 18px;
    color: #d5dbed;
    font-size: 13px;
}

.tenant-payment-spot .btn-primary {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.tenant-text-link {
    display: inline-block;
    margin-top: 5px;
    color: #cdd7ff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.tenant-text-link:hover {
    color: #fff;
    text-decoration: underline;
}

.tenant-follow-up {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.tenant-follow-up-card {
    display: block;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tenant-follow-up-card:hover {
    transform: translateY(-3px);
    border-color: #b9c6ff;
}

.tenant-follow-up-card span,
.tenant-follow-up-card strong,
.tenant-follow-up-card small {
    display: block;
}

.tenant-follow-up-card span,
.tenant-follow-up-card small {
    color: var(--muted);
    font-size: 12px;
}

.tenant-follow-up-card strong {
    margin: 7px 0;
    font-size: 16px;
}

.tenant-payment-card form {
    margin-top: 14px;
}

.tenant-payment-card .btn-primary {
    width: 100%;
    border: 0;
    cursor: pointer;
}

/* =========================
   Adaptation petits écrans
========================= */

@media (max-width: 1250px) {
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-krg {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sidebar {
        z-index: 30;
        width: min(86vw, 320px);
        padding: 22px 16px 16px;
        transform: translateX(-105%);
        box-shadow: 20px 0 44px rgba(14, 25, 51, 0.25);
        transition: transform 0.25s ease;
    }

    .app-layout {
        display: block;
    }

    .mobile-nav-toggle {
        position: fixed;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .mobile-nav-trigger {
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 35;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 9px 13px;
        border: 1px solid rgba(23, 33, 58, 0.1);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 8px 24px rgba(23, 33, 58, 0.14);
        color: var(--text);
        cursor: pointer;
        font-size: 13px;
        font-weight: 800;
        backdrop-filter: blur(10px);
    }

    .mobile-nav-trigger span {
        color: var(--primary);
        font-size: 18px;
        line-height: 1;
    }

    .mobile-nav-toggle:checked ~ .app-layout .sidebar {
        transform: translateX(0);
    }

    .mobile-nav-toggle:checked + .mobile-nav-trigger {
        background: var(--primary);
        color: #fff;
    }

    .mobile-nav-toggle:checked + .mobile-nav-trigger span {
        color: #fff;
    }

    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 78px 20px 32px;
    }

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

    .krg-island-owner {
        min-height: 270px;
    }

    .krg-hero-content {
        padding: 40px;
    }

    .tenant-dashboard-image {
        width: 100%;
    }
}

@media (max-width: 650px) {
    body {
        font-size: 15px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .card,
    .tableau,
    .activity {
        padding: 18px;
        border-radius: 16px;
    }

    th,
    td {
        padding: 12px 10px;
        font-size: 13px;
        white-space: nowrap;
    }

    .topbar,
    .page-header,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .tableau {
        overflow-x: auto;
    }

    /* Keep the dashboard heading fixed while the wide data table scrolls. */
    .dashboard-rooms {
        overflow: hidden;
    }

    .dashboard-rooms .table-scroll {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-rooms table {
        min-width: 680px;
    }

    .krg-island {
        grid-template-columns: 1fr;
    }

    .krg-island-image {
        min-height: 150px;
        max-height: 180px;
    }

    .krg-island-content {
        padding: 24px;
    }

    .krg-hero {
        min-height: 430px;
        background-position: 62% center;
    }

    .krg-hero-content {
        padding: 38px 22px 28px;
    }

    .krg-hero h1 {
        font-size: 32px;
    }

    .krg-hero-summary {
        gap: 7px;
    }

    .krg-hero-summary span {
        font-size: 12px;
    }

    .krg-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .krg-hero-actions a {
        justify-content: center;
    }

    .stats-krg {
        grid-template-columns: 1fr;
    }

    .tenant-dashboard-copy {
        padding: 30px 25px;
    }

    .tenant-follow-up {
        grid-template-columns: 1fr;
    }
}
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-form {
    display: inline;
}

.btn-edit,
.btn-delete {
    border: 0;
    border-radius: 8px;
    padding: 9px 12px;
    font-weight: 600;
}

.btn-edit {
    background: #edf0f7;
    color: #7a8499;
}

.btn-edit:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-delete {
    background: #fdebec;
    color: #c94a55;
    cursor: pointer;
}

.btn-delete:hover {
    background: #f9d7da;
}
.section-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
}

.section-actions{
    display:flex;
    gap:12px;
}

.tenant-actions {
    flex-wrap: wrap;
}

.btn-primary{
    background:#3f5efb;
    color:white;
    text-decoration:none;
    padding:12px 22px;
    border-radius:12px;
    font-weight:600;
    transition:.2s;
}

.btn-primary:hover{
    background:#2d4df0;
}
/* =========================
   Formulaire — Ajouter un bail
========================= */

.form-bail {
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(71, 99, 228, 0.12);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #cfd5e3;
}

.tableau .section-heading {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(232, 235, 242, 0.85);
}

.tableau .section-heading h2 {
    font-size: 23px;
    letter-spacing: -0.02em;
}

.btn-primary,
.primary-btn,
.btn-form-primary {
    box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 24%, transparent);
}

.btn-primary:hover,
.primary-btn:hover,
.btn-form-primary:hover {
    transform: translateY(-1px);
}

.btn-edit,
.btn-delete {
    transition: transform 0.18s ease, background 0.18s ease;
}

.btn-edit:hover,
.btn-delete:hover {
    transform: translateY(-1px);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.management-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.3fr);
    gap: 22px;
    align-items: start;
}

.section-intro,
.empty-state {
    margin: 8px 0 20px;
    color: var(--muted);
    line-height: 1.5;
}

.stack-list {
    display: grid;
    gap: 12px;
}

.record-card {
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fbfcff;
}

.record-card h3 {
    margin: 5px 0 8px;
    font-size: 16px;
}

.record-card p {
    color: var(--muted);
    line-height: 1.5;
}

.record-meta {
    color: var(--muted);
    font-size: 12px;
}

.record-header,
.status-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-form {
    justify-content: flex-start;
    margin-top: 15px;
}

.status-form select {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font-family: inherit;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-nouvelle { background: #fff4db; color: #9a6700; }
.status-en_cours { background: #e9efff; color: #3155b7; }
.status-terminee,
.status-active { background: #e5f6ed; color: #1b7047; }
.status-inactive { background: #fdebec; color: #a83743; }

.record-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.urgency {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.urgency-normale { background: #edf0f7; color: #5e6a81; }
.urgency-urgente { background: #fff0d8; color: #a35e00; }
.urgency-critique { background: #fde4e6; color: #b3293c; }

.payment-panel { margin-bottom: 22px; }
.payment-cancelled { opacity: 0.58; }
.payment-cancelled:hover { opacity: 0.82; }
.payment-due { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.payment-due strong { font-size: 25px; }
.payment-due span, .payment-help, .payment-notice { color: var(--muted); }
.payment-form fieldset { margin: 0 0 20px; padding: 0; border: 0; }
.payment-form legend { margin-bottom: 10px; font-weight: 700; }
.payment-methods { display: flex; flex-wrap: wrap; gap: 10px; }
.payment-method { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; font-size: 14px; }
.payment-method:has(input:checked) { border-color: var(--primary); background: #eef1ff; }
.is-unavailable .payment-method { color: var(--muted); background: #f8f9fc; }
.payment-help { margin-top: 12px; font-size: 13px; }
.payment-notice { margin-bottom: 18px; line-height: 1.5; }
.inline-form { display: inline; }

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.btn-form-primary {
    border: 0;
    border-radius: 10px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-form-primary:hover {
    background: #3652d8;
    transform: translateY(-1px);
}

.btn-form-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    background: #edf0f7;
    color: #667085;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-form-secondary:hover {
    background: #e2e6ef;
}

/* =========================
   Responsive — formulaire
========================= */

@media (max-width: 700px) {

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

    .form-group.full-width {
        grid-column: auto;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-form-primary,
    .btn-form-secondary {
        width: 100%;
    }

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

    .record-header,
    .status-form {
        align-items: flex-start;
        flex-direction: column;
    }
}
/* ============================================================
   FORMULAIRE DE BAIL
============================================================ */

.bail-formulaire {
    width: 100%;
}

/* =========================
   Sections du bail
========================= */

.bail-section {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.bail-section:first-of-type {
    padding-top: 5px;
}

.bail-section:last-of-type {
    border-bottom: none;
}

/* =========================
   Titre des sections
========================= */

.bail-section-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.bail-section-title > span {
    display: grid;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 10px;
    background: #edf0ff;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.bail-section-title h3 {
    font-size: 17px;
    line-height: 1.3;
}

.bail-section-title p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* =========================
   Grille des champs
========================= */

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

/* =========================
   Champs
========================= */

.bail-formulaire .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bail-formulaire .form-group label {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.bail-formulaire .form-group input,
.bail-formulaire .form-group select {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

.bail-formulaire .form-group input::placeholder {
    color: #a4adbd;
}

.bail-formulaire .form-group input:hover,
.bail-formulaire .form-group select:hover {
    border-color: #cfd5e3;
}

.bail-formulaire .form-group input:focus,
.bail-formulaire .form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(71, 99, 228, 0.12);
}

/* =========================
   Montant avec symbole $
========================= */

.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-symbol input {
    padding-right: 40px !important;
}

.input-with-symbol > span {
    position: absolute;
    right: 14px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

/* =========================
   Confirmation
========================= */

.bail-confirmation {
    padding-bottom: 10px;
}

.confirmation-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #dcefe5;
    border-radius: 12px;
    background: #f5fbf7;
}

.confirmation-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 50%;
    background: #e0f3e8;
    color: var(--success);
    font-size: 18px;
    font-weight: 700;
}

.confirmation-box strong {
    color: var(--text);
    font-size: 14px;
}

.confirmation-box p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* =========================
   Boutons du formulaire
========================= */

.notice-panel {
    margin: 20px 0;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, white);
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary) 7%, white);
}

.notice-panel strong {
    color: var(--text);
}

.notice-panel p {
    margin: 6px 0 14px;
    color: var(--muted);
    line-height: 1.5;
}

.bail-formulaire .form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.bail-formulaire .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.bail-formulaire .btn-primary:hover {
    background: #3652d8;
    transform: translateY(-1px);
}

.bail-formulaire .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 12px 20px;
    background: #edf0f7;
    color: #667085;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
}

.bail-formulaire .btn-secondary:hover {
    background: #e2e6ef;
}

/* =========================
   Responsive
========================= */

@media (max-width: 700px) {

    .bail-formulaire .form-grid {
        grid-template-columns: 1fr;
    }

    .bail-formulaire .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .bail-formulaire .btn-primary,
    .bail-formulaire .btn-secondary {
        width: 100%;
    }
}
/* ============================================================
   IDENTIFICATION DES PARTIES
============================================================ */

.party-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafbfe;
}

.party-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.party-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: #edf0ff;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.party-card-header h4 {
    font-size: 15px;
}

.party-card-header p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.party-information {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.party-information > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.info-label {
    color: var(--muted);
    font-size: 12px;
}

.party-information strong {
    color: var(--text);
    font-size: 14px;
}
/* ============================================================
   DESCRIPTION DU LOGEMENT
============================================================ */

.readonly-field {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8f9fc;
    color: var(--muted);
    font-size: 14px;
}

.property-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.property-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafbfe;
}

.property-info-label {
    color: var(--muted);
    font-size: 12px;
}

.property-info-item strong {
    font-size: 14px;
    color: var(--text);
}

@media (max-width: 650px) {
    .property-info {
        grid-template-columns: 1fr;
    }
}
/* ============================================================
   DURÉE DU BAIL
============================================================ */

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.lease-duration-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.duration-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafbfe;
}

.duration-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 10px;
    background: #edf0ff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.duration-item > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.duration-label {
    color: var(--muted);
    font-size: 12px;
}

.duration-item strong {
    font-size: 14px;
    color: var(--text);
}

@media (max-width: 650px) {
    .lease-duration-info {
        grid-template-columns: 1fr;
    }
}
/* ============================================================
   LOYER ET CONDITIONS
============================================================ */

.input-with-symbol {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-symbol input {
    width: 100%;
    padding-right: 45px;
}

.input-with-symbol span {
    position: absolute;
    right: 15px;
    color: var(--muted);
    font-weight: 600;
}

.conditions-box {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafbfe;
}

.conditions-header {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}

.conditions-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 10px;
    background: #edf0ff;
    color: var(--primary);
    font-weight: 700;
}

.conditions-header h4 {
    font-size: 15px;
}

.conditions-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.condition-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: white;
}

.condition-item span {
    color: var(--muted);
    font-size: 12px;
}

.condition-item strong {
    color: var(--text);
    font-size: 13px;
}

@media (max-width: 1000px) {
    .conditions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .conditions-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================================================
   CONFIRMATION DU BAIL
============================================================ */

.bail-confirmation {
    margin-bottom: 24px;
}

.confirmation-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border: 1px solid #dce5ff;
    border-radius: 14px;
    background: #f7f8ff;
}

.confirmation-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 50%;
    background: #e8edff;
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
}

.confirmation-content strong {
    font-size: 14px;
}

.confirmation-content p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.confirmation-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.confirmation-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.confirmation-check label {
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
}


/* ============================================================
   BOUTONS DU FORMULAIRE
============================================================ */

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.btn-secondary:hover {
    background: #f4f6fb;
}

.form-actions .btn-primary {
    border: 0;
    cursor: pointer;
}

@media (max-width: 650px) {

    .confirmation-box {
        align-items: flex-start;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .btn-secondary,
    .form-actions .btn-primary {
        width: 100%;
        text-align: center;
    }
}


/* ============================================================
   ACTIONS DES BAUX + PDF
============================================================ */

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.inline-form {
    display: inline;
}

.btn-pdf,
.btn-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.btn-pdf {
    background: #eef2ff;
    color: #3f5efb;
}

.btn-pdf:hover {
    background: #dfe6ff;
}

.btn-download {
    background: #edf8f2;
    color: #238b5e;
}

.btn-download:hover {
    background: #dff2e8;
}

/* ============================================================
   RÈGLEMENTS
============================================================ */

.reglements-page {
    width: 100%;
}

.reglements-notice {
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid #dfe6ff;
    border-radius: 14px;
    background: #f5f7ff;
}

.reglements-notice strong {
    color: var(--text);
}

.reglements-notice p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 14px;
}

.reglements-list {
    display: grid;
    gap: 12px;
}

.reglement-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 15px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.reglement-number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #edf0ff;
    color: var(--primary);
    font-weight: 700;
}

.reglement-card h3 {
    font-size: 15px;
}

.reglement-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.reglement-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.rule-category {
    display: inline-block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.reglement-inactif {
    opacity: .66;
    background: #fbfbfc;
}

/* ============================================================
   MON COMPTE
============================================================ */

.account-security-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 980px;
    margin: 0 0 20px;
    padding: 18px 20px;
    border: 1px solid #dce5ff;
    border-radius: 16px;
    background: #f5f7ff;
}

.account-security-icon {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}

.account-security-note strong {
    color: var(--text);
}

.account-security-note p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.account-form {
    max-width: 980px;
}

.account-section {
    margin-bottom: 18px;
}

.account-section .section-heading {
    margin-bottom: 18px;
}

.account-section label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.account-section small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.account-password-grid {
    margin-top: 22px;
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 98px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 7px;
    padding: 6px 9px;
    background: #eef1fb;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.password-toggle:hover {
    background: #dfe6ff;
}

.account-actions {
    justify-content: flex-end;
    margin-top: 6px;
}

/* ============================================================
   IDENTITÉ D’ORGANISATION
============================================================ */

.organisation-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 980px;
    margin-bottom: 20px;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(115deg, var(--organisation-color), #152244);
    color: #fff;
    box-shadow: 0 12px 28px rgba(25, 39, 77, .17);
}

.organisation-mark {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 15px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.organisation-preview span,
.organisation-preview small {
    display: block;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}

.organisation-preview strong {
    display: block;
    margin: 3px 0;
    font-size: 21px;
}

.organisation-form {
    max-width: 980px;
}

.organisation-form .form-grid > label,
.organisation-form > label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.organisation-form input:not([type="color"]),
.organisation-form textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 400;
}

.organisation-form textarea {
    min-height: 92px;
    resize: vertical;
}

.organisation-form input:focus,
.organisation-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(71, 99, 228, .12);
}

.color-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.color-field input[type="color"] {
    width: 48px;
    height: 38px;
    padding: 3px;
    cursor: pointer;
}

/* ============================================================
   CONSOLE DE PLATEFORME SAAS
============================================================ */

.platform-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 24px;
}

.platform-stats article {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(32, 47, 88, .05);
}

.platform-stats span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.platform-stats strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 30px;
}

.platform-form-heading {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.creation-confirmation {
    max-width: 760px;
}

.creation-confirmation > p {
    margin: 8px 0;
    color: var(--muted);
}

.creation-confirmation h2 {
    margin-top: 26px;
}

.creation-confirmation code {
    padding: 4px 7px;
    border-radius: 6px;
    background: #f0f3fa;
    color: var(--text);
    font-size: 14px;
}

@media (max-width: 900px) {
    .platform-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .platform-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .account-security-note {
        padding: 15px;
    }

    .account-actions .btn-primary {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .actions a,
    .actions form,
    .actions button {
        width: 100%;
    }
}

.btn-rules {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: #fff7e6;
    color: #9a6700;
}

.btn-rules:hover {
    background: #ffefc7;
}
/* ============================================================
   PAGE DE CONNEXION — KABA REALTY GROUP
============================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;

    background:
        radial-gradient(
            circle at top right,
            rgba(92, 117, 255, 0.45),
            transparent 40%
        ),
        linear-gradient(
            135deg,
            #17213a 0%,
            #2f438d 50%,
            #4763e4 100%
        );
}

.login-card {
    width: 100%;
    max-width: 470px;
    padding: 48px 46px;

    background: #ffffff;
    border-radius: 24px;

    box-shadow:
        0 25px 70px rgba(10, 20, 50, 0.28);

    text-align: center;
}

/* Logo */

.login-logo {
    width: 88px;
    height: 88px;

    margin: 0 auto 24px;

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

    border-radius: 22px;

    background: #4763e4;
    color: white;

    font-size: 25px;
    font-weight: 800;
    line-height: 1.05;

    box-shadow:
        0 12px 30px rgba(71, 99, 228, 0.30);
}

.login-card h1 {
    margin-bottom: 8px;

    color: #172033;
    font-size: 29px;
    font-weight: 750;
}

.login-subtitle {
    margin-bottom: 34px;

    color: #7a8499;
    font-size: 14px;
}

/* Formulaire */

.login-form {
    text-align: left;
}

.login-group {
    margin-bottom: 20px;
}

.login-group label {
    display: block;
    margin-bottom: 8px;

    color: #172033;
    font-size: 14px;
    font-weight: 650;
}

.login-group input {
    width: 100%;
    height: 52px;

    padding: 0 16px;

    border: 1px solid #e1e5ee;
    border-radius: 12px;

    background: #f9fafc;
    color: #172033;

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition: 0.2s ease;
}

.login-group input::placeholder {
    color: #a4adbd;
}

.login-group input:hover {
    border-color: #cbd2df;
}

.login-group input:focus {
    border-color: #4763e4;
    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(71, 99, 228, 0.12);
}

/* Bouton */

.login-button {
    width: 100%;
    height: 52px;

    margin-top: 8px;

    border: none;
    border-radius: 12px;

    background: #4763e4;
    color: white;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s ease;
}

.login-button:hover {
    background: #3652d8;
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px rgba(71, 99, 228, 0.25);
}

.login-button:active {
    transform: translateY(0);
}

/* Message d'erreur */

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;

    border: 1px solid #f2c8cc;
    border-radius: 10px;

    background: #fff4f5;
    color: #c94a55;

    font-size: 13px;
    text-align: left;
}

/* Pied de connexion */

.login-footer {
    margin-top: 28px;

    color: #9aa3b5;
    font-size: 12px;
}

/* Mobile */

@media (max-width: 600px) {

    .login-page {
        padding: 20px;
    }

    .login-card {
        padding: 38px 25px;
        border-radius: 20px;
    }

    .login-card h1 {
        font-size: 25px;
    }

    .login-logo {
        width: 78px;
        height: 78px;
    }
}
