/* =============================================================================
   myEAF — Mise en page du PORTAIL PUBLIC.
   ========================================================================== */

body.public {
    background: var(--grad-app-bg);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Zone de contenu blanche (sous l'en-tête, découpe en biais via .page-body). */
.conteneur {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--sp-3) var(--sp-3) var(--sp-5);
}

/* Vue détail d'un menu */
.detail__titre { margin: var(--sp-2) 0; }
.detail__description { color: var(--text-muted); margin-top: 0; }

/* États transverses */
.etat { color: var(--text-muted); padding: var(--sp-3) 0; }
.etat--erreur { color: var(--danger-fort); }

@media (min-width: 600px) {
    .grille { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .entete__titre { font-size: 1.8rem; }
}

/* --- Portail de choix de classe (écran bloquant) -------------------------- */
.portail {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--grad-app-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-3);
    overflow-y: auto;
}
body.portail-ouvert { overflow: hidden; }

.portail__carte {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: var(--sp-4);
    width: 100%;
    max-width: 440px;
}
.portail__titre { color: var(--brand-1); margin-top: 0; }
.portail__intro { color: var(--text-muted); }
.portail__label {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    margin: var(--sp-3) 0;
    font-weight: 600;
}
.portail__select {
    padding: var(--sp-2);
    border-radius: var(--r-sm);
    border: 1px solid #d9d6e8;
    background: var(--surface);
    font: inherit;
    min-height: 44px;
}
.portail__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }

/* Choix de la classe en bulles cliquables */
.portail__bulles {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin: var(--sp-2) 0 var(--sp-3);
}
.portail__bulle {
    border: 2px solid var(--brand-1);
    background: var(--surface);
    color: var(--brand-1);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-pill);
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.portail__bulle:hover,
.portail__bulle:active {
    background: var(--grad-header);
    color: var(--text-on-brand);
    transform: translateY(-1px);
}
/* Classe protégée (accès par code) : liseré discret. */
.portail__bulle--protegee { border-style: dashed; }
