/* carte_elu — page de liste (/admin, réservée aux admins) —
   reprend le style de la carte de visite elle-même (bandeau, médaillon photo,
   boutons pilule) — demande user 10/09/2026, plutôt qu'un tableau/formulaire
   générique. */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.deshaies-carte-elu-page {
    margin: 0;
    padding: 24px 16px;
    background: #f4f1ec;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.mod-deshaies-carte-elu-list {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
}

.deshaies-carte-elu-list-heading {
    margin: 0 0 16px;
    color: #1c1c1c;
}

.deshaies-carte-elu-list-empty {
    color: rgba(0, 0, 0, 0.6);
}

.deshaies-carte-elu-list-flash {
    padding: 10px 14px;
    margin: 0 0 16px;
    border-radius: 8px;
    background: #e4f3ea;
    color: #0b6e4f;
    font-size: 0.9rem;
}

.deshaies-carte-elu-list-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1080px) {
    .deshaies-carte-elu-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 820px) {
    .deshaies-carte-elu-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .deshaies-carte-elu-list-grid {
        grid-template-columns: 1fr;
    }
}

.deshaies-carte-elu-list-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.deshaies-carte-elu-list-card-band {
    height: 48px;
    background: #0b6e4f;
}

.deshaies-carte-elu-list-card-photo {
    box-sizing: border-box;
    width: 76px;
    height: 76px;
    margin: -38px auto 0;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background: #0b6e4f;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.deshaies-carte-elu-list-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.deshaies-carte-elu-list-card-photo-placeholder {
    font-size: 28px;
    color: #ffffff;
    opacity: 0.85;
}

.deshaies-carte-elu-list-card-body {
    padding: 10px 16px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.deshaies-carte-elu-list-card-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1c1c;
    line-height: 1.25;
}

.deshaies-carte-elu-list-namelink {
    color: inherit;
    text-decoration: none;
}

.deshaies-carte-elu-list-namelink:hover,
.deshaies-carte-elu-list-namelink:focus {
    text-decoration: underline;
    color: #0b6e4f;
}

.deshaies-carte-elu-list-card-role {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(0, 0, 0, 0.6);
}

.deshaies-carte-elu-list-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    background: #f4f1ec;
    color: #6b6b6b;
    white-space: nowrap;
}

.deshaies-carte-elu-list-badge--ok {
    background: #e4f3ea;
    color: #0b6e4f;
}

.deshaies-carte-elu-list-badge--warn {
    background: #fbeceb;
    color: #b23a3a;
}

.deshaies-carte-elu-list-edit-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #efece5;
}

.deshaies-carte-elu-list-edit-label {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.68rem;
    color: #6b6b6b;
    text-align: left;
}

.deshaies-carte-elu-list-edit-input {
    padding: 7px 9px;
    border: 1px solid #d8d4cb;
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    color: #1c1c1c;
    width: 100%;
    box-sizing: border-box;
}

.deshaies-carte-elu-list-edit-input:focus {
    outline: 2px solid #0b6e4f;
    outline-offset: 1px;
    border-color: #0b6e4f;
}

.deshaies-carte-elu-list-btn {
    display: inline-block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    border-radius: 999px;
    background: #0b6e4f;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
}

.deshaies-carte-elu-list-btn:hover,
.deshaies-carte-elu-list-btn:focus {
    background: color-mix(in srgb, #0b6e4f 85%, black);
}

.deshaies-carte-elu-list-btn--secondary {
    background: #ffffff;
    color: #0b6e4f;
    border: 1px solid #0b6e4f;
    padding: 7px 14px;
}

.deshaies-carte-elu-list-btn--secondary:hover,
.deshaies-carte-elu-list-btn--secondary:focus {
    background: #e4f3ea;
}

.deshaies-carte-elu-list-mail-form {
    width: 100%;
    padding-top: 8px;
}

.deshaies-carte-elu-list-nodata {
    margin: 4px 0 0;
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.72rem;
    font-style: italic;
}

/* App autonome : barre titre + déconnexion, page de connexion. */
.deshaies-carte-elu-list-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.deshaies-carte-elu-list-top .deshaies-carte-elu-list-heading {
    margin: 0;
}

.deshaies-carte-elu-list-btn--inline {
    width: auto;
}

.deshaies-carte-elu-login {
    max-width: 340px;
    margin: 10vh auto 0;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.deshaies-carte-elu-login .deshaies-carte-elu-list-edit-label {
    font-size: 0.8rem;
}

.deshaies-carte-elu-login-error {
    margin: 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fbeceb;
    color: #b23a3a;
    font-size: 0.85rem;
}
