/**
 * Style principal - Todo List Partagee
 * Mobile-first, responsive, mode sombre automatique
 * Version 1.2
 */

/* ========== VARIABLES & RESET ========== */
/* Forcer le color-scheme pour que les éléments natifs (inputs, selects)
   suivent notre thème et pas celui du système */
:root { color-scheme: only light; }
.dark { color-scheme: dark; }

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-up: 0 -2px 10px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    /* Couleurs dediees nav 3-niveaux : inactive plus marque que la page,
       active = --bg-card pour ressortir. */
    --bg-nav-inactive: #ecf0f5;
    --bg-nav-active: var(--bg-card);
    --nav-height: 64px;
    --header-height: 56px;
    --badge-color: #ef4444;
    --new-dot: #3b82f6;
    --transition: 0.2s ease;
}

/* Mode sombre : une seule source = classe .dark gérée par JS */
.dark {
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-up: 0 -2px 10px rgba(0, 0, 0, 0.3);
    --bg-nav-inactive: #0a1020;   /* dark mode : un peu plus sombre que la page (#0f172a) */
    --bg-nav-active: var(--bg-card);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ========== PAGE DE CONNEXION ========== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px 32px;
    width: 100%;
    max-width: 380px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.login-icon-img {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    border-radius: 16px;
    display: inline-block;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.login-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.dark .login-error {
    background: #451a1a;
    border-color: #7f1d1d;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
}

.login-form input:focus {
    border-color: var(--primary);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    margin-top: 8px;
}

.btn-login:hover {
    background: var(--primary-dark);
}

.btn-login:active {
    transform: scale(0.98);
}

/* Checkbox "Se souvenir de moi" */
.remember-group {
    margin-top: -4px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ========== EN-TETE APPLICATION ========== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.app-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.app-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: block;
    flex-shrink: 0;
}

.user-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ========== CONTENU PRINCIPAL ========== */
#content {
    padding-top: calc(var(--header-height) + 8px);
    padding-bottom: calc(var(--nav-height) + 80px);
    padding-left: 12px;
    padding-right: 12px;
    max-width: 640px;
    margin: 0 auto;
    transition: padding-top 0.3s ease, padding-bottom 0.3s ease;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Calendrier : pleine largeur */
#tab-calendar {
    max-width: none;
    padding: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== EN-TETES DE SECTION ========== */
.section-header {
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

/* ========== FILTRES ========== */
.filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex-shrink: 0;
    padding: 6px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sélecteur de tri */
.sort-container {
    margin-bottom: 8px;
}

.sort-select {
    padding: 4px 8px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

.sort-select:focus {
    border-color: var(--primary);
}

/* Filtre magasin */
.store-filter-container {
    margin-top: 10px;
}

.store-filter {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.store-filter:focus {
    border-color: var(--primary);
}

/* ========== LISTE DES ITEMS ========== */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.loading {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 14px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
    font-size: 14px;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

/* ========== CARTE ITEM ========== */
.item-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all var(--transition);
    position: relative;
    border: 1px solid var(--border);
}

.item-card:hover {
    box-shadow: var(--shadow-lg);
}

.item-card.done {
    opacity: 0.6;
}

.item-card.done .item-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Point indicateur "nouveau" */
.item-card.is-new::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--new-dot);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

/* Checkbox personnalisee */
.item-checkbox {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    margin-top: 2px;
    background: transparent;
    padding: 0;
}

.item-checkbox:hover {
    border-color: var(--primary);
}

.item-card.done .item-checkbox {
    background: var(--success);
    border-color: var(--success);
}

.item-card.done .item-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 700;
}

/* Contenu de l'item */
.item-body {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

/* Detail facultatif sous le titre */
.item-detail {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    word-break: break-word;
    white-space: pre-line;
    line-height: 1.4;
}

/* Curseur cliquable sur le body des taches (edition) */
.item-body-clickable {
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 2px 4px;
    margin: -2px -4px;
    transition: background var(--transition);
}

.item-body-clickable:hover {
    background: var(--bg-input);
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.item-meta .tag {
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* Pastilles assignation colorées */
.item-meta .tag.assigned-antoine {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}
.dark .item-meta .tag.assigned-antoine {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
}

.item-meta .tag.assigned-fred {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}
.dark .item-meta .tag.assigned-fred {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Bicolore pour "Les deux" */
.item-meta .tag.assigned-both {
    background: linear-gradient(135deg, #fff7ed 50%, #eff6ff 50%);
    color: #6b21a8;
    border: 1px solid #c4b5fd;
}
.dark .item-meta .tag.assigned-both {
    background: linear-gradient(135deg, #ea580c 50%, #2563eb 50%);
    color: #fff;
    border-color: #7c3aed;
}

/* Tag date due */
.item-meta .tag.tag-date {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.dark .item-meta .tag.tag-date {
    background: #14532d;
    color: #86efac;
    border-color: #166534;
}

.item-meta .tag.store {
    background: #fef3c7;
    color: #b45309;
}

.dark .item-meta .tag.store {
    background: #451a03;
    color: #fcd34d;
}

/* Bouton supprimer */
.item-delete {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
}

.item-delete:hover {
    background: #fef2f2;
    color: var(--danger);
}

.dark .item-delete:hover {
    background: #451a1a;
}

/* ========== BOUTON VIDER ACHETES ========== */
.btn-clear-bought {
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: transparent;
    color: var(--danger);
    border: 1.5px solid var(--danger);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-clear-bought:hover {
    background: var(--danger);
    color: white;
}

/* ========== BANDEAU NAVIGATION BAS ========== */
/* ========== BOTTOM NAV — pattern drawer 3 groupes ==========
   Le groupe actif s'expand pour montrer son titre + ses sous-onglets ; les inactifs sont reduits
   a leur icone. Implementation : flex avec flex:1 sur l'actif, flex:0 0 auto sur les inactifs.

   3 niveaux de couleur subtile :
   - .bottom-nav (zone inactive)  : --bg-input (gris tenu, plus marque que la page)
   - .nav-group.active            : --bg-card  (blanc/clair, "pop out")
   - le contenu de page (--bg)    : entre les deux (gris tres pale) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-nav-inactive);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow-up);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Conteneur interne : centre les groupes, max-width pour ne pas s'etaler en plein ecran */
.bottom-nav-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 720px;
    transition: max-width 0.25s ease;
}

/* === 3 etats visuels distincts ===
   - Drawer ferme  : pill gris subtil (look bouton clair, hover ombre + tint primaire)
   - Titre actif   : pill teinte primaire (couleur claire violet, look "selection courante")
   - Sub-tab       : flat sans bg (look item de menu)
   Le but : que l'oeil reconnaisse instantanement les 3 niveaux sans confusion. */

.nav-group {
    display: flex;
    align-items: stretch;
    flex: 0 0 56px;
    transition: flex 0.25s ease;
    overflow: hidden;
    position: relative;
}

.nav-group.active {
    flex: 1;
}

/* === Icone groupe (drawer ferme + titre du drawer ouvert) === */
.nav-group-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 44px;
    min-width: 44px;
    margin: 6px;
    border: none;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: width 0.25s ease, background 0.15s ease, color var(--transition);
}
.dark .nav-group-icon {
    background: rgba(255, 255, 255, 0.06);
}
.nav-group-icon .nav-group-emoji {
    font-size: 20px;
    line-height: 1;
}
.nav-group-icon .nav-group-label {
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-muted);
    white-space: nowrap;
    display: none;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.nav-group-icon:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--primary);
}
.dark .nav-group-icon:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* Etat actif : largeur agrandie + label visible + bg teinte primaire = look "section selectionnee" */
.nav-group.active .nav-group-icon {
    width: 70px;
    min-width: 70px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
}
.dark .nav-group.active .nav-group-icon {
    background: rgba(99, 102, 241, 0.2);
}
.nav-group.active .nav-group-icon .nav-group-label {
    display: block;
    color: var(--primary);
}
.nav-group.active .nav-group-icon:hover {
    background: rgba(79, 70, 229, 0.18);
}
.dark .nav-group.active .nav-group-icon:hover {
    background: rgba(99, 102, 241, 0.28);
}

/* === Sub-tabs : flat === */
.nav-subtabs {
    display: none;
    flex: 1;
    align-items: stretch;
    min-width: 0;
}
.nav-group.active .nav-subtabs {
    display: flex;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    padding: 4px 2px;
    border-radius: 0;
    transition: color var(--transition);
    position: relative;
    min-width: 0;
}

.nav-btn:hover {
    color: var(--primary);
}

.nav-btn.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 19px;
    line-height: 1;
}

.nav-label {
    font-weight: 600;
    font-size: 10.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Tres petits ecrans : compresser encore */
@media (max-width: 360px) {
    .nav-group { flex: 0 0 44px; }
    .nav-group-icon { width: 36px; min-width: 36px; margin: 4px; }
    .nav-group-icon .nav-group-emoji { font-size: 18px; }
    .nav-group-icon .nav-group-label { font-size: 8px; }
    .nav-group.active .nav-group-icon { width: 56px; min-width: 56px; }
    .nav-label { font-size: 9.5px; }
    .nav-icon { font-size: 16px; }
}

/* Desktop : bandeau pleine largeur, contenu centre dans une zone raisonnable.
   Items garde une taille similaire a mobile, juste fonts plus genereuses. */
@media (min-width: 720px) {
    .bottom-nav-inner { max-width: 600px; }
    .nav-label { font-size: 12.5px; }
    .nav-group-icon {
        width: 48px; min-width: 48px;
        margin: 6px;
    }
    .nav-group-icon .nav-group-emoji { font-size: 21px; }
    .nav-group-icon .nav-group-label { font-size: 10.5px; }
    .nav-group.active .nav-group-icon {
        width: auto;
        min-width: 80px;
        padding: 0 14px;
    }
    .nav-group { flex: 0 0 60px; }
    .nav-icon { font-size: 19px; }
    .nav-btn { padding: 4px 8px; gap: 3px; }
}

/* Tres grand ecran : un peu plus de respiration */
@media (min-width: 1280px) {
    .bottom-nav-inner { max-width: 720px; }
    .nav-label { font-size: 13px; }
}

/* Badge de notification */
.nav-badge {
    position: absolute;
    top: 2px;
    right: 10px;
    background: var(--badge-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
}

/* ========== BOUTON FLOTTANT (FAB) ========== */
.fab-add {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
    z-index: 90;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.fab-add:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.fab-add:active {
    transform: scale(0.95);
}

/* Masquer le FAB sur l'onglet profil */
.fab-hidden {
    display: none;
}

/* ========== MODALES ========== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: modalShow 0.2s ease;
}

.modal.closing {
    display: flex;
}

.modal.closing .modal-overlay {
    animation: fadeOut 0.2s ease forwards;
}

.modal.closing .modal-content {
    animation: slideDown 0.2s ease forwards;
}

/* Sticky header dans les modales pour le titre */
.modal-content .modal-header {
    position: sticky;
    top: -24px;
    background: var(--bg-card);
    z-index: 10;
    padding-top: 24px;
    padding-bottom: 12px;
    margin-top: -24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

@keyframes modalShow {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 24px 20px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    margin-top: auto;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-input);
    color: var(--text);
    font-size: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    background: var(--border);
}

/* Formulaires dans les modales */
.modal .form-group {
    margin-bottom: 16px;
}

.modal label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.modal textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

.modal textarea:focus {
    border-color: var(--primary);
}

.modal input:not([type="checkbox"]):not([type="radio"]),
.modal select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text);
    transition: border-color var(--transition);
    outline: none;
    -webkit-appearance: none;
}
/* v5.38 — Fix : restaurer le rendu natif des checkbox/radio dans les modales (sinon la coche disparaît) */
.modal input[type="checkbox"],
.modal input[type="radio"] {
    width: 18px; height: 18px;
    padding: 0; border: none;
    -webkit-appearance: auto; appearance: auto;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.modal input:focus,
.modal select:focus {
    border-color: var(--primary);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    margin-top: 8px;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

.btn-submit:active {
    transform: scale(0.98);
}

/* ========== PROFIL ========== */
.profile-section {
    text-align: center;
    padding: 20px 0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 36px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.profile-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-info {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.profile-option {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
    box-shadow: var(--shadow);
}

.profile-option label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-switcher {
    display: flex;
    gap: 8px;
}

.theme-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.theme-btn:hover {
    border-color: var(--primary-light);
}

.theme-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-logout {
    display: inline-block;
    padding: 12px 32px;
    background: transparent;
    color: var(--danger);
    border: 1.5px solid var(--danger);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 16px;
    transition: all var(--transition);
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    color: var(--text);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-input);
    border-color: var(--text-secondary);
}

.pwd-warn-dot {
    font-size: 14px;
    line-height: 1;
}

.password-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
}

.dark .password-warning {
    background: #451a03;
    color: #fcd34d;
    border-color: #92400e;
}

.version-info {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 24px;
}

/* ========== CALENDRIER (colonnes horizontales) ========== */

/* Zone calendrier dans le header */
.hdr-cal {
    display: none;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    overflow: hidden;
}

.hdr-cal-year {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    min-width: 40px;
    text-align: center;
}

.cal-nav-btn {
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.cal-nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.hdr-cal-legend {
    display: flex;
    align-items: center;
    gap: 1px 4px;
    font-size: 0;
    color: var(--text-muted);
}

.cl {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-left: 4px;
}

.cl-together { background: #4ade80; }
.cl-antoine { background: #fb923c; }
.cl-fred { background: #60a5fa; }
.cl-maybe { background: #fde047; }
.cl-vacation { background: #c4b5fd; }

.hdr-cal-ics {
    font-size: 0;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile : pastilles only, masquer texte ICS */
.hdr-cal-ics .cal-refresh-btn {
    font-size: 8px;
}

/* Mobile (<= 700px) : sur l'onglet calendrier, la legende des couleurs passe sur une 2e ligne
   pour ne plus deborder a cote de Actualiser/HORS LIGNE/Fred. */
@media (max-width: 700px) {
    body.tab-cal-active .app-header {
        height: auto;
        min-height: var(--header-height);
        padding-top: 4px;
        padding-bottom: 4px;
        align-items: flex-start;
    }
    body.tab-cal-active .hdr-cal {
        flex-wrap: wrap;
        row-gap: 4px;
        align-items: center;
    }
    body.tab-cal-active .hdr-cal-legend {
        order: 99;
        flex-basis: 100%;
        justify-content: center;
        margin-top: 2px;
    }
    /* Aligner conn-status + user-badge sur la meme baseline que la 1ere ligne du hdr-cal */
    body.tab-cal-active .conn-status,
    body.tab-cal-active .user-badge {
        align-self: center;
        margin-top: 2px;
    }
    /* Ajuster le padding du contenu pour compenser la hauteur header agrandie */
    body.tab-cal-active #content {
        padding-top: calc(var(--header-height) + 26px) !important;
    }
}

.cal-refresh-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 2px;
}

.cal-refresh-btn:hover {
    background: var(--primary);
    color: white;
}

/* Scroll horizontal + vertical si necessaire */
.cal-scroll {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - var(--header-height) - var(--nav-height) - 6px);
    max-height: calc(100dvh - var(--header-height) - var(--nav-height) - 6px);
}

.cal-scroll::-webkit-scrollbar {
    height: 6px;
}

.cal-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Conteneur colonnes : 12 mois cote a cote */
.cal-cols {
    display: flex;
    gap: 2px;
    width: max-content;
}

/* Colonne mois */
.mc {
    width: 130px;
    flex-shrink: 0;
}

.mc-title {
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    color: var(--primary);
    padding: 2px 0;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 0;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 5;
}

/* Ligne jour - hauteur calculee pour que 31 jours + titre rentrent dans le viewport */
.dr {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 2px;
    height: calc((100vh - var(--header-height) - var(--nav-height) - 26px) / 32);
    height: calc((100dvh - var(--header-height) - var(--nav-height) - 26px) / 32);
    max-height: 20px;
    min-height: 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-radius: 1px;
}

.dr:hover {
    outline: 1.5px solid var(--primary);
    z-index: 1;
}

/* Fond vert quand les 2 sont off */
.dr.dr-both {
    background: rgba(74, 222, 128, 0.25);
}
.dark .dr.dr-both {
    background: rgba(74, 222, 128, 0.22);
}

/* Aujourd'hui */
.dr.dr-today {
    outline: 2px solid var(--primary);
    z-index: 2;
}

/* Label jour : "lun 05" */
.dr-day {
    font-size: 9px;
    font-weight: 500;
    color: var(--text);
    width: 42px;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
    line-height: 1;
}

/* Bandes de couleur Antoine et Fred */
.db {
    width: 5px;
    height: 12px;
    border-radius: 1px;
    background: var(--border);
    flex-shrink: 0;
    margin-right: 1px;
}

/* Antoine off (ICS repos) */
.db.db-a-off { background: #fb923c; }
/* Antoine envisage de poser */
.db.db-a-maybe { background: #fde047; }
/* Antoine conges */
.db.db-a-vac { background: #c4b5fd; }
/* Antoine tardif (dispo le matin → orange en haut) */
.db.db-a-tardif { background: linear-gradient(to bottom, #fb923c 50%, var(--border) 50%); }
/* Antoine extrême mat (dispo le soir → orange en bas) */
.db.db-a-extmat { background: linear-gradient(to bottom, var(--border) 50%, #fb923c 50%); }

/* Fred off (conge pose) */
.db.db-f-off { background: #60a5fa; }
/* Fred envisage de poser */
.db.db-f-maybe { background: #facc15; }

/* Quand les 2 sont off confirme → bandes vertes */
.dr.dr-both .db.db-a-off,
.dr.dr-both .db.db-a-vac { background: #4ade80; }
.dr.dr-both .db.db-f-off { background: #4ade80; }

/* Ensemble partiel tardif (dispo le matin → vert en haut) */
.dr.dr-partial-both.dr-partial-tardif {
    background: linear-gradient(to bottom, rgba(74, 222, 128, 0.25) 50%, transparent 50%);
}
.dr.dr-partial-both.dr-partial-tardif .db.db-a-tardif {
    background: linear-gradient(to bottom, #4ade80 50%, var(--border) 50%);
}
.dr.dr-partial-both.dr-partial-tardif .db.db-f-off {
    background: linear-gradient(to bottom, #4ade80 50%, #60a5fa 50%);
}
.dark .dr.dr-partial-both.dr-partial-tardif {
    background: linear-gradient(to bottom, rgba(74, 222, 128, 0.12) 50%, transparent 50%);
}

/* Ensemble partiel extrême mat (dispo le soir → vert en bas) */
.dr.dr-partial-both.dr-partial-extrem_mat {
    background: linear-gradient(to bottom, transparent 50%, rgba(74, 222, 128, 0.25) 50%);
}
.dr.dr-partial-both.dr-partial-extrem_mat .db.db-a-extmat {
    background: linear-gradient(to bottom, var(--border) 50%, #4ade80 50%);
}
.dr.dr-partial-both.dr-partial-extrem_mat .db.db-f-off {
    background: linear-gradient(to bottom, #60a5fa 50%, #4ade80 50%);
}
.dark .dr.dr-partial-both.dr-partial-extrem_mat {
    background: linear-gradient(to bottom, transparent 50%, rgba(74, 222, 128, 0.12) 50%);
}

/* Quand au moins un est "maybe" → fond jaune */
.dr.dr-maybe-both {
    background: rgba(250, 204, 21, 0.15);
}
.dark .dr.dr-maybe-both {
    background: rgba(250, 204, 21, 0.18);
}

/* Note dans la ligne */
.dr-note {
    font-size: 9px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    padding-left: 2px;
}

/* Points taches dans le calendrier (par personne) */
.dr-task {
    font-size: 6px;
    flex-shrink: 0;
    margin: 0;
    line-height: 1;
}

.dr-task-a { color: #fb923c; }
.dr-task-f { color: #60a5fa; }

/* Section taches dans la modale jour */
.day-tasks-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.day-tasks-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: var(--bg-input);
    border-radius: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all var(--transition);
}

.dt-item:hover {
    background: var(--border);
}

.dt-item.dt-done {
    opacity: 0.5;
    text-decoration: line-through;
}

.dt-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.dt-assigned {
    font-size: 10px;
    color: var(--text-muted);
}

/* Detail tache dans modale cal-task */
.cal-task-detail {
    margin-bottom: 16px;
}

/* Ligne de formulaire cote a cote */
.form-row {
    display: flex;
    gap: 8px;
}

.form-half {
    flex: 1;
}

/* Boutons d'action */
.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.form-actions .btn-submit {
    flex: 1;
}

.btn-toggle-done {
    background: var(--success) !important;
}

.btn-toggle-done:hover {
    background: #059669 !important;
}

/* Bouton modifier la tâche (lien texte sous les actions) */
.btn-edit-full {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-edit-full:hover {
    background: var(--primary);
    color: white;
}

/* ===== Modale jour ===== */
.modal-day-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.day-info-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.day-info-rest { background: #dcfce7; color: #15803d; }
.dark .day-info-rest { background: #14532d; color: #86efac; }

.day-info-work { background: #fff7ed; color: #c2410c; }
.dark .day-info-work { background: #431407; color: #fdba74; }

.day-info-unknown { background: var(--bg-input); color: var(--text-muted); }

.day-info-holiday { background: #ede9fe; color: #6d28d9; }
.dark .day-info-holiday { background: #2e1065; color: #c4b5fd; }

.day-info-partial { background: #fff7ed; color: #c2410c; border-left: 3px solid #fb923c; }
.dark .day-info-partial { background: #431407; color: #fdba74; }

.day-info-fred-off { background: #dbeafe; color: #1d4ed8; }
.dark .day-info-fred-off { background: #1e3a5f; color: #93c5fd; }

/* ========== RESPONSIVE DESKTOP (>= 768px) ========== */
@media (min-width: 768px) {
    :root {
        --nav-height: 56px;
        --header-height: 60px;
    }

    #content {
        max-width: 720px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Desktop : afficher les labels de la legende et l'info ICS */
    .hdr-cal-legend {
        font-size: 9px;
        gap: 2px 6px;
        flex-wrap: nowrap;
    }

    .hdr-cal-ics {
        font-size: 8px;
    }

    .login-card {
        padding: 48px 40px;
    }

    .modal-content {
        border-radius: var(--radius);
        margin: auto;
    }

    .modal {
        align-items: center;
    }

    .item-card {
        padding: 16px 20px;
    }

    .fab-add {
        right: calc(50% - 320px + 16px);
        right: max(16px, calc(50% - 304px));
    }

    /* Calendrier desktop */
    .mc {
        width: 160px;
    }

    .dr-day {
        font-size: 10px;
        width: 46px;
    }

    .db {
        width: 6px;
    }
}

/* ========== ACHATS BEBE ========== */

.baby-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.baby-toggle {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.baby-toggle-btn {
    padding: 4px 10px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.baby-toggle-btn.active {
    background: var(--primary);
    color: white;
}

.baby-toggle-btn:not(.active):hover {
    background: var(--bg-input);
}

.baby-table-wrap {
    /* pas d'overflow ici pour ne pas casser le sticky thead */
}

.baby-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.baby-table thead th {
    position: sticky;
    top: var(--header-height);
    z-index: 5;
}

.baby-table th {
    background: var(--bg-card);
    border-bottom: 2px solid var(--primary);
    padding: 6px 2px;
    font-size: 10px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    white-space: nowrap;
}

.baby-th-name {
    text-align: left !important;
    padding-left: 8px !important;
    min-width: 120px;
}

.baby-th-label {
    font-size: 9px !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-align: right !important;
    padding-right: 2px !important;
    white-space: nowrap;
    width: auto;
}

.baby-td-label { width: 0; padding: 0; }

.baby-th-check { width: 44px; }
.baby-th-act { width: 44px; }

.baby-row {
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.baby-row:hover { background: var(--bg-input); }

.baby-row.baby-highlight {
    animation: babyFlash 2s ease;
}

@keyframes babyFlash {
    0% { background: rgba(79, 70, 229, 0.25); }
    100% { background: transparent; }
}


/* Ligne de section catégorie */
.baby-section-row {
    background: var(--bg);
}

.baby-section-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary);
    padding: 10px 6px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid var(--primary);
}

.baby-section-clickable {
    cursor: pointer;
    transition: color var(--transition);
}

.baby-section-clickable:hover {
    color: var(--primary-dark);
}

.baby-section-edit {
    font-size: 10px;
    opacity: 0.4;
    transition: opacity var(--transition);
}

.baby-section-clickable:hover .baby-section-edit {
    opacity: 1;
}

.baby-section-th {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    padding: 10px 2px 4px;
    border-bottom: 1.5px solid var(--primary);
}

/* Colonne catégorie */
.baby-th-cat {
    width: 80px;
    text-align: center !important;
}

.baby-td-cat {
    text-align: center;
    padding: 4px 2px;
}

.baby-cat-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    max-width: 85px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-height: 26px;
    line-height: 1.4;
}

.baby-cat-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.baby-cat-pill.baby-cat-undef {
    color: var(--text-muted);
    font-style: italic;
    border-style: dashed;
}

.baby-cat-inline-select {
    width: 85px;
    padding: 3px 2px;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    font-size: 10px;
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    cursor: pointer;
}

.baby-cat-inline-input {
    width: 80px;
    padding: 4px 6px;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    font-size: 12px;
    background: var(--bg-input);
    color: var(--text);
    outline: none;
}

.baby-td-name {
    padding: 6px;
}

.baby-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.baby-detail {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.baby-td-check {
    text-align: center;
    padding: 4px;
}

/* Boutons checkbox custom */
.baby-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
    font-size: 14px;
}

.baby-check:hover { border-color: var(--primary); }

.baby-check.checked {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.baby-check.checked::after { content: '✓'; font-weight: 700; font-size: 14px; }

.baby-td-act {
    text-align: center;
    padding: 4px;
    white-space: nowrap;
}

.baby-edit-btn, .baby-del-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    padding: 0;
}

.baby-edit-btn:hover { background: var(--bg-input); color: var(--primary); }
.baby-del-btn:hover { background: var(--bg-input); color: var(--danger); }

/* Checkboxes dans la modale */
.baby-when-checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ========== UTILITAIRES ========== */
.hidden {
    display: none !important;
}

/* ========== ANNONCES GROSSESSE ========== */

.annonces-filters {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

/* Champ de recherche */
.annonces-search {
    width: 100%;
    padding: 7px 12px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text);
    font-size: 13px;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--transition);
}

.annonces-search:focus {
    outline: none;
    border-color: var(--primary);
}

.annonces-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: 14px;
    width: 14px;
    background: var(--text-muted);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat center;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 4l8 8M12 4l-8 8' stroke='black' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat center;
    cursor: pointer;
}

/* Rangée 1 : scope + séparateur + statut sur une ligne */
.annonces-filter-row1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.annonces-filter-group {
    display: flex;
    gap: 4px;
}

.annonces-filter-sep {
    width: 1px;
    height: 16px;
    background: var(--border);
    flex-shrink: 0;
    align-self: center;
    margin: 0 1px;
}

/* Base commune des boutons filtre */
.annonces-filter-btn,
.annonces-status-btn {
    padding: 3px 11px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

/* Scope actif : couleur identité */
#annonces-scope-bar .annonces-filter-btn[data-scope="fred"].active {
    background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; font-weight: 600;
}
.dark #annonces-scope-bar .annonces-filter-btn[data-scope="fred"].active {
    background: #2563eb; color: #fff; border-color: #2563eb;
}
#annonces-scope-bar .annonces-filter-btn[data-scope="antoine"].active {
    background: #fff7ed; color: #c2410c; border-color: #fdba74; font-weight: 600;
}
.dark #annonces-scope-bar .annonces-filter-btn[data-scope="antoine"].active {
    background: #ea580c; color: #fff; border-color: #ea580c;
}
#annonces-scope-bar .annonces-filter-btn[data-scope="both"].active {
    background: linear-gradient(135deg, #fff7ed 50%, #eff6ff 50%);
    color: #6b21a8; border-color: #c4b5fd; font-weight: 600;
}
.dark #annonces-scope-bar .annonces-filter-btn[data-scope="both"].active {
    background: linear-gradient(135deg, #ea580c 50%, #2563eb 50%);
    color: #fff; border-color: #7c3aed;
}

/* Statut actif : fond sombre discret */
.annonces-status-btn.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    font-weight: 600;
}

/* Rangée 2 : contexte, plus petit et discret */
.annonces-context-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.annonces-ctx-btn {
    padding: 2px 9px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition);
}

.annonces-ctx-btn.active {
    background: var(--bg-input);
    border-color: var(--text-secondary);
    color: var(--text);
    font-weight: 600;
}

.annonce-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    margin-bottom: 4px;
    box-shadow: var(--shadow);
    transition: background var(--transition);
}

/* Item "Dit" : pas de barré (gêne la lecture), juste un fond plus discret */
.annonce-card.annonce-done {
    background: var(--bg-input);
    box-shadow: none;
}

.annonce-card.annonce-done .annonce-name {
    color: var(--text-secondary);
    font-weight: 400;
}

.annonce-checkbox {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.annonce-checkbox-done {
    background: var(--success);
    border-color: var(--success);
}

.annonce-body {
    flex: 1;
    min-width: 0;
}

.annonce-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.annonce-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

/* Badges scope — mêmes couleurs/taille que les pastilles d'assignation des tâches */
.annonce-scope-badge {
    display: inline-block;
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.annonce-scope-fred {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}
.dark .annonce-scope-fred {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.annonce-scope-antoine {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}
.dark .annonce-scope-antoine {
    background: #ea580c;
    color: #fff;
    border-color: #ea580c;
}

.annonce-scope-both {
    background: linear-gradient(135deg, #fff7ed 50%, #eff6ff 50%);
    color: #6b21a8;
    border: 1px solid #c4b5fd;
}
.dark .annonce-scope-both {
    background: linear-gradient(135deg, #ea580c 50%, #2563eb 50%);
    color: #fff;
    border-color: #7c3aed;
}

/* Chip contexte */
.annonce-context-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    font-size: 11px;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.annonce-date {
    font-size: 11px;
    color: var(--text-muted);
}

.annonce-date-done {
    color: var(--success);
}

.annonce-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.annonce-btn-order,
.annonce-btn-edit,
.annonce-btn-delete {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.annonce-btn-order:not([disabled]):hover { background: var(--bg-input); color: var(--text); }
.annonce-btn-edit:hover                  { background: var(--bg-input); color: var(--primary); }
.annonce-btn-delete:hover                { background: #fee2e2; color: var(--danger); }
.dark .annonce-btn-delete:hover          { background: #450a0a; }

.annonce-btn-ghost {
    opacity: 0;
    pointer-events: none;
    cursor: default;
}

/* ===== Modal annonce : toggle multi/single + radio statut ===== */
.form-row-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.form-toggle-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.form-toggle-link:hover {
    color: var(--primary-dark);
}

.annonce-status-radio {
    display: flex;
    gap: 12px;
    align-items: center;
    height: 38px;
    padding-left: 2px;
}

.annonce-status-radio label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text);
    font-weight: 400;
}

.annonce-status-radio input[type="radio"] {
    accent-color: var(--primary);
    cursor: pointer;
}

#annonce-names {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

#annonce-names:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== PWA : indicateur de connexion + toast + etats pending ========== */

/* Indicateur de statut : texte color seul, sans bulle, aligne a droite avant le badge user */
.conn-status {
    margin-left: auto;
    margin-right: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
    text-transform: uppercase;
    opacity: 0.85;
}
.conn-online { color: #16a34a; }
.conn-offline { color: #dc2626; }
.conn-sync { color: #ca8a04; animation: conn-pulse 1.2s ease-in-out infinite; }
.dark .conn-online { color: #4ade80; }
.dark .conn-offline { color: #f87171; }
.dark .conn-sync { color: #fbbf24; }

@keyframes conn-pulse {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 0.4; }
}

@media (max-width: 480px) {
    .conn-status { font-size: 10px; margin-right: 8px; }
}

/* Etats pending (creation/modification non synchronisee) */
.pending-sync {
    position: relative;
}
.pending-sync::before {
    content: '⏳';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 11px;
    opacity: 0.8;
    pointer-events: none;
    z-index: 2;
}
.item-card.pending-sync,
.annonce-card.pending-sync,
.cmp-card.pending-sync {
    border-left: 3px solid #f59e0b;
    opacity: 0.92;
}
.baby-row.pending-sync td:first-child {
    border-left: 3px solid #f59e0b;
}
/* Sur les baby-row (table), le ::before ⏳ se superposerait aux boutons d'action de la
   derniere cellule. La barre orange a gauche suffit. */
.baby-row.pending-sync::before { content: none; }
.dr.pending-sync {
    box-shadow: inset 3px 0 0 #f59e0b;
}
.dr.pending-sync::before { content: none; }

/* Etats pending-delete (suppression non synchronisee) */
.pending-delete {
    opacity: 0.5;
    text-decoration: line-through;
}
.pending-delete .item-title,
.pending-delete .annonce-name,
.pending-delete .baby-name {
    text-decoration: line-through;
}

.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 41, 59, 0.95);
    color: #f1f5f9;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    max-width: 90vw;
    text-align: center;
}
.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== COMPARATIFS (onglet recherche produits) ========== */

.cmp-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.cmp-filter-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.cmp-filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.cmp-filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.cmp-filter-btn[data-active="1"] {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* v5.29 — Toggle Cartes | Tableau (visible quand 1 catégorie filtrée) */
.cmp-view-toggle {
    display: inline-flex; gap: 0;
    border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; margin-left: auto;
}
.cmp-view-btn {
    background: var(--bg-card); color: var(--text);
    border: none; padding: 5px 11px;
    font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
    transition: all 0.15s;
}
.cmp-view-btn:not(.active):hover { background: var(--bg-input); }
.cmp-view-btn.active { background: var(--primary); color: #fff; }

/* Vue tableau comparatif */
.cmp-table-wrap {
    background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.cmp-table-view {
    width: 100%; border-collapse: collapse; font-size: 12px;
}
.cmp-table-view thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--bg-input); color: var(--text-muted);
    font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
    padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.cmp-table-view .cmp-th-sortable { cursor: pointer; user-select: none; }
.cmp-table-view .cmp-th-sortable:hover { color: var(--primary); }
.cmp-th-photo { width: 40px; }
.cmp-th-prix, .cmp-th-score { width: 70px; text-align: center !important; }
.cmp-th-crit { text-align: center !important; min-width: 60px; }
.cmp-table-view tbody tr {
    border-bottom: 1px solid var(--border); cursor: pointer;
    transition: background 0.1s;
}
.cmp-table-view tbody tr:hover { background: rgba(79, 70, 229, 0.05); }
.cmp-table-view td { padding: 6px; vertical-align: middle; }
.cmp-table-photo {
    width: 32px; height: 32px; border-radius: 4px; object-fit: cover; display: block;
}
.cmp-table-photo-empty { background: var(--bg-input); }
.cmp-td-name-main { font-weight: 600; color: var(--text); }
.cmp-td-name-sub  { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
.cmp-td-prix, .cmp-td-score { text-align: center; font-variant-numeric: tabular-nums; }
.cmp-cell-score {
    display: inline-block; min-width: 28px; padding: 2px 6px;
    border-radius: 10px; color: #fff; font-weight: 600; font-size: 11px;
}
.cmp-cell-high { background: #16a34a; }
.cmp-cell-mid  { background: #ca8a04; }
.cmp-cell-low  { background: #dc2626; }
.cmp-td-crit {
    text-align: center; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cmp-td-crit-high { background: rgba(22, 163, 74, 0.15); color: #15803d; }
.cmp-td-crit-mid  { background: rgba(202, 138, 4, 0.15); color: #a16207; }
.cmp-td-crit-low  { background: rgba(220, 38, 38, 0.15); color: #b91c1c; }
.cmp-td-crit-na   { color: var(--text-muted); }
.dark .cmp-td-crit-high { color: #4ade80; }
.dark .cmp-td-crit-mid  { color: #facc15; }
.dark .cmp-td-crit-low  { color: #f87171; }

/* v5.21 — Filtres repliables (Catégorie / Statut / Par sur 1 ligne, mobile + desktop) */
.cmp-summaries { display: flex; gap: 5px; flex-wrap: wrap; }
.cmp-filter-summary {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
    padding: 5px 11px; border-radius: 14px;
    font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.15s;
}
.cmp-filter-summary:hover { border-color: var(--primary); color: var(--primary); }
.cmp-chevron { font-size: 10px; transition: transform 0.15s; opacity: 0.7; }
.cmp-filter-summary.expanded { border-color: var(--primary); color: var(--primary); }
.cmp-filter-summary.expanded .cmp-chevron { transform: rotate(180deg); }
.cmp-collapsible.collapsed { display: none; }

/* v5.31 — Badge "ajouté par" sur card Comparatifs */
.cmp-card-author {
    display: inline-block;
    font-size: 10.5px; font-weight: 600;
    padding: 1px 7px; border-radius: 10px;
    margin-left: 4px; vertical-align: middle;
}
.cmp-card-author-fred {
    background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd;
}
.cmp-card-author-antoine {
    background: #fff7ed; color: #c2410c; border: 1px solid #fdba74;
}
.dark .cmp-card-author-fred {
    background: rgba(37, 99, 235, 0.2); color: #93c5fd; border-color: #2563eb;
}
.dark .cmp-card-author-antoine {
    background: rgba(234, 88, 12, 0.2); color: #fdba74; border-color: #ea580c;
}

/* v5.31 — Drawer Tri : options en colonne (différent des filtres horizontaux) */
.cmp-sort-bar {
    flex-direction: column; align-items: stretch; gap: 4px; padding: 4px 0;
}
.cmp-sort-bar .cmp-sort-btn {
    text-align: left; justify-content: flex-start;
}

/* v5.16 — Panel "Items liés" dans Comparatifs */
#cmp-related-panel {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 10px 12px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.cmp-related-title { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cmp-related-title strong { color: var(--text); font-weight: 600; }
.cmp-related-section { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; }
.cmp-related-lbl {
    font-size: 10.5px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    flex: 0 0 60px; padding-top: 4px;
}
.cmp-related-rows { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }
.cmp-related-item {
    background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
    border-radius: 14px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s;
}
.cmp-related-item:hover { border-color: var(--primary); color: var(--primary); }
.cmp-related-name { font-weight: 500; }
.cmp-related-badge {
    font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 10px;
    background: var(--bg-card); color: var(--text-muted);
}
.cmp-related-bought { background: rgba(165,214,167,0.25); color: #2d6a31; }

#cmp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.cmp-card {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.cmp-card:hover { background: var(--bg-hover, #f8fafc); }
.dark .cmp-card:hover { background: rgba(255,255,255,0.04); }

.cmp-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-muted, #f1f5f9);
    flex-shrink: 0;
}
.cmp-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    opacity: 0.5;
}

.cmp-body {
    flex: 1;
    min-width: 0;
}
.cmp-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cmp-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-secondary);
}
.cmp-brand { font-weight: 500; }
.cmp-cat {
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
    padding: 1px 7px;
    border-radius: 8px;
}

.cmp-status-pill {
    padding: 1px 8px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cmp-status-A-creuser   { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.cmp-status-Retenu      { background: rgba(34, 197, 94, 0.18);  color: #16a34a; }
.cmp-status-Eliminé,
.cmp-status-Elimin-     { background: rgba(220, 38, 38, 0.15);  color: #dc2626; }
.dark .cmp-status-A-creuser { color: #fcd34d; }
.dark .cmp-status-Retenu { color: #4ade80; }
.dark .cmp-status-Eliminé,
.dark .cmp-status-Elimin- { color: #f87171; }

.cmp-score {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}
.cmp-score-high { background: #16a34a; }
.cmp-score-mid  { background: #ca8a04; }
.cmp-score-low  { background: #dc2626; }

/* v5.39 — Badge doublon devient cliquable (ouvre la modale fusion) */
.cmp-dup-badge {
    background: transparent; border: none; padding: 1px 4px;
    color: #f59e0b; font-size: 14px; margin-left: 4px;
    cursor: pointer; border-radius: 4px;
    transition: background 0.15s;
}
.cmp-dup-badge:hover { background: rgba(245, 158, 11, 0.15); }
.cmp-dup-cross { color: #d97706; opacity: 0.75; }
.cmp-dup-cross:hover { opacity: 1; }
.cmp-dup-fuzzy { color: var(--text-muted); opacity: 0.6; font-size: 16px; font-weight: 700; }
.cmp-dup-fuzzy:hover { opacity: 1; color: var(--primary); background: rgba(79, 70, 229, 0.1); }

/* v5.39 — Modale de fusion */
.cmp-merge-primary-select {
    margin-bottom: 12px; padding: 10px 12px;
    background: var(--bg-input); border-radius: 6px;
    font-size: 13px;
}
.cmp-merge-primary-select label:first-child {
    display: block; font-weight: 600; margin-bottom: 6px;
}
.cmp-merge-primary-opt {
    display: flex; align-items: center; gap: 6px;
    margin: 3px 0; cursor: pointer;
}
.cmp-merge-primary-meta { color: var(--text-muted); font-size: 11.5px; }
.cmp-merge-primary-badge { color: var(--primary); font-size: 14px; }

.cmp-merge-table {
    width: 100%; border-collapse: collapse; font-size: 12px;
    margin-bottom: 14px;
}
.cmp-merge-table th, .cmp-merge-table td {
    padding: 6px 8px; border-bottom: 1px solid var(--border);
    vertical-align: top; text-align: left;
}
.cmp-merge-table thead th {
    background: var(--bg-input); font-size: 11px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px;
}
.cmp-merge-row-same { opacity: 0.55; }
.cmp-merge-field { font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.cmp-merge-value { word-break: break-word; }
.cmp-merge-empty { color: var(--text-muted); font-style: italic; }
.cmp-merge-photo { max-width: 60px; max-height: 60px; border-radius: 4px; }
.cmp-merge-long {
    max-height: 80px; overflow-y: auto;
    background: var(--bg-input); padding: 4px 6px; border-radius: 4px;
    font-size: 11.5px;
}
.cmp-merge-json {
    font-family: 'Courier New', monospace; font-size: 10.5px;
    word-break: break-all;
}
.cmp-merge-choice { white-space: normal; min-width: 130px; }
.cmp-merge-radio {
    display: inline-flex; align-items: center; gap: 4px;
    margin: 2px 6px 2px 0; font-size: 11.5px; cursor: pointer;
}
.cmp-merge-radio input { margin: 0; }
.cmp-merge-ok { color: #16a34a; font-size: 11.5px; font-weight: 600; }

.cmp-merge-comments-section {
    margin: 14px 0; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.cmp-merge-comments-section h4 {
    margin: 0 0 8px; font-size: 14px; color: var(--text-secondary);
}
.cmp-merge-comments-list { max-height: 200px; overflow-y: auto; }

.cmp-merge-summary {
    margin: 14px 0; padding: 10px 12px;
    background: rgba(245, 158, 11, 0.10);
    border-left: 3px solid #f59e0b;
    border-radius: 4px; font-size: 13px;
}
.cmp-merge-summary ul { margin: 6px 0 0 18px; padding: 0; }
.cmp-merge-summary li { margin: 2px 0; }

.cmp-merge-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid var(--border);
}
.cmp-merge-actions .btn-secondary,
.cmp-merge-actions .btn-submit { width: auto; padding: 8px 18px; font-size: 13px; }

/* v5.39 — Section audit "Fusions" dans la modale détail */
.cmp-merged-section {
    margin-top: 14px; padding: 10px 12px;
    background: var(--bg-input); border-radius: 6px;
    font-size: 12.5px;
}
.cmp-merged-section h4 {
    margin: 0 0 8px; font-size: 13px;
    color: var(--text-secondary); font-weight: 600;
}
.cmp-merged-list { list-style: none; margin: 0; padding: 0; }
.cmp-merged-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}
.cmp-merged-item:last-child { border-bottom: none; }
.cmp-merge-undo-btn {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-secondary); padding: 3px 10px;
    border-radius: 12px; font-size: 11px; cursor: pointer;
    transition: all 0.15s; flex-shrink: 0;
}
.cmp-merge-undo-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Modal detail produit ===== */

.modal-content-wide { max-width: 560px; }
.cmp-detail-photo {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-muted, #f1f5f9);
    margin-bottom: 12px;
}
.cmp-detail-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cmp-detail-fields h3 { margin: 0; font-size: 18px; }
.cmp-detail-brand { color: var(--text-secondary); font-size: 14px; margin-top: -8px; }
.cmp-detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.cmp-detail-row label {
    flex-shrink: 0;
    width: 80px;
    color: var(--text-secondary);
    font-size: 13px;
}
.cmp-detail-row select {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text);
}
.cmp-detail-note {
    background: var(--bg-muted, #f8fafc);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: pre-wrap;
}
.dark .cmp-detail-note { background: rgba(255,255,255,0.04); }
.cmp-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}
.btn-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

/* ===== IA Panel ===== */
.cmp-ia-panel {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(12, 192, 223, 0.06));
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
}
.cmp-ia-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 8px;
}
.cmp-ia-text { font-size: 13.5px; line-height: 1.5; }
.cmp-ia-prix { margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.cmp-ia-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.cmp-tag {
    background: rgba(79, 70, 229, 0.15);
    color: var(--primary);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

/* v5.29 — Liste compacte des critères + score par critère (modale détail produit) */
.cmp-criteria-list {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.cmp-criteria-list h4 {
    margin: 0 0 10px; font-size: 14px; color: var(--text-secondary);
}
.cmp-criterion {
    display: grid;
    grid-template-columns: 1fr 100px 32px;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
}
.cmp-crit-label { color: var(--text); }
.cmp-crit-bar-wrap {
    height: 6px; background: var(--bg-input);
    border-radius: 3px; overflow: hidden;
}
.cmp-crit-bar { height: 100%; transition: width 0.3s; border-radius: 3px; }
.cmp-crit-high { background: #16a34a; }
.cmp-crit-mid  { background: #ca8a04; }
.cmp-crit-low  { background: #dc2626; }
.cmp-crit-na   { background: var(--border); }
.cmp-crit-score {
    font-size: 12px; font-weight: 600; text-align: right;
    color: var(--text-secondary); font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
    .cmp-criterion { grid-template-columns: 1fr 70px 28px; gap: 8px; font-size: 12px; }
}

/* ===== Comments ===== */
.cmp-comments-section { margin-top: 14px; }
.cmp-comments-section h4 { margin: 0 0 8px; font-size: 14px; color: var(--text-secondary); }
.cmp-comment {
    background: var(--bg-muted, #f8fafc);
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}
.dark .cmp-comment { background: rgba(255,255,255,0.04); }
.cmp-comment-head {
    color: var(--text-secondary); font-size: 11.5px; margin-bottom: 3px;
    display: flex; justify-content: space-between; align-items: center;
}
.cmp-empty { color: var(--text-secondary); font-style: italic; font-size: 13px; }

/* v5.35 — Boutons modifier / supprimer commentaires (visibles uniquement sur ses propres commentaires) */
.cmp-comment-actions {
    display: inline-flex; gap: 4px;
}
.cmp-comment-actions button {
    background: transparent; border: none;
    cursor: pointer; padding: 1px 4px; border-radius: 4px;
    font-size: 12px; line-height: 1; opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}
.cmp-comment-actions button:hover {
    opacity: 1; background: rgba(0,0,0,0.06);
}
.dark .cmp-comment-actions button:hover { background: rgba(255,255,255,0.08); }
.cmp-comment-edit-area {
    width: 100%; min-height: 60px;
    padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px;
    font-family: inherit; font-size: 13px; resize: vertical;
    background: var(--bg-card); color: var(--text);
    box-sizing: border-box;
}
.cmp-comment-edit-actions {
    display: flex; gap: 6px; margin-top: 6px;
}
.cmp-comment-edit-actions .btn-secondary {
    width: auto; padding: 5px 12px; font-size: 12px;
}

/* v5.38 — Pills multi-select dans la modale d'export IA */
.cmp-export-pills {
    display: flex; flex-wrap: wrap; gap: 5px;
    margin-top: 4px;
}
.cmp-export-pill {
    background: var(--bg-card); border: 1.5px solid var(--border); color: var(--text);
    padding: 5px 11px; border-radius: 14px;
    font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
    transition: all 0.15s;
}
.cmp-export-pill:hover { border-color: var(--primary); color: var(--primary); }
.cmp-export-pill[data-active="1"] {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.cmp-export-pill-all { font-style: italic; }
.cmp-export-hint {
    font-size: 11px; font-weight: 400; color: var(--text-muted);
    text-transform: none; letter-spacing: 0;
}

/* v5.36 — Modale d'export filtré IA */
.cmp-export-help {
    font-size: 12.5px; color: var(--text-secondary);
    background: rgba(79, 70, 229, 0.06);
    border-left: 3px solid var(--primary);
    padding: 8px 12px; border-radius: 4px;
    margin: 0 0 14px;
    line-height: 1.4;
}
.cmp-export-count {
    margin: 14px 0;
    padding: 8px 12px; border-radius: 6px;
    background: var(--bg-input); color: var(--text);
    font-weight: 600; font-size: 13px; text-align: center;
    transition: background 0.15s, color 0.15s;
}
.cmp-export-count-warn {
    background: rgba(202, 138, 4, 0.15); color: #a16207;
}
.dark .cmp-export-count-warn { color: #facc15; }
.cmp-export-count-empty {
    background: rgba(220, 38, 38, 0.10); color: #b91c1c;
}
.dark .cmp-export-count-empty { color: #f87171; }
.cmp-comment-form {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.cmp-comment-form textarea {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

/* ===== Photo input ===== */
.photo-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.btn-photo {
    flex: 1;
    min-width: 120px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
    text-align: center;
}
.btn-photo:hover { border-style: solid; }
.btn-photo-clear {
    background: transparent;
    border: 1px solid var(--border);
    color: #dc2626;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.photo-preview {
    margin-top: 8px;
}
.photo-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* ===== Catégories produits (modale) ===== */
.cat-add-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.cat-add-row .btn-submit {
    width: auto;
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 14px;
}
.cat-add-row input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.cat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(79, 70, 229, 0.12);
    color: var(--primary);
    padding: 4px 6px 4px 12px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
}
.cat-del-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
    opacity: 0.6;
}
.cat-del-btn:hover { opacity: 1; }

/* ===== Profile : ligne de boutons Comparatifs ===== */
.profile-btn-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-btn-row .btn-secondary {
    text-align: left;
    width: 100%;
}

/* ===== Responsive Comparatifs ===== */
@media (max-width: 480px) {
    .cmp-thumb { width: 48px; height: 48px; }
    .cmp-name { font-size: 14px; }
    .cmp-meta { font-size: 11px; }
    .cmp-score { width: 28px; height: 28px; font-size: 12px; }
}

/* ========== PLANNING (Gantt preparatifs bebe) ==========
   Couleurs Gantt SEMANTIQUES conservees du Tasks original (porteuses de sens) :
   plan=bleu (recherche), do=orange (action), cdone=vert (fait), late=rose (retard).
   Le reste (header, filtres, fonts) adapte au style Partagi. */

#tab-planning {
    --plan: #B8D8E8;
    --do: #FFB74D;
    --cdone: #A5D6A7;
    --late: #FFCDD2;
    --plan-empty: #F5F5FA;
}

.section-header-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 32px;
}
.section-header-row h2 { margin-bottom: 0; }
.planning-progress {
    flex: 0 1 55%; min-width: 180px; font-size: 11px; color: var(--text-muted);
}
.planning-progress-lbl {
    display: flex; justify-content: space-between; margin-bottom: 4px;
    font-weight: 600;
}
.planning-bar-out {
    background: var(--bg-input); border-radius: 50px; height: 8px; overflow: hidden;
}
.planning-bar-in {
    height: 100%; background: var(--primary); border-radius: 50px;
    transition: width 0.5s; min-width: 3px; width: 0;
}

.planning-filters {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 10px;
}
.planning-cat-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.planning-cb {
    flex-shrink: 0;
    padding: 6px 14px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: inherit; font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.planning-cb:hover {
    border-color: var(--primary-light); color: var(--primary);
}
.planning-cb.active {
    background: var(--primary); color: #fff; border-color: var(--primary);
}
.planning-toggles-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.planning-toggles-row .planning-legend { margin-right: auto; }
.planning-tgl {
    display: flex; align-items: center; gap: 6px;
    font-family: inherit; font-size: 13px; font-weight: 500;
    cursor: pointer; user-select: none; color: var(--text);
}
.planning-vtoggle {
    display: flex; gap: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.planning-vbtn {
    padding: 4px 10px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: inherit; font-size: 10px; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
}
.planning-vbtn.active {
    background: var(--primary); color: #fff;
}
.planning-vbtn:not(.active):hover {
    background: var(--bg-input);
}
.planning-legend {
    display: flex; flex-wrap: wrap; gap: 10px;
    font-family: inherit; font-size: 11px; font-weight: 500; color: var(--text-muted);
}
.planning-legend > span { display: flex; align-items: center; gap: 5px; }
.ldot {
    display: inline-block; width: 18px; height: 10px; border-radius: 4px;
}
.ldot-plan { background: var(--plan); }
.ldot-do { background: var(--do); }
.ldot-cdone { background: var(--cdone); }
.ldot-late { background: var(--late); }

/* Gantt table */
.gantt-wrap {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}
.gantt-table {
    border-collapse: collapse;
    width: auto;
    min-width: 0;
    table-layout: fixed;
    font-family: inherit;
}
.gantt-table th, .gantt-table td { padding: 0; border: none; }

/* Sticky cols */
.gantt-table th.gcn, .gantt-table td.gcn {
    width: 170px; min-width: 170px; max-width: 170px;
    position: sticky; left: 0; z-index: 3;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 8px 10px; vertical-align: middle;
    box-sizing: border-box;
}
.gantt-table th.gcn {
    font-size: 10.5px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border); z-index: 4;
}
.iname-wrap { display: flex; align-items: flex-start; gap: 6px; }
.row-cmp-link {
    background: transparent; border: none; padding: 0 4px; margin-left: auto;
    cursor: pointer; font-size: 12px; line-height: 1; opacity: 0.65;
    flex-shrink: 0; align-self: center;
}
.row-cmp-link:hover { opacity: 1; }
.baby-name .row-cmp-link { margin-left: 6px; vertical-align: middle; opacity: 0.6; }
.baby-name .row-cmp-link:hover { opacity: 1; }
.cdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.iname {
    font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--text);
    cursor: pointer;
}
.iname:hover { color: var(--primary); }
.inote {
    font-size: 11px; color: var(--text-muted); font-style: italic;
    margin-top: 4px; line-height: 1.3; display: none; padding-left: 14px;
}
.inote.open { display: block; }
.done-row td.gcn { background: var(--bg); }
.done-row .iname { opacity: 0.5; text-decoration: line-through; text-decoration-color: var(--text-muted); }

.gantt-table th.gcs, .gantt-table td.gcs {
    width: 95px; min-width: 95px; max-width: 95px;
    position: sticky; left: 170px; z-index: 3;
    background: var(--bg-card);
    border-right: 2px solid var(--border);
    padding: 4px 5px; vertical-align: middle;
    box-sizing: border-box;
}
.gantt-table th.gcs {
    font-size: 10.5px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border); z-index: 4;
    text-align: center;
}
.done-row td.gcs { background: var(--bg); }
.ssel {
    font-family: inherit; font-size: 11px; font-weight: 500;
    border: 1.5px solid var(--border); border-radius: 50px;
    padding: 3px 8px;
    color: var(--text); cursor: pointer; outline: none;
    display: block; width: 100%; box-sizing: border-box;
    transition: all 0.15s; text-align: center;
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    background-color: var(--bg-card);
}
.ssel.s-doing { border-color: var(--plan); background: rgba(184,216,232,0.18); }
.ssel.s-decided { border-color: var(--cdone); background: rgba(165,214,167,0.15); }
.ssel.s-ordered { border-color: var(--do); background: rgba(255,183,77,0.15); }
.ssel.s-done { border-color: var(--cdone); background: rgba(165,214,167,0.2); opacity: 0.75; }

.gantt-table th.gcmonth {
    text-align: center; padding: 6px 2px 4px;
    font-size: 10px; font-weight: 600; color: var(--text-muted);
    border-bottom: 1px dashed var(--border);
    white-space: nowrap; line-height: 1.2;
}
.gantt-table th.gcmonth.is-now {
    background: rgba(255,221,87,0.25); color: #7a5a08; font-weight: 800;
}
.gantt-table th.gcmonth .myr { font-size: 9px; opacity: 0.65; }

.gantt-table th.gcm {
    min-width: 26px; width: 30px; text-align: center;
    padding: 2px 1px 6px; font-size: 9px; font-weight: 500;
    color: var(--text-muted); border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.gantt-table th.gcm.is-now {
    background: rgba(255,221,87,0.25); color: #7a5a08; font-weight: 700;
}
.gantt-table td.gcm {
    padding: 4px 0; vertical-align: middle; min-width: 26px; width: 30px;
}
.gantt-table td.gcm.is-now { background: rgba(255,221,87,0.1); }

.bar { display: block; height: 22px; margin: 0 2px; }
.bar.empty { background: transparent; }
.bar.plan { background: var(--plan); }
.bar.do { background: var(--do); }
.bar.cdone { background: var(--cdone); }
.bar.late { background: var(--late); }
.bar.bs { border-radius: 8px 0 0 8px; margin-left: 4px; }
.bar.be { border-radius: 0 8px 8px 0; margin-right: 4px; }
.bar.bs.be { border-radius: 8px; }
.gantt-table td.gcm.is-now .bar:not(.empty) {
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.15);
}

/* Group header rows */
.ggrp td {
    padding: 9px 12px; font-size: 13px; font-weight: 800;
    cursor: pointer; user-select: none; color: var(--text);
    background: linear-gradient(90deg, rgba(79,70,229,0.06), rgba(12,192,223,0.04));
    border-top: 2px solid var(--border);
}
.ggrp .gtog { float: right; transition: transform 0.25s; color: var(--text-muted); font-size: 13px; }
.ggrp.gcollapsed .gtog { transform: rotate(-90deg); }
.ggrp .gprog {
    float: right; font-size: 11px; font-weight: 600;
    color: var(--text-muted); margin-right: 10px; padding-top: 2px;
}

/* Priority view group headers — colored by urgency tier */
.ggrp.tier-late td { background: linear-gradient(90deg,#FFE0E0,#FFD0D0); color: #A03A3A; }
.ggrp.tier-do td { background: linear-gradient(90deg,#FFEBD0,#FFE0B8); color: #8C5A1A; }
.ggrp.tier-plan td { background: linear-gradient(90deg,#E0EFF8,#D0E5F0); color: #3A6A8A; }
.ggrp.tier-done td { background: linear-gradient(90deg,#EAF7EA,#DAF0DA); color: #4A7A4A; }
.dark .ggrp.tier-late td { background: linear-gradient(90deg,rgba(255,80,80,0.25),rgba(255,100,100,0.18)); color: #ffaaaa; }
.dark .ggrp.tier-do td { background: linear-gradient(90deg,rgba(255,170,80,0.22),rgba(255,180,100,0.15)); color: #ffd699; }
.dark .ggrp.tier-plan td { background: linear-gradient(90deg,rgba(100,160,200,0.22),rgba(120,180,210,0.15)); color: #aaccee; }
.dark .ggrp.tier-done td { background: linear-gradient(90deg,rgba(100,180,100,0.22),rgba(120,200,120,0.15)); color: #aadcaa; }

/* Hidden states */
.gantt-row.grp-hidden { display: none; }
.gantt-row.cat-hidden { display: none; }
.gantt-row.done-hidden { display: none; }

/* Modal prep-task */
.prep-type-row {
    display: flex; flex-direction: column; gap: 6px;
}
.prep-type-opt {
    display: flex; align-items: center; gap: 8px; font-weight: 600;
    padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; transition: all 0.15s;
}
.prep-type-opt:has(input:checked) {
    border-color: var(--primary); background: rgba(79,70,229,0.05);
}
.prep-weeks-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.prep-week-lbl {
    font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 2px;
    font-weight: 600;
}

/* Setting DPA dans Compte */
.settings-date-input {
    padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
    font: inherit; font-size: 14px; background: var(--bg-card); color: var(--text);
    width: 100%; max-width: 220px;
}
.profile-info-small {
    font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4;
}
.log-view {
    margin-top: 8px;
    background: var(--bg-input); border: 1px solid var(--border); border-radius: 6px;
    padding: 8px 10px; font-family: 'Courier New', monospace; font-size: 11px;
    color: var(--text); white-space: pre; overflow: auto;
    max-height: 50vh; max-width: 100%;
}

/* v5.32 — Section Système (info runtime + changelog) dans Outils */
.sys-info-table {
    width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px;
}
.sys-info-table td {
    padding: 5px 8px; border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.sys-info-table tr:last-child td { border-bottom: none; }
.sys-info-table td:first-child {
    color: var(--text-muted); font-weight: 500;
    white-space: nowrap; width: 130px;
}
.sys-info-table td:last-child {
    color: var(--text); font-family: 'Courier New', monospace;
    word-break: break-word;
}
.changelog-content {
    margin-top: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
    font-size: 13px; line-height: 1.5;
}
.changelog-content h2 {
    font-size: 17px; margin: 16px 0 10px; color: var(--primary);
}
.changelog-content h2:first-child { margin-top: 0; }
.changelog-content h3 {
    font-size: 14px; margin: 14px 0 4px;
    color: var(--text); font-weight: 700;
    border-bottom: 1px solid var(--border); padding-bottom: 3px;
}
.changelog-content h4 {
    font-size: 13px; margin: 8px 0 2px;
    color: var(--text-secondary); font-weight: 600;
}
.changelog-content hr {
    border: none; border-top: 2px solid var(--border); margin: 18px 0;
}
.changelog-content ul {
    margin: 4px 0 10px 18px; padding: 0; list-style-type: disc;
}
.changelog-content li { margin: 3px 0; color: var(--text); }
.changelog-content strong { color: var(--primary); font-weight: 600; }
.changelog-content code {
    background: var(--bg-input); padding: 1px 5px; border-radius: 3px;
    font-family: 'Courier New', monospace; font-size: 11.5px;
    color: var(--text);
}
.changelog-empty {
    color: var(--text-muted); text-align: center; padding: 20px; font-style: italic;
}

/* Mobile : compresser le Gantt */
@media (max-width: 520px) {
    .gantt-table th.gcn, .gantt-table td.gcn { width: 130px; min-width: 130px; max-width: 130px; padding: 6px 8px; }
    .iname { font-size: 12px; }
    .gantt-table th.gcs, .gantt-table td.gcs { left: 130px; width: 80px; min-width: 80px; max-width: 80px; padding: 4px 3px; }
    .ssel { padding: 3px 6px; font-size: 10.5px; }
    .section-header-row { gap: 12px; flex-wrap: nowrap; }
    .section-header-row h2 { font-size: 18px; flex-shrink: 0; }
    .planning-progress { flex: 1 1 0; min-width: 0; font-size: 10px; }
    .gantt-table th.gcm, .gantt-table td.gcm { min-width: 22px; width: 26px; font-size: 8.5px; }
    .gantt-table th.gcmonth .myr { display: none; }
    .ssel { font-size: 10px; padding: 3px 6px; }
    .prep-weeks-row { grid-template-columns: 1fr; }
}
