/* Espaces personnels et connexion : pensés d'abord pour le téléphone */
:root { --barre-bas: 64px; }
body.app { --clair: #FBF8F1; color: #2F3A33; background: var(--clair); padding-bottom: calc(var(--barre-bas) + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { body.app { padding-bottom: 0; } }

.app-entete { background: linear-gradient(135deg, var(--vert-fonce), var(--vert)); color: #fff; }
.app-entete .etab { font-size: .85rem; opacity: .8; }
.app-entete h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.app-entete .avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; font-weight: 600; color: #fff; text-decoration: none; }

/* Navigation : barre en bas sur téléphone, onglets dans l'en-tête sur ordinateur */
.app-nav { display: flex; }
.app-nav a, .app-nav span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem .25rem; font-size: .72rem; color: #6b7a72; text-decoration: none; }
.app-nav i { font-size: 1.3rem; line-height: 1; }
.app-nav a.actif { color: var(--vert); font-weight: 600; }
.app-nav span.bientot { opacity: .45; }
.app-nav span.bientot small { font-size: .6rem; }
.app-nav-bas { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1030; background: #FFFDF8; border-top: 1px solid #E6DFCF; padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 768px) {
    .app-nav-bas { position: static; border: 0; background: transparent; gap: .25rem; flex-wrap: wrap; }
    .app-nav-bas a, .app-nav-bas span { flex: 0 0 auto; white-space: nowrap; padding: .45rem .9rem; flex-direction: row; justify-content: center; gap: .4rem; font-size: .9rem; color: rgba(255, 255, 255, .75); border-radius: .5rem; }
    .app-nav-bas a.actif { color: #fff; background: rgba(255, 255, 255, .15); }
    .app-nav-bas i { font-size: 1rem; }
}

.bloc { background: #FFFDF8; border: 1px solid #EEE7D7; border-radius: 1rem; box-shadow: 0 1px 6px rgba(0, 0, 0, .05); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.bloc h2 { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; }
.bloc-lien { display: block; color: inherit; text-decoration: none; transition: transform .15s; }
.bloc-lien:active { transform: scale(.98); }
.bloc-lien .chevron { color: #9aa79f; }
.pastille { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(0, 135, 81, .1); color: var(--vert); font-size: 1.25rem; flex-shrink: 0; }
.ligne { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid #f0f2f0; }
.ligne:first-of-type { border-top: 0; }
.ligne .meta { font-size: .82rem; color: #6b7a72; }
.badge-vert { background: rgba(0, 135, 81, .12); color: var(--vert-fonce); font-weight: 600; }
.bientot-carte { border: 1px dashed #cfd8d2; background: transparent; box-shadow: none; color: #6b7a72; }

/* Connexion */
/* Fond crème, comme le back-office */
.connexion { --clair: #FBF8F1; color: #2F3A33; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem 1rem;
    background: radial-gradient(circle at 85% 10%, rgba(252, 209, 22, .25), transparent 40%), radial-gradient(circle at 10% 95%, rgba(232, 17, 45, .15), transparent 35%), var(--clair); }
.connexion .carte-connexion { width: 100%; max-width: 420px; background: #FFFDF8; border-radius: 1.25rem; box-shadow: 0 8px 30px rgba(0, 0, 0, .08); overflow: hidden; }
.connexion .form-control { padding: .75rem .9rem; font-size: 1rem; }
.connexion .btn-lg { padding: .75rem; }
.nav-bureau { display: none; }
@media (min-width: 768px) { .nav-bureau { display: block; } .nav-mobile { display: none; } }

/* Compte à plusieurs profils : passer d'un espace à l'autre */
.choix-espace { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.choix-espace a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 500;
    text-decoration: none; color: rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .14); }
.choix-espace a:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.choix-espace a.actif { background: #FCD116; color: #3a3000; font-weight: 600; }

/* Cloche des notifications (partie 2.4) */
.app-entete .cloche { position: relative; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.2rem; text-decoration: none; background: rgba(255, 255, 255, .12); flex-shrink: 0; }
.app-entete .cloche:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.app-entete .pastille-notif { position: absolute; top: -2px; right: -2px; min-width: 19px; height: 19px; border-radius: 999px; background: #FCD116; color: #3a3000; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.app-nav .compteur { display: inline-block; min-width: 18px; border-radius: 999px; background: #FCD116; color: #3a3000; font-size: .66rem; font-weight: 700; padding: 0 5px; line-height: 16px; }

/* Onglet visible seulement sur tablette et ordinateur (barre du haut) */
@media (max-width: 767.98px) { .app-nav-bas a.bureau-seulement { display: none; } }
