:root {
    --green-dark:  #2d5016;
    --green-mid:   #4a7c2f;
    --green-light: #7cb85c;
    --green-pale:  #d4edbb;
    --beige:       #f5f0e8;
    --white:       #ffffff;
    --text-dark:   #2c2c2c;
    --text-mid:    #555;
    --border:      #e0e0e0;
    --shadow:      0 2px 8px rgba(0,0,0,0.09);
    --radius:      8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--beige);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────── */
header {
    background: var(--green-dark);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}

.logo-icon { font-size: 2rem; }
.logo-text h1 { font-size: 1.15rem; font-weight: 700; line-height: 1.2; }
.logo-text p  { font-size: 0.78rem; opacity: 0.75; }

nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: background 0.2s;
}

nav a:hover    { background: rgba(255,255,255,0.15); }
nav a.active   { background: rgba(255,255,255,0.2); font-weight: 600; }

.btn-accent {
    background: var(--green-light);
    color: var(--green-dark) !important;
    font-weight: 700;
    border-radius: var(--radius);
}
.btn-accent:hover { background: #8fd068 !important; }

.nav-user {
    font-size: 0.85rem;
    opacity: 0.8;
    padding: 0 6px;
}

.nav-link-secondary {
    opacity: 0.75;
    font-size: 0.85rem !important;
}

/* Hamburger — caché sur desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: background .15s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.15); }

/* ── Main ────────────────────────────────────────────────── */
main {
    max-width: 1100px;
    margin: 32px auto;
    padding: 0 24px;
    flex: 1;
    width: 100%;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.6);
    margin-top: auto;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 24px;
    text-align: center;
    font-size: 0.85rem;
}

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}
.alert-success { background: #d4edda; color: #155724; border-color: #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border-color: #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border-color: #bee5eb; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.card h2 {
    color: var(--green-dark);
    font-size: 1.15rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green-pale);
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-count {
    margin-left: auto;
    background: var(--green-pale);
    color: var(--green-dark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
}

/* ── Page header ─────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h1 { color: var(--green-dark); font-size: 1.75rem; }
.page-header p  { color: var(--text-mid); margin-top: 6px; font-size: 0.95rem; }

/* ── Stats ───────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--green-light);
}

.stat-number { font-size: 2rem; font-weight: 800; color: var(--green-mid); line-height: 1; }
.stat-label  { font-size: 0.8rem; color: var(--text-mid); margin-top: 6px; }

/* ── Legend ──────────────────────────────────────────────── */
.legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-mid);
}

.legend-item { display: flex; align-items: center; gap: 7px; }

.legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dot-free     { background: var(--green-light); }
.dot-reserved { background: #3498db; }
.dot-mine     { background: #f39c12; }
.dot-past     { background: #bbb; }

/* ── Month sections ──────────────────────────────────────── */
.month-section { margin-bottom: 40px; }

.month-title {
    color: var(--green-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: capitalize;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Sunday cards ────────────────────────────────────────── */
.sundays-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 14px;
}

.sunday-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.15s, box-shadow 0.15s;
    border-top: 4px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

.sunday-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 18px rgba(0,0,0,0.14);
}

.sunday-card.free     { border-top-color: var(--green-light); }
.sunday-card.reserved { border-top-color: #3498db; }
.sunday-card.mine     { border-top-color: #f39c12; }
.sunday-card.past     { border-top-color: #ccc; opacity: 0.65; }

.sunday-date {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--green-dark);
    text-transform: capitalize;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-free     { background: var(--green-pale); color: var(--green-dark); }
.badge-reserved { background: #d6eaf8; color: #1a5276; }
.badge-mine     { background: #fef9e7; color: #7d6608; }
.badge-past     { background: #f0f0f0; color: #666; }

.sunday-tasks {
    font-size: 0.8rem;
    color: var(--text-mid);
}

.cal-slot-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    border: 1px solid #d0e8f5;
    border-radius: 6px;
    overflow: hidden;
}
.cal-slot {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    font-size: 0.83rem;
    padding: 5px 9px;
    border-left: 3px solid #3498db;
    background: #eaf4fb;
    color: #1a5276;
}
.cal-slot + .cal-slot {
    border-top: 1px solid #c8e0f0;
}
.cal-slot-mine {
    border-left-color: #f39c12;
    background: #fef9e7;
    color: #7d6608;
}
.cal-slot-time {
    font-weight: 700;
    white-space: nowrap;
}
.cal-slot-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Permanence header ───────────────────────────────────── */
.back-link { margin-bottom: 16px; }

.perm-header {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-left: 5px solid var(--green-mid);
}

.perm-date  { font-size: 1.4rem; font-weight: 700; color: var(--green-dark); text-transform: capitalize; }
.perm-who   { color: var(--text-mid); margin-top: 4px; font-size: 0.95rem; }
.perm-notes { font-style: italic; }
.text-muted { color: #888; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(124, 184, 92, 0.2);
}

.form-group textarea { min-height: 80px; resize: vertical; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    white-space: nowrap;
}

.btn:active { transform: scale(0.97); }

.btn-primary   { background: var(--green-mid); color: white; }
.btn-primary:hover { background: var(--green-dark); }

.btn-danger    { background: #e74c3c; color: white; }
.btn-danger:hover  { background: #c0392b; }

.btn-secondary { background: #efefef; color: var(--text-dark); }
.btn-secondary:hover { background: #e0e0e0; }

.btn-sm   { padding: 6px 12px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 6px 8px; }

/* ── Two-column layout ───────────────────────────────────── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* ── Task list ───────────────────────────────────────────── */
.tasks-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: #f7f7f7;
    transition: background 0.15s;
}

.task-item.statut-fait     { background: #eafaf1; }
.task-item.statut-en_cours { background: #fef9e7; }
.task-item.statut-a_faire  { background: #f7f7f7; }

.task-icon { font-size: 1.1rem; flex-shrink: 0; padding-top: 1px; }

.task-content { flex: 1; min-width: 0; }
.task-title   { font-weight: 600; font-size: 0.95rem; }
.task-desc    { font-size: 0.85rem; color: var(--text-mid); margin-top: 3px; }
.task-meta    { font-size: 0.78rem; color: #999; margin-top: 4px; }

.task-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.statut-select {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
    font-family: inherit;
}

.empty-state {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 24px 0;
    line-height: 1.7;
}

/* ── Auth pages ──────────────────────────────────────────── */
.auth-container {
    max-width: 420px;
    margin: 48px auto;
    padding: 0 24px;
}

.auth-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    padding: 40px;
    overflow: hidden;
}
.auth-photo {
    margin: -40px -40px 24px -40px;
}
.auth-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon { font-size: 3rem; margin-bottom: 10px; }
.auth-logo h1 { color: var(--green-dark); font-size: 1.4rem; margin-bottom: 6px; }
.auth-logo p  { color: var(--text-mid); font-size: 0.9rem; }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-mid);
}

.auth-footer a { color: var(--green-mid); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 720px) {
    /* Header & nav mobile */
    .header-inner { flex-wrap: wrap; padding: 10px 16px; }
    .nav-toggle { display: block; }
    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 2px;
        padding-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.15);
        margin-top: 8px;
    }
    nav.nav-open { display: flex; }
    nav a { padding: 10px 12px; font-size: 0.92rem; border-radius: 6px; }
    .nav-user { padding: 8px 12px; font-size: 0.82rem; }

    /* Layout */
    main { padding: 0 12px; margin: 16px auto; }
    .two-col { grid-template-columns: 1fr; }
    .card { padding: 16px; margin-bottom: 16px; }
    .card h2 { font-size: 1rem; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

    /* Tables */
    .data-table { font-size: 0.82rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table th, .data-table td { padding: 8px 10px; white-space: nowrap; }

    /* Formulaires */
    .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }

    /* Permanences */
    .sundays-grid { grid-template-columns: 1fr 1fr; }
    .perm-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .slot-item { flex-wrap: wrap; gap: 8px; }
    .slot-time { min-width: unset; }

    /* Parcelles */
    .parcelles-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }

    /* Page header */
    .page-header { flex-direction: column; align-items: flex-start !important; gap: 10px; }

    /* Auth */
    .auth-container { padding: 0 12px; margin: 24px auto; }
    .auth-card { padding: 20px 16px; }
    .auth-photo { margin: -20px -16px 20px -16px; }

    /* Galerie */
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .galerie-section-header { flex-direction: column; align-items: flex-start; }

    /* Lightbox mobile */
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .lb-close { top: 10px; right: 10px; }
    .lb-close, .lb-prev, .lb-next { width: 38px; height: 38px; font-size: 1.2rem; }
    .lb-inner img { max-width: 95vw; max-height: 75vh; }

    /* Accueil */
    .home-grid { grid-template-columns: 1fr; }
    .home-banner { padding: 20px; flex-direction: column; }
    .home-banner-text h1 { font-size: 1.3rem; }
    .home-banner-badge { align-items: flex-start; }
    .home-shortcut { max-width: none; }
    .home-parcelles-grid { grid-template-columns: 1fr; }
    .home-parcelle-card { flex-direction: column; }
    .home-parcelle-thumb { width: 100%; height: 160px; }

    /* Tâches */
    .tache-header { flex-wrap: wrap; gap: 6px; }
    .tache-actions-ca { margin-left: 0; }

    /* Podium */
    .histo-podium { gap: 10px; }
    .histo-podium-item { min-width: 100px; padding: 14px 16px 12px; }
    .histo-place-1 { transform: none; }

    /* Filtres galerie */
    .page-header > div:last-child { width: 100%; }
}

@media (max-width: 480px) {
    .sundays-grid { grid-template-columns: 1fr; }
    .stats-grid   { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .home-shortcuts { grid-template-columns: 1fr 1fr; }
    nav a { font-size: 0.88rem; }
    .pub-hero-img { max-height: 160px; }
    .pub-hero-inner { padding: 20px 16px 28px; }
    .pub-hero h2 { font-size: 1.3rem; }
}

/* ── Parcelle tag ────────────────────────────────────────── */
.parcelle-tag {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 5px;
}

/* ── Role badges ──────────────────────────────────────────── */
.role-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.role-president { background: #b45309; color: #fff; }
.role-admin  { background: #7c3aed; color: #fff; }
.role-bureau { background: #0369a1; color: #fff; }
.role-ca     { background: #0891b2; color: #fff; }
.role-membre { background: #6b7280; color: #fff; }

/* ── Data table ──────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.data-table th {
    text-align: left;
    padding: 9px 12px;
    background: var(--green-pale);
    color: var(--green-dark);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* ── Cotisation status ───────────────────────────────────── */
.cot-ok  { color: #16a34a; font-weight: 600; }
.cot-nok { color: #dc2626; font-weight: 600; }

/* ── Carte membre de parcelle ────────────────────────────── */
.pm-card {
    border: 1px solid var(--border);
    border-left: 4px solid var(--green-light);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}
.pm-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.pm-nom { font-size: 1.05rem; display: block; margin-bottom: 4px; }
.pm-dates { font-size: 0.85rem; color: var(--text-mid); white-space: nowrap; }
.pm-notes { font-size: 0.85rem; color: var(--text-mid); margin: 6px 0; }
.pm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.input-sm {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
}

/* ── Parcelle grid ───────────────────────────────────────── */
.parcelles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.parcelle-card {
    background: var(--white);
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 12px 10px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.parcelle-card:hover      { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.parcelle-card.payee      { border-color: #86efac; background: #f0fdf4; }
.parcelle-card.non-payee  { border-color: #fca5a5; background: #fef2f2; }
.parcelle-card.libre      { border-color: #e5e7eb; background: #f9fafb; }
.parcelle-card-wrap       { display: flex; flex-direction: column; gap: 4px; }
.parcelle-archive-form    { text-align: center; }
.parcelle-archive-btn     { width: 100%; font-size: 0.75rem; opacity: 0.7; }
.parcelle-archive-btn:hover { opacity: 1; }
.parcelle-num    { font-size: 1.1rem; font-weight: 800; color: var(--green-dark); }
.parcelle-meta   { font-size: 0.7rem; color: #9ca3af; }
.parcelle-member { font-size: 0.78rem; color: var(--text-dark); min-height: 1.2em; }
.parcelle-status { font-size: 0.7rem; color: var(--text-mid); }

/* ── Year navigation ─────────────────────────────────────── */
.year-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.year-nav a {
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: all 0.15s;
}
.year-nav a:hover, .year-nav a.active {
    background: var(--green-mid);
    color: white;
    border-color: var(--green-mid);
}

/* ── Form grid helpers ───────────────────────────────────── */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 16px; align-items: end; }
.form-grid-4 { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 16px; align-items: end; }

/* ── Misc helpers ────────────────────────────────────────── */
.label-hint { font-weight: normal; color: #9ca3af; font-size: 0.82em; }

/* ── Actualités ─────────────────────────────────────────── */
.actu-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin-bottom: 16px;
}
.actu-card.actu-epinglee {
    border-left: 4px solid var(--green-mid);
    background: #f6faf2;
}
.actu-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.actu-pin-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--green-mid);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.actu-titre {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green-dark);
    margin: 0 0 6px;
}
.actu-meta {
    font-size: 0.85rem;
    color: var(--text-mid);
}
.actu-modifiee {
    font-style: italic;
    opacity: 0.7;
}
.actu-actions { display: flex; gap: 4px; flex-shrink: 0; }
.actu-contenu {
    color: var(--text-dark);
    line-height: 1.75;
    font-size: 0.97rem;
    white-space: pre-wrap;
}
.actu-event-article { border-left: 4px solid #e6a817; }
.actu-event {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    margin: 14px 0 16px;
}
.actu-event-upcoming {
    background: #fff8e1;
    border: 1px solid #f0c040;
    color: #7a5c00;
}
.actu-event-today {
    background: #e8f5e9;
    border: 1px solid var(--green-mid);
    color: var(--green-dark);
}
.actu-event-past {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: var(--text-mid);
}
.event-tag {
    background: #e6a817;
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.actu-event-today .event-tag { background: var(--green-mid); }
.event-tag-past { background: #aaa; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green-mid);
}

/* ── Tâches du jardin ───────────────────────────────────── */
.taches-list { display: flex; flex-direction: column; gap: 10px; }
.tache-card {
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--white);
}
.tache-card.prio-haute  { border-left-color: #e53e3e; }
.tache-card.prio-normale { border-left-color: #d69e2e; }
.tache-card.prio-basse  { border-left-color: var(--green-light); }
.tache-card.tache-mine  { background: #eef6e8; }
.tache-card.tache-faite { background: #f9f9f9; }

/* ── Section tâches CA ───────────────────────────────────── */
.taches-ca-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid #7c3aed22;
    flex-wrap: wrap;
}
.taches-ca-header h2 { margin: 0; font-size: 1.1rem; color: #5b21b6; }
.taches-ca-header p  { margin: 0; font-size: 0.85rem; color: var(--text-mid); flex: 1 1 100%; }
.taches-ca-badge {
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.taches-ca-section {
    border-color: #c4b5fd;
    border-left: 3px solid #7c3aed;
}
.tache-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.tache-prio    { font-size: 0.8rem; font-weight: 600; }
.tache-categorie {
    font-size: 0.75rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2px 10px;
    color: var(--text-mid);
}
.tache-actions-ca { margin-left: auto; display: flex; gap: 4px; }
.tache-titre { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.tache-desc  { color: var(--text-mid); font-size: 0.9rem; margin-bottom: 6px; line-height: 1.5; }
.tache-meta  { font-size: 0.82rem; color: var(--text-mid); }

.card-details summary {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 1rem;
}
.card-details summary::-webkit-details-marker { display: none; }

/* ── Créneaux de permanence ──────────────────────────────── */
.slots-list { list-style: none; padding: 0; margin: 0 0 4px; }
.slot-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-light);
    margin-bottom: 6px;
}
.slot-mine {
    background: #eef6e8;
    border-color: var(--green-light);
}
.slot-time {
    font-weight: 700;
    color: var(--green-dark);
    white-space: nowrap;
    min-width: 110px;
    font-size: 0.95rem;
}
.slot-info { flex: 1; }
.slot-who  { font-weight: 600; }
.slot-notes { color: var(--text-mid); font-size: 0.88rem; }
.slot-cancel { margin: 0; }

/* ── Page publique (visiteurs non connectés) ─────────────── */
.public-body { background: var(--beige); }

.public-header {
    background: var(--green-dark);
    color: white;
    padding: 0 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
}
.public-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.public-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}
.public-logo .logo-icon { font-size: 1.8rem; }
.public-logo h1 { font-size: 1.1rem; margin: 0; }
.public-logo p  { font-size: 0.78rem; opacity: 0.8; margin: 0; }

.pub-hero {
    position: relative;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
    color: white;
    padding: 0;
    text-align: center;
    overflow: hidden;
}
.pub-hero-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    object-position: center;
    display: block;
}
.pub-hero-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px 24px 40px;
}
.pub-hero h2 { font-size: 2rem; margin-bottom: 14px; }
.pub-hero p  { font-size: 1.05rem; opacity: 0.9; line-height: 1.6; }

.pub-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.pub-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.pub-info { display: flex; flex-direction: column; gap: 20px; }

.pub-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.pub-card h3 { font-size: 1.05rem; margin-bottom: 12px; color: var(--green-dark); }
.pub-card p  { font-size: 0.92rem; color: var(--text-mid); line-height: 1.6; }

.pub-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pub-list li { font-size: 0.92rem; }

.pub-address {
    font-style: normal;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 12px;
}
.pub-maps-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--green-mid);
}
.pub-contact { font-size: 0.9rem; border-top: 1px solid var(--border); padding-top: 12px; }

.pub-aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; }

.pub-login-card { border-color: var(--green-light); }
.pub-login-card h3 { margin-bottom: 0; }

.pub-map-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.pub-footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 18px 24px;
    font-size: 0.85rem;
}

@media (max-width: 820px) {
    .pub-grid { grid-template-columns: 1fr; }
    .pub-aside { position: static; }
    .pub-hero h2 { font-size: 1.5rem; }
    .public-header-inner { padding: 10px 16px; }
    .pub-main { padding: 24px 16px 40px; }
    .pub-card { padding: 20px; }
    .pub-hero-inner { padding: 24px 16px 30px; }
    .pub-hero p { font-size: 0.92rem; }
    .pub-footer { padding: 14px 16px; font-size: 0.8rem; }
}
@media (max-width: 480px) {
    .public-header-inner { flex-direction: column; gap: 8px; align-items: flex-start; }
    .public-logo h1 { font-size: 1rem; }
    .pub-hero-img { max-height: 140px; }
    .pub-hero h2 { font-size: 1.2rem; }
    .pub-hero p { font-size: 0.85rem; }
    .pub-hero-inner { padding: 18px 14px 24px; }
    .pub-card { padding: 16px; }
    .pub-card h3 { font-size: 0.95rem; }
    .pub-card p, .pub-list li { font-size: 0.85rem; }
    .pub-address { font-size: 0.85rem; line-height: 1.6; }
    .pub-login-card .form-group label { font-size: 0.85rem; }
    .pub-map-wrap iframe { aspect-ratio: 1 / 1; }
}

/* ── Page d'accueil ─────────────────────────────────────── */
.home-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.home-banner h1 { font-size: 1.6rem; margin-bottom: 6px; }
.home-banner p  { opacity: 0.88; font-size: 0.97rem; }
.home-banner-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.home-cot {
    font-size: 0.88rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.15);
}
.home-cot.cot-ok  { background: rgba(134,239,172,0.25); }
.home-cot.cot-nok { background: rgba(252,165,165,0.25); }
.home-parcelles {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.home-parcelles .parcelle-tag { font-size: 0.8rem; }

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* Permanences */
.home-perm-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.home-perm-item  {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--beige);
}
.home-perm-mine  { border-color: var(--green-light); background: #eef6e8; }
.home-perm-date  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 0.92rem; }
.home-perm-you   { font-size: 0.78rem; background: var(--green-mid); color: white; padding: 2px 8px; border-radius: 20px; }
.home-perm-libre { font-size: 0.88rem; }
.home-perm-slots { display: flex; flex-direction: column; gap: 4px; }
.home-perm-slot  {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    padding: 2px 0;
}
.home-perm-slot-mine { font-weight: 700; color: var(--green-dark); }
.home-perm-slot-time { font-weight: 600; min-width: 90px; color: var(--green-dark); }
.home-perm-link  { font-size: 0.8rem; color: var(--green-mid); margin-top: 4px; text-decoration: none; }
.home-perm-link:hover { text-decoration: underline; }

/* Mes tâches */
.home-tasks-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.home-task-item  {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.home-task-item:last-child { border-bottom: none; }
.home-task-titre { flex: 1; }
.home-task-statut { font-size: 0.78rem; white-space: nowrap; }
.statut-en-cours { color: #b45309; }
.statut-dispo    { color: var(--text-mid); }

/* Actualités */
.home-actus-list  { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.home-actu-item   { display: flex; gap: 8px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.home-actu-item:last-child { border-bottom: none; padding-bottom: 0; }
.home-actu-pin    { font-size: 1rem; flex-shrink: 0; }
.home-actu-titre  { font-weight: 600; font-size: 0.95rem; margin-bottom: 2px; }
.home-actu-meta   { font-size: 0.78rem; color: var(--text-mid); margin-bottom: 4px; }
.home-actu-extrait{ font-size: 0.85rem; color: var(--text-mid); line-height: 1.4; }

/* Raccourcis */
.home-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
.home-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    flex: 1;
    min-width: 90px;
    max-width: 140px;
}
.home-shortcut:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.13); }
.home-shortcut-icon  { font-size: 1.6rem; }

.home-parcelles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.home-parcelle-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}
.home-parcelle-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.13); }
.home-parcelle-thumb {
    height: 140px;
    overflow: hidden;
    background: var(--green-pale);
}
.home-parcelle-thumb img { width: 100%; height: 100%; object-fit: cover; }
.home-parcelle-no-photo {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 1.8rem;
    color: var(--green-mid);
}
.home-parcelle-no-photo span { font-size: 0.75rem; color: var(--text-mid); }
.home-parcelle-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.home-parcelle-num  { font-weight: 700; font-size: 1rem; color: var(--green-dark); }
.home-parcelle-meta { font-size: 0.8rem; color: var(--text-mid); }
.home-parcelle-desc { font-size: 0.82rem; color: var(--text-mid); }
.home-parcelle-photos { font-size: 0.78rem; color: var(--text-mid); margin-top: 2px; }
.home-parcelle-btn {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--green-mid);
}

.home-parcelle-card-coll {
    border-left: 4px solid #0ea5a0;
}
.home-parcelle-card-coll .home-parcelle-num { color: #0b7a75; }
.home-parcelle-card-coll .home-parcelle-btn { color: #0b7a75; }

/* ── Galerie photos parcelle ─────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.gallery-grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 6px;
}
.gallery-item-sm {
    aspect-ratio: 1;
    max-width: 120px;
}
.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: #e5e7eb;
    box-shadow: var(--shadow);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
    display: block;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .2s;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 8px 10px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-date  { color: #fff; font-size: 0.78rem; font-weight: 600; }
.gallery-del-btn {
    background: rgba(239,68,68,0.85);
    border: none;
    color: #fff;
    border-radius: 4px;
    padding: 3px 7px;
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1.4;
}
.gallery-del-btn:hover { background: #dc2626; }

/* Info au survol */
.gallery-meta-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .2s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8px 10px;
    pointer-events: none;
}
.gallery-item:hover .gallery-meta-hover { opacity: 1; }
.gallery-meta-num    { color: #86efac; font-weight: 700; font-size: 0.8rem; }
.gallery-meta-leg    { color: #fff; font-size: 0.78rem; }
.gallery-meta-author { color: rgba(255,255,255,0.7); font-size: 0.75rem; }

/* Sections par parcelle */
.galerie-section { margin-bottom: 32px; }
.galerie-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--green-light);
    flex-wrap: wrap;
    gap: 8px;
}
.galerie-section-header h2 {
    font-size: 1.05rem;
    color: var(--green-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lb-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.lb-inner img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius);
    object-fit: contain;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lb-caption {
    color: #e5e7eb;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.5;
}
.lb-author { opacity: 0.7; }
.lb-close, .lb-prev, .lb-next {
    position: fixed;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.lb-close { top: 20px; right: 20px; font-size: 1rem; }
.lb-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.3); }

/* ── Historique des tâches — podium ─────────────────────── */
.histo-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin: 0 0 24px;
    flex-wrap: wrap;
}
.histo-podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 20px 24px 16px;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--white);
    min-width: 140px;
    text-align: center;
    box-shadow: var(--shadow);
}
.histo-place-1 {
    border-color: #f59e0b;
    background: #fffbeb;
    padding-top: 28px;
    transform: translateY(-8px);
}
.histo-place-2 { border-color: #9ca3af; background: #f9fafb; }
.histo-place-3 { border-color: #b45309; background: #fdf4e7; }
.histo-medal { font-size: 2rem; line-height: 1; }
.histo-podium-nom { font-weight: 700; font-size: 0.95rem; }
.histo-podium-score { font-size: 1.3rem; font-weight: 800; color: var(--green-dark); }
.histo-podium-detail { font-size: 0.75rem; color: var(--text-mid); }

.histo-section-title {
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green-light);
}
.histo-section-title h2 { font-size: 1.3rem; color: var(--green-dark); }
.histo-section-title p  { font-size: 0.88rem; color: var(--text-mid); margin-top: 4px; }
