:root {
    --primaire: #1f2937;
    --secondaire: #3b82f6;
    --fond: #f5f6f8;
    --texte: #1f2937;
    --texte-doux: #6b7280;
    --bordure: #e5e7eb;
    --danger: #dc2626;
    --succes: #16a34a;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--fond);
    color: var(--texte);
}

.page-centree {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.carte {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.04);
    padding: 32px;
}

.carte-large { max-width: 640px; }

.carte h1 {
    font-size: 22px;
    margin: 0 0 6px;
}

.carte .sous-titre {
    color: var(--texte-doux);
    font-size: 14px;
    margin: 0 0 24px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin: 16px 0 6px;
}

input[type=text], input[type=email], input[type=password], input[type=search] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

input:focus {
    outline: none;
    border-color: var(--secondaire);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    background: var(--primaire);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn:hover { opacity: .92; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-secondaire {
    background: #fff;
    color: var(--texte);
    border: 1px solid var(--bordure);
}

.lien { color: var(--secondaire); text-decoration: none; font-size: 14px; }
.lien:hover { text-decoration: underline; }

.pied { text-align: center; margin-top: 20px; font-size: 14px; color: var(--texte-doux); }

.alerte {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alerte-erreur { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alerte-succes { background: #f0fdf4; color: var(--succes); border: 1px solid #bbf7d0; }

.champ-hint { font-size: 12px; color: var(--texte-doux); margin-top: 4px; }

.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.badge-verif {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 6px;
}

.badge-verif.ok { background: #f0fdf4; color: var(--succes); }
.badge-verif.attente { background: #f9fafb; color: var(--texte-doux); }

/* ── Coquille applicative tenant ─────────────────────────────── */

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
    background: var(--primaire);
    color: #fff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-header .marque { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.app-header .marque img { height: 28px; width: 28px; border-radius: 6px; object-fit: cover; }
.app-header nav a { color: #fff; opacity: .85; text-decoration: none; font-size: 14px; margin-left: 18px; }
.app-header nav a:hover { opacity: 1; }

.app-content { flex: 1; padding: 32px 24px; max-width: 960px; margin: 0 auto; width: 100%; }

.grille-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }

.module-carte {
    background: #fff;
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 20px;
}

.module-carte h3 { margin: 0 0 6px; font-size: 16px; }
.module-carte p { margin: 0; font-size: 13px; color: var(--texte-doux); }
.module-carte .etat { display: inline-block; margin-top: 10px; font-size: 12px; padding: 3px 8px; border-radius: 100px; background: #f3f4f6; color: var(--texte-doux); }

.liste-espaces { list-style: none; padding: 0; margin: 0; }
.liste-espaces li { margin-bottom: 10px; }
.espace-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--bordure);
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: var(--texte);
    font-weight: 600;
}
.espace-btn:hover { border-color: var(--secondaire); }
.espace-btn .role { font-size: 12px; font-weight: 400; color: var(--texte-doux); }
