/* =========================================================
   Administration — styles additionnels (utilise style.css)
   ========================================================= */

.admin-body { background: var(--gray-light); padding-bottom: 80px; }

/* ---------- LOGIN ---------- */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 163, 224, 0.14), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(115, 201, 45, 0.12), transparent 45%),
        var(--gray-light);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: 40px 36px;
    width: 100%;
    max-width: 360px;
    text-align: center;
}

.login-icon {
    font-size: 34px;
    color: var(--blue);
    margin-bottom: 12px;
}

.login-card h1 { font-size: 22px; margin: 0 0 4px; }
.login-sub { color: var(--gray); font-size: 13px; margin: 0 0 24px; }
.login-card form { text-align: left; }
.login-card label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.login-card input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-family: var(--font);
    font-size: 14px;
}

/* ---------- HEADER / TABS ---------- */

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 16px;
    color: var(--blue-dark);
}

.admin-header-right { display: flex; gap: 8px; }

.admin-tabs {
    display: flex;
    gap: 4px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-border);
    padding: 0 20px;
    overflow-x: auto;
    position: sticky;
    top: 57px;
    z-index: 40;
}

.tab-btn {
    background: none;
    border: none;
    padding: 14px 16px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active { color: var(--blue-dark); border-bottom-color: var(--blue); font-weight: bold; }
.tab-btn:hover { color: var(--blue-dark); }

.admin-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px 20px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-up 0.3s ease both; }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.panel-header h2 { margin: 0; font-size: 20px; }
.mt-lg { margin-top: 36px; }
.mt-md { margin-top: 20px; }
.mt-sm { margin-top: 10px; }
.mb-md { margin-bottom: 20px; }

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

.menu-stats { max-width: 640px; }

.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.stat-card strong { display: block; font-size: 22px; color: var(--blue-dark); }
.stat-card span { font-size: 12px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px; }

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-border);
    font-size: 13px;
}

.stat-row strong { color: var(--blue-dark); }
.stat-detail { color: var(--gray); font-size: 12px; }

.phase-filter { display: flex; gap: 6px; }

.chip {
    border: 1px solid var(--gray-border);
    background: var(--white);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font);
    color: var(--gray);
}

.chip.active { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* ---------- LISTE PUBLICATIONS ---------- */

.admin-list { display: flex; flex-direction: column; gap: 12px; }

.admin-row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.admin-row[data-phase="pendant"] { border-left-color: var(--green); }
.admin-row[data-phase="apres"] { border-left-color: var(--gray); }

.admin-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
    flex-shrink: 0;
}

.admin-row-body { flex: 1; min-width: 0; }
.admin-row-title { font-weight: bold; margin: 0 0 2px; }
.admin-row-meta { font-size: 12px; color: var(--gray); display: flex; gap: 10px; flex-wrap: wrap; }
.admin-row-meta .scheduled { color: var(--blue-dark); }
.admin-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.icon-btn {
    background: var(--gray-light);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
    font-size: 13px;
}

.icon-btn:hover { background: var(--gray-border); }
.icon-btn.danger:hover { background: #FCE8E8; color: #B23A3A; }

.empty-hint {
    text-align: center;
    color: var(--gray);
    padding: 40px 20px;
    font-size: 14px;
}

.household-link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.household-link {
    background: var(--gray-light);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--blue-dark);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.household-pin {
    font-size: 12px;
    color: var(--gray);
}

.household-pin strong {
    color: var(--ink);
    letter-spacing: 2px;
}

.household-row .admin-row-icon { color: var(--green-dark); background: var(--green-tint); }

/* ---------- SEGMENTED CONTROL ---------- */

.segmented { display: flex; gap: 6px; flex-wrap: wrap; }

.seg-btn {
    flex: 1;
    min-width: 110px;
    border: 1px solid var(--gray-border);
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: var(--font);
    font-size: 13px;
    cursor: pointer;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.seg-btn.active { background: var(--blue-tint); border-color: var(--blue); color: var(--blue-dark); font-weight: bold; }

.thumbs-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

.thumb-chip {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.thumb-chip img { width: 100%; height: 100%; object-fit: cover; }

.thumb-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(20, 24, 26, 0.7);
    color: var(--white);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    cursor: pointer;
}

/* ---------- PLANNING (ADMIN) ---------- */

.planning-item-edit {
    display: grid;
    grid-template-columns: 90px 1fr 1fr auto;
    gap: 10px;
    align-items: start;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
}

.planning-item-edit input,
.planning-item-edit textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 13px;
}

@media (max-width: 720px) {
    .planning-item-edit { grid-template-columns: 1fr; }
}

/* ---------- TÂCHES ---------- */

.status-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 780px) {
    .status-columns { grid-template-columns: 1fr; }
}

.status-column h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.status-list { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }

.task-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    cursor: pointer;
}

.task-card:hover { border-color: var(--blue); }
.task-card h4 { margin: 0 0 4px; font-size: 14px; }
.task-card p { margin: 0; font-size: 12px; color: var(--gray); }

.task-meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--gray-light);
    color: var(--gray);
}

.tag.due-soon { background: #FDF0E0; color: #B5760A; }
.tag.overdue { background: #FCE8E8; color: #B23A3A; }

/* ---------- NOTES ---------- */

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.note-card {
    background: #FFFDF0;
    border: 1px solid #F0E8C8;
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    box-shadow: var(--shadow);
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.note-card h4 { margin: 0 0 8px; font-size: 15px; }
.note-card p {
    margin: 0;
    font-size: 13px;
    color: #6B6244;
    white-space: pre-wrap;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    flex: 1;
}

/* ---------- REGLAGES ---------- */

.settings-form { max-width: 480px; }

.badge {
    background: var(--green);
    color: var(--white);
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 999px;
    vertical-align: middle;
}

.badge.zero { background: var(--gray-border); color: var(--gray); }

.guest-uploads-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.guest-upload-card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.guest-upload-card img { width: 100%; height: 120px; object-fit: cover; }

.guest-upload-card-body { padding: 10px; }
.guest-upload-card-body p { margin: 0 0 8px; font-size: 12px; color: var(--gray); }
.guest-upload-actions { display: flex; gap: 6px; }
.guest-upload-actions .icon-btn { flex: 1; border-radius: 6px; }

/* ---------- FAB ---------- */

.fab {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    border: none;
    font-size: 22px;
    box-shadow: var(--shadow-lift);
    cursor: pointer;
    z-index: 60;
    transition: transform 0.15s ease, background 0.15s ease;
}

.fab:hover { background: var(--blue-dark); transform: scale(1.06); }
.fab:active { transform: scale(0.95); }
