/* ===========================
   Variables et RÃ©initialisation
   =========================== */
:root {
    --terre: #5c4033;
    --vert-fonce: #2d5016;
    --vert-clair: #6b8e23;
    --beige: #f5e6d3;
    --bois: #8b6f47;
    --blanc-casse: #faf8f3;
    --bleu: #2980b9;
}

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


/* ===========================
   Styles gÃ©nÃ©raux
   =========================== */
body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, var(--beige) 0%, var(--blanc-casse) 100%);
    color: var(--terre);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

/* ===========================
   Navbar - Bandeau vert
   =========================== */
.navbar {
    background: var(--vert-fonce);
    color: var(--blanc-casse);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.navbar-left h1 {
    font-size: 1.8rem;
    font-weight: normal;
    margin: 0;
}

.navbar-right {
    display: flex;
    gap: 1rem;
}

.navbar-btn {
    color: var(--blanc-casse);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: background 0.3s;
    font-size: 1rem;
    display: inline-block;
}

.navbar-btn:hover {
    background: rgba(255,255,255,0.1);
}

.navbar-btn.active {
    background: var(--vert-clair);
    font-weight: bold;
}

.container {
    max-width: 95%;
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1;
}

/* ===========================
   Messages et Actions
   =========================== */
.message {
    background: var(--vert-clair);
    color: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.message-success {
    background: #28a745;
    color: white;
}

.message-error {
    background: #dc3545;
    color: white;
}

.message-warning {
    background: #ffc107;
    color: #333;
}

.message-info {
    background: #17a2b8;
    color: white;
}

.actions {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* ===========================
   Boutons
   =========================== */
button, .btn {
    background: var(--vert-clair);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

button:hover, .btn:hover {
    background: var(--vert-fonce);
    transform: translateY(-2px);
}

.btn-delete {
    background: #c44;
    padding: 0.5rem;
    font-size: 1.2rem;
}

.btn-delete:hover { 
    background: #a33; 
}

.btn-edit {
    background: var(--vert-clair);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
    margin-right: 0.5rem;
    transition: background 0.3s;
}

.btn-edit:hover {
    background: var(--vert-fonce);
}

.btn-suggestion {
    background: var(--bleu);
    color: white;
}

.btn-suggestion:hover {
    background: #1c5d8f;
}

/* ===========================
   Grilles et Cartes
   =========================== */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--bois);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card h3 {
    color: var(--vert-fonce);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.card p {
    margin: 0.5rem 0;
    color: var(--terre);
}

.card-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ===========================
   Modales
   =========================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border: 3px solid var(--bois);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--terre);
    transition: color 0.3s;
}

.close:hover { 
    color: var(--vert-fonce); 
}

/* ===========================
   Formulaires
   =========================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--vert-fonce);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--bois);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--vert-clair);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===========================
   Parcelle - Info
   =========================== */
.parcelle-info {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--vert-clair);
    margin-bottom: 1.5rem;
}

/* ===========================
   Parcelle - Grille
   =========================== */
.parcelle-grid {
    display: grid;
    gap: 8px;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 3px solid var(--bois);
}

.cell {
    aspect-ratio: 1;
    border: 2px solid var(--bois);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0.5rem;
}

.cell-empty {
    background: var(--beige);
    border-style: dashed;
}

.cell-empty:hover {
    background: #e8d9c5;
    transform: scale(1.05);
}

.cell-add {
    font-size: 2rem;
    color: var(--bois);
}

.cell-planifie { background: #fff4e6; }
.cell-plante { background: #d4edda; }
.cell-pousse { background: #c3e6cb; }
.cell-recolte { background: #b8daff; }
.cell-termine { background: #e2e3e5; }

.cell:not(.cell-empty):hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cell-content {
    text-align: center;
    font-size: 0.85rem;
}

.cell-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--vert-fonce);
}

.cell-content small {
    color: var(--terre);
    text-transform: uppercase;
    font-size: 0.7rem;
}

/* ===========================
   Tableaux
   =========================== */
.table-cultures {
    width: 100%;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--bois);
    overflow: hidden;
    border-collapse: collapse;
}

.table-cultures thead {
    background: var(--vert-fonce);
    color: var(--blanc-casse);
}

.table-cultures th,
.table-cultures td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--beige);
}

.table-cultures tbody tr:hover {
    background: var(--beige);
}

.table-cultures tbody tr:last-child td {
    border-bottom: none;
}

/* ===========================
   Onglets
   =========================== */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #ddd;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s;
}

.tab:hover {
    color: #333;
    background: #f5f5f5;
}

.tab.active {
    color: #2d5016;
    border-bottom-color: #2d5016;
    font-weight: bold;
}

.tab-count {
    display: inline-block;
    background: white;
    color: var(--vert-fonce);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

.tab.active .tab-count {
    background: var(--vert-fonce);
    color: white;
}

/* ===========================
   En-tÃªtes et Vues
   =========================== */
.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.column-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* ===========================
   Badges
   =========================== */
.badge { 
    display: inline-block; 
    padding: 0.2rem 0.6rem; 
    border-radius: 12px; 
    font-size: 0.75rem; 
    font-weight: 600; 
    text-transform: uppercase; 
}

.badge-ok { background: #d4edda; color: #155724; }
.badge-erreur { background: #f8d7da; color: #842029; }
.badge-avert { background: #fff3cd; color: #856404; }
.badge-info { background: #cce5ff; color: #004085; }
.badge-warning { background: #ffc107; color: #856404; }
.badge-danger { background: #dc3545; color: white; }

/* ===========================
   Compagnonnage
   =========================== */
.compagnon-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    margin: 0.25rem;
    border-radius: 3px;
    font-size: 0.85rem;
}

.compagnon-badge.bon {
    background: #d4edda;
    color: #155724;
}

.compagnon-badge.mauvais {
    background: #f8d7da;
    color: #721c24;
}

.compagnon-badge-mini {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    margin: 0.1rem;
    border-radius: 3px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.compagnon-badge-mini.bon {
    background: #d4edda;
    color: #155724;
}

.compagnon-badge-mini.mauvais {
    background: #f8d7da;
    color: #721c24;
}

.compagnons-preview {
    display: inline-block;
    padding: 0.2rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.compagnons-preview:hover {
    background: #f0f0f0;
}

.compagnon-plus {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    margin: 0.1rem;
    background: #e8e8e8;
    color: #666;
    border-radius: 3px;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.compagnon-plus:hover {
    background: #d0d0d0;
    color: #333;
}

/* ===========================
   Pied de page
   =========================== */
.footer {
    background: var(--vert-fonce);
    color: var(--blanc-casse);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

/* ===========================
   Bouton retour en haut
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 55px;
    height: 55px;
    background: var(--vert-clair);
    color: white;
    border: 3px solid var(--bois);
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--vert-fonce);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.back-to-top:active {
    transform: translateY(-3px) scale(1.02);
}

/* ===========================
   Page Debug
   =========================== */
.debug-header {
    background: var(--beige);
    border: 2px solid var(--bois);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.debug-header h2 { 
    font-size: 1.5rem; 
    font-weight: 600; 
    color: var(--vert-fonce); 
    margin: 0; 
}

.debug-header .version { 
    font-size: 0.78rem; 
    opacity: 0.7; 
    margin-left: auto; 
}

.debug-section { 
    background: white; 
    border: 2px solid var(--bois); 
    border-radius: 10px; 
    margin-bottom: 2rem; 
    overflow: hidden; 
}

.debug-section-titre {
    background: var(--beige); 
    border-bottom: 2px solid var(--bois);
    padding: 0.85rem 1.2rem; 
    font-size: 1.05rem; 
    font-weight: 600; 
    color: var(--vert-fonce);
    display: flex; 
    align-items: center; 
    gap: 0.6rem;
}

.debug-section-corps { 
    padding: 1.2rem; 
}

.barre-tests { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    padding: 0.6rem 1.2rem; 
    background: var(--beige); 
    border-bottom: 1px solid var(--bois); 
}

.barre-tests .chiffres { 
    font-weight: 700; 
    font-size: 1.1rem; 
}

.barre-tests .chiffres.tout-ok { 
    color: var(--vert-fonce); 
}

.barre-tests .chiffres.pas-ok { 
    color: #c0392b; 
}

.progress-bar { 
    flex: 1; 
    height: 12px; 
    background: #eee; 
    border-radius: 6px; 
    overflow: hidden; 
}

.progress-bar-fill { 
    height: 100%; 
    border-radius: 6px; 
}

.progress-bar-fill.ok { 
    background: var(--vert-clair); 
}

.progress-bar-fill.err { 
    background: #c0392b; 
}

.table-schema { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.9rem; 
}

.table-schema th { 
    background: var(--vert-fonce); 
    color: white; 
    padding: 0.6rem 0.8rem; 
    text-align: left; 
    font-weight: 600; 
}

.table-schema td { 
    padding: 0.55rem 0.8rem; 
    border-bottom: 1px solid #eee; 
}

.table-schema tr:last-child td { 
    border-bottom: none; 
}

.table-schema tr:hover td { 
    background: #faf5ef; 
}

.sous-table { 
    margin-top: 0.8rem; 
    margin-left: 1rem; 
    width: calc(100% - 1rem); 
}

.sous-table th { 
    background: #eee; 
    color: var(--terre); 
    font-size: 0.78rem; 
}

.sous-table td { 
    font-size: 0.82rem; 
    color: #555; 
}

.ligne-fn { 
    display: flex; 
    align-items: center; 
    gap: 0.8rem; 
    padding: 0.6rem 0; 
    border-bottom: 1px solid #f0ebe5; 
}

.ligne-fn:last-child { 
    border-bottom: none; 
}

.ligne-fn .fn-nom { 
    font-family: 'Courier New', monospace; 
    font-weight: 700; 
    color: var(--vert-fonce); 
    font-size: 0.92rem; 
    min-width: 300px; 
}

.ligne-fn .fn-params { 
    color: #777; 
    font-size: 0.82rem; 
    flex: 1; 
}

.ligne-fn .fn-source { 
    font-size: 0.75rem; 
    color: #2980b9; 
}

.ligne-test { 
    display: flex; 
    align-items: flex-start; 
    gap: 0.7rem; 
    padding: 0.55rem 0; 
    border-bottom: 1px solid #f0ebe5; 
}

.ligne-test:last-child { 
    border-bottom: none; 
}

.ligne-test .test-badge { 
    min-width: 55px; 
    text-align: center; 
    padding-top: 0.1rem; 
}

.ligne-test .test-label { 
    font-weight: 600; 
    min-width: 240px; 
    font-size: 0.9rem; 
}

.ligne-test .test-detail { 
    flex: 1; 
    font-size: 0.82rem; 
    color: #555; 
}

.ligne-test .test-temps { 
    font-size: 0.72rem; 
    color: #999; 
    white-space: nowrap; 
}

.ligne-test.erreur .test-detail { 
    color: #c0392b; 
}

.anomalie { 
    border-left: 4px solid #e67e22; 
    background: #fffaf0; 
    padding: 0.9rem 1rem; 
    border-radius: 0 6px 6px 0; 
    margin-bottom: 0.8rem; 
}

.anomalie:last-child { 
    margin-bottom: 0; 
}

.anomalie .anomalie-fichier { 
    font-size: 0.75rem; 
    color: #999; 
    font-family: monospace; 
}

.anomalie .anomalie-titre { 
    font-weight: 700; 
    color: #e67e22; 
    margin-bottom: 0.2rem; 
}

.anomalie .anomalie-detail { 
    font-size: 0.88rem; 
    color: var(--terre); 
    margin-top: 0.3rem; 
}

.erreur-connexion { 
    background: #f8d7da; 
    border: 2px solid #f5c6cb; 
    border-radius: 8px; 
    padding: 1.2rem; 
    color: #842029; 
}

.stat-css {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 2px solid var(--bois);
    text-align: center;
}

.stat-css-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-css-valeur {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--vert-fonce);
}

/* ===========================
   Page Calendrier
   =========================== */
.calendrier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--beige);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--bois);
}

.calendrier-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.calendrier-nav a {
    background: var(--vert-clair);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
}

.calendrier-nav a:hover {
    background: var(--vert-fonce);
    transform: translateY(-2px);
}

.calendrier-titre {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--vert-fonce);
}

.calendrier-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 2rem;
}

.calendrier-jour-nom {
    background: var(--vert-fonce);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: bold;
    border-radius: 6px;
    font-size: 0.9rem;
}

.calendrier-jour {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    min-height: 120px;
    padding: 0.5rem;
    position: relative;
    transition: all 0.2s;
}

.calendrier-jour:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.calendrier-jour-vide {
    background: var(--beige);
    opacity: 0.5;
    border-style: dashed;
}

.calendrier-jour-numero {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--vert-fonce);
    margin-bottom: 0.5rem;
}

.calendrier-jour-aujourdhui {
    background: #fff3cd;
    border-color: #ffc107;
}

.calendrier-jour-aujourdhui .calendrier-jour-numero {
    color: #ff6b00;
}

.evenement {
    font-size: 0.75rem;
    padding: 0.25rem 0.4rem;
    margin: 0.2rem 0;
    border-radius: 4px;
    line-height: 1.3;
}

.legende {
    display: flex;
    gap: 2rem;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--bois);
    margin-bottom: 2rem;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.legende-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legende-box-plantation {
    background: #d4edda;
    border-left: 3px solid #28a745;
}

.legende-box-recolte {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.legende-box-suggestion {
    background: #cce5ff;
    border-left: 3px solid #007bff;
}

.suggestions-mois {
    background: #e7f3ff;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #007bff;
    margin-bottom: 2rem;
}

.suggestions-mois strong {
    color: #004085;
}

.suggestions-mois span {
    color: #004085;
}

/* ===========================
   Page Dashboard
   =========================== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 3rem;
}

.stat-content {
    flex: 1;
}

.stat-nombre {
    font-size: 2rem;
    font-weight: bold;
    color: var(--vert-fonce);
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.stat-card-parcelles { border-left: 4px solid #8b6f47; }
.stat-card-cultures { border-left: 4px solid #6b8e23; }
.stat-card-plantations { border-left: 4px solid #2d5016; }
.stat-card-recoltes { border-left: 4px solid #e67e22; }

.dashboard-alertes {
    margin-bottom: 2rem;
}

.alerte {
    background: white;
    border: 2px solid;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alerte-titre {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.alerte-contenu {
    font-size: 0.9rem;
}

.alerte-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alerte-item:last-child {
    border-bottom: none;
}

.alerte-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alerte-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alerte-danger {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.dashboard-activite {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.activite-section {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1.5rem;
}

.activite-section h3 {
    color: var(--vert-fonce);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.table-activite {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.table-activite thead {
    background: var(--beige);
}

.table-activite th {
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--vert-fonce);
}

.table-activite td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--beige);
}

.table-activite tbody tr:hover {
    background: #faf5ef;
}

.vide {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-style: italic;
}

.dashboard-parcelles {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1.5rem;
}

.dashboard-parcelles h3 {
    color: var(--vert-fonce);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.parcelles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.parcelle-card {
    background: var(--beige);
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s;
}

.parcelle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.parcelle-nom {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--vert-fonce);
    margin-bottom: 0.75rem;
}

.parcelle-stats {
    margin-bottom: 0.75rem;
}

.parcelle-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.parcelle-stat-label {
    color: #666;
}

.parcelle-stat-valeur {
    font-weight: bold;
    color: var(--vert-fonce);
}

.parcelle-occupation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parcelle-barre {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.parcelle-barre-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--vert-clair), var(--vert-fonce));
    transition: width 0.3s;
}

.parcelle-taux {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--vert-fonce);
    min-width: 35px;
}

.parcelle-lien {
    display: inline-block;
    color: var(--vert-clair);
    text-decoration: none;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    transition: color 0.3s;
}

.parcelle-lien:hover {
    color: var(--vert-fonce);
}

/* ===========================
   Page Historique
   =========================== */
.historique-filtres {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filtre-groupe {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtre-groupe label {
    font-weight: bold;
    color: var(--vert-fonce);
    font-size: 0.9rem;
}

.filtre-groupe select {
    padding: 0.5rem;
    border: 2px solid var(--bois);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filtre-groupe select:hover {
    border-color: var(--vert-clair);
}

.filtre-info {
    margin-left: auto;
    display: flex;
    gap: 0.75rem;
}

.filtre-badge {
    background: var(--beige);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--terre);
    font-weight: 600;
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--beige);
}

.timeline-date {
    font-weight: bold;
    color: var(--vert-fonce);
    margin: 1.5rem 0 1rem;
    padding-left: 0.5rem;
    font-size: 1.1rem;
}

.timeline-date:first-child {
    margin-top: 0;
}

.timeline-item {
    position: relative;
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.timeline-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.timeline-icon {
    position: absolute;
    left: -2.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    background: white;
    border: 3px solid;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1;
}

.timeline-plantation {
    border-left: 4px solid #28a745;
}

.timeline-plantation .timeline-icon {
    border-color: #28a745;
}

.timeline-recolte {
    border-left: 4px solid #ffc107;
}

.timeline-recolte .timeline-icon {
    border-color: #ffc107;
}

.timeline-titre {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-titre strong {
    font-size: 1.1rem;
    color: var(--vert-fonce);
}

.timeline-meta {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.timeline-quantite {
    background: var(--vert-clair);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
}

.timeline-details {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.timeline-notes {
    background: var(--beige);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--terre);
}

.historique-vide {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
    font-size: 1.1rem;
}

.stats-section {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stats-section h3 {
    color: var(--vert-fonce);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.stats-vide {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-style: italic;
}

.ecart-plus {
    color: #dc3545;
    font-weight: bold;
}

.ecart-moins {
    color: #28a745;
    font-weight: bold;
}

.taux-barre {
    position: relative;
    height: 28px;
    background: #e0e0e0;
    border-radius: 14px;
    overflow: hidden;
}

.taux-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--vert-clair), var(--vert-fonce));
    transition: width 0.5s ease;
}

.taux-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ===========================
   Page TÃ¢ches
   =========================== */
.taches-header {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.taches-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.tache-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.tache-stat-nombre {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.tache-stat-label {
    font-size: 0.85rem;
    color: #666;
}

.tache-stat-todo .tache-stat-nombre { color: #007bff; }
.tache-stat-encours .tache-stat-nombre { color: #ffc107; }
.tache-stat-terminee .tache-stat-nombre { color: #28a745; }
.tache-stat-retard .tache-stat-nombre { color: #dc3545; }

.taches-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.taches-liste {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tache-card {
    background: white;
    border: 2px solid var(--bois);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.3s;
}

.tache-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tache-priorite-haute {
    border-left: 4px solid #dc3545;
}

.tache-priorite-moyenne {
    border-left: 4px solid #ffc107;
}

.tache-priorite-basse {
    border-left: 4px solid #6c757d;
}

.tache-retard {
    background: #fff5f5;
    border-color: #dc3545;
}

.tache-terminee {
    opacity: 0.6;
    border-left: 4px solid #28a745;
}

.tache-checkbox {
    flex-shrink: 0;
    padding-top: 0.2rem;
}

.tache-check-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.tache-check-btn:hover {
    transform: scale(1.2);
}

.tache-checkbox-icon {
    font-size: 1.5rem;
    color: var(--vert-clair);
}

.tache-checked {
    color: #28a745;
}

.tache-content {
    flex: 1;
    min-width: 0;
}

.tache-titre-ligne {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tache-titre {
    margin: 0;
    font-size: 1.1rem;
    color: var(--vert-fonce);
    word-break: break-word;
}

.tache-titre-termine {
    text-decoration: line-through;
    color: #999;
}

.tache-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tache-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.tache-type-arrosage { background: #cce5ff; color: #004085; }
.tache-type-recolte { background: #fff3cd; color: #856404; }
.tache-type-semis { background: #d4edda; color: #155724; }
.tache-type-desherbage { background: #d1ecf1; color: #0c5460; }
.tache-type-traitement { background: #f8d7da; color: #721c24; }
.tache-type-autre { background: #e2e3e5; color: #383d41; }

.tache-badge-haute {
    background: #f8d7da;
    color: #721c24;
}

.tache-badge-encours {
    background: #fff3cd;
    color: #856404;
}

.tache-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.tache-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.75rem;
}

.tache-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.tache-meta-retard {
    color: #dc3545;
    font-weight: bold;
}

.tache-meta-urgent {
    color: #ffc107;
    font-weight: bold;
}

.tache-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.taches-vide {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.taches-vide p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* ========================================
   ACCORDÃ‰ON POUR LA PAGE DEBUG
   AccordÃ©ons principaux et sous-accordÃ©ons
   ======================================== */

/* === ACCORDÃ‰ON PRINCIPAL === */
.debug-section {
    margin-bottom: 1rem;
}

.debug-section-titre {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 2rem !important;
    transition: background-color 0.2s ease;
}

.debug-section-titre:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.debug-section-titre::after {
    content: 'â–¼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: #666;
}

.debug-section.collapsed .debug-section-titre::after {
    transform: translateY(-50%) rotate(-90deg);
}

/* Gestion de l'affichage des sections principales */
.debug-section.collapsed .debug-section-corps {
    display: none !important;
}

.debug-section.expanded .debug-section-corps {
    display: block !important;
}

/* === SOUS-ACCORDÃ‰ONS === */
.sub-accordion {
    margin-bottom: 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.sub-accordion-title {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    background: #f8f8f8;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--vert-fonce, #2c3e50);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid transparent;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sub-accordion-title:hover {
    background-color: #f0f0f0;
}

.sub-accordion-title::after {
    content: 'â–¼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    font-size: 0.7rem;
    color: #888;
}

.sub-accordion.collapsed .sub-accordion-title::after {
    transform: translateY(-50%) rotate(-90deg);
}

.sub-accordion.expanded .sub-accordion-title {
    border-bottom-color: #e0e0e0;
}

/* Gestion de l'affichage du contenu des sous-accordÃ©ons */
.sub-accordion.collapsed .sub-accordion-content {
    display: none !important;
}

.sub-accordion.expanded .sub-accordion-content {
    display: block !important;
    padding: 1rem;
}

/* Ajustements des tableaux dans les sous-accordÃ©ons */
.sub-accordion-content .table-schema {
    margin: 0 !important;
}

/* Espacement pour les badges dans les titres */
.sub-accordion-title .badge {
    font-weight: normal;
    font-size: 0.8rem;
}

/* === FONCTIONS LIB DANS SOUS-ACCORDÃ‰ONS === */
.sub-accordion-content .ligne-fn {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 1rem;
    align-items: center;
}

.sub-accordion-content .ligne-fn:last-child {
    border-bottom: none;
}

.sub-accordion-content .fn-nom {
    font-weight: 600;
    color: var(--vert-fonce, #2c3e50);
    font-family: 'Courier New', monospace;
}

.sub-accordion-content .fn-params {
    color: #666;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.sub-accordion-content .fn-source {
    color: #999;
    font-size: 0.85rem;
    text-align: right;
}

/* === TESTS CRUD AVEC ERREURS === */
.sub-accordion.test-error {
    border-color: #ffdddd;
}

.sub-accordion.test-error .sub-accordion-title {
    background: #fff5f5;
}

/* === BOUTONS MINI === */
.btn-mini {
    background: var(--vert-clair);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-mini:hover {
    background: var(--vert-fonce);
    transform: translateY(-1px);
}

/* === TOAST NOTIFICATIONS === */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--vert-fonce);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-weight: 600;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* === BORDURES DE STATUT === */
.debug-section[data-status="ok"] .debug-section-titre {
    border-left: 4px solid #28a745;
}

.debug-section[data-status="error"] .debug-section-titre {
    border-left: 4px solid #dc3545;
}

.debug-section[data-status="warning"] .debug-section-titre {
    border-left: 4px solid #ffc107;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-activite {
        grid-template-columns: 1fr;
    }
    
    .parcelles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    * {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        padding: 0;
    }

    .navbar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .navbar-left h1 {
        font-size: 1.3em;
        word-break: break-word;
    }
    
    .navbar-left,
    .navbar-right {
        width: 100%;
    }
    
    .navbar-right {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .navbar-btn {
        flex: 1;
        min-width: 100px;
        padding: 0.5rem;
        font-size: 0.85rem;
        text-align: center;
    }

    .container {
        max-width: 100%;
        margin: 1rem auto;
        padding: 0 0.75rem;
    }

    .grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
    }
    
    button, .btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .table-cultures {
        font-size: 0.8em;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table-cultures th,
    .table-cultures td {
        padding: 0.5rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .dashboard-stats .stat-card {
        padding: 1rem;
    }

    .dashboard-stats .stat-icon {
        font-size: 2rem;
    }

    .dashboard-stats .stat-nombre {
        font-size: 1.5rem;
    }
    
    .parcelles-grid {
        grid-template-columns: 1fr !important;
    }
    
    .alerte-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .calendrier-grid {
        gap: 4px;
        grid-template-columns: repeat(7, 1fr);
    }
    
    .calendrier-jour {
        min-height: 70px;
        padding: 0.25rem;
    }
    
    .calendrier-jour-nom {
        font-size: 0.65rem;
        padding: 0.4rem;
    }

    .calendrier-jour-numero {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .evenement {
        font-size: 0.6rem;
        padding: 0.15rem;
    }
    
    .legende {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .legende-item {
        font-size: 0.8rem;
    }
    
    .calendrier-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .calendrier-header h2 {
        font-size: 1.2rem;
        word-break: break-word;
    }
    
    .calendrier-nav {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .calendrier-nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .historique-filtres {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 1rem;
    }

    .filtre-groupe {
        width: 100%;
    }

    .filtre-groupe select {
        width: 100%;
    }
    
    .filtre-info {
        margin-left: 0;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filtre-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline::before {
        left: 0.25rem;
    }
    
    .timeline-icon {
        left: -1.25rem;
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.9rem;
    }

    .timeline-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .timeline-titre {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-titre strong {
        font-size: 1rem;
    }

    .timeline-meta {
        font-size: 0.8rem;
    }

    .timeline-quantite {
        font-size: 0.85rem;
        padding: 0.2rem 0.5rem;
    }
    
    .taches-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }
    
    .taches-stats {
        justify-content: space-around;
    }
    
    .taches-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .taches-actions button {
        width: 100%;
    }
    
    .tache-card {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }

    .tache-titre {
        font-size: 1rem;
    }

    .tache-badges {
        gap: 0.25rem;
    }

    .tache-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .tache-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        margin: 20% auto;
    }

    .close {
        font-size: 1.5rem;
    }
}

/* Très petit écran (< 480px) */
@media (max-width: 480px) {
    .navbar-left h1 {
        font-size: 1.1em;
    }

    .navbar-btn {
        padding: 0.4rem;
        font-size: 0.75em;
        min-width: 70px;
    }

    .container {
        padding: 0 0.5rem;
    }

    .card {
        padding: 1rem;
    }

    .calendrier-jour {
        min-height: 60px;
    }

    .calendrier-jour-nom {
        font-size: 0.55rem;
        padding: 0.3rem;
    }

    .evenement {
        font-size: 0.55rem;
        padding: 0.1rem 0.2rem;
        margin: 0.1rem 0;
    }

    .tache-card {
        padding: 0.75rem;
    }

    .tache-titre {
        font-size: 0.95rem;
    }

    button, .btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .dashboard-stats .stat-icon {
        font-size: 1.5rem;
    }

    .dashboard-stats .stat-nombre {
        font-size: 1.3rem;
    }
}

/* ===========================
   Calendrier lunaire
   =========================== */

/* Bannière jour lunaire */
.lune-banniere {
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-width: 2px;
    border-style: solid;
}

.lune-banniere-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.lune-banniere-titre {
    font-weight: bold;
    font-size: 1.1rem;
}

.lune-banniere-conseil {
    color: #555;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* Cases biodynamiques */
.calendrier-jour-numero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--vert-fonce);
    margin-bottom: 0.5rem;
}

.lune-phase-icon {
    font-size: 0.85rem;
}

.lune-bio-label {
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Légende biodynamique */
.legende-bio-box {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}
.legende-bio-box-fruit   { background: #fdecea; border: 1px solid #e74c3c; }
.legende-bio-box-racine  { background: #f5ede3; border: 1px solid #8B4513; }
.legende-bio-box-fleur   { background: #f5eefa; border: 1px solid #8e44ad; }
.legende-bio-box-feuille { background: #eafaf1; border: 1px solid #27ae60; }

.legende-sep { color: #ccc; }

/* Suggestions de semis */
.suggestion-card {
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--beige);
    font-size: 0.9rem;
}

.suggestion-variete { color: #999; }
.suggestion-detail  { color: #666; }

/* Bouton replier événements */
.btn-evts-toggle {
    margin-top: 3px;
    font-size: 0.7rem;
    color: var(--vert-fonce);
    background: none;
    border: 1px solid var(--vert-clair);
    border-radius: 4px;
    padding: 1px 6px;
    cursor: pointer;
    width: 100%;
}
.btn-evts-toggle:hover {
    background: var(--vert-clair);
    color: white;
}

/* Événement variété */
.evt-variete { font-style: italic; color: #666; }
.evt-expo    { margin-left: 3px; }

/* ===== PAGE SAISON ===== */
.saison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.saison-card {
    background: white;
    border: 2px solid var(--vert-clair);
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.saison-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.saison-card.plein-saison {
    border-color: var(--vert-fonce);
    background: #f0f7ec;
}
.saison-emoji {
    font-size: 2.2em;
    margin-bottom: 6px;
}
.saison-nom {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--vert-fonce);
    margin-bottom: 6px;
}
.saison-co2 {
    font-size: 0.72em;
    color: #666;
    margin-top: 4px;
}
.source-note {
    font-size: 0.8em;
    color: #888;
    margin-top: 20px;
    text-align: center;
}
.parcelle-grid .cell.cell-selected {
    outline: 2px solid var(--vert-fonce, #2d7a2d);
    outline-offset: -2px;
    background: linear-gradient(135deg, rgba(45, 122, 45, 0.1), rgba(45, 122, 45, 0.2));
}