/* ====================================
   STYLES GÉNÉRAUX
   ==================================== */

/* Réinitialisation des marges et remplissages par défaut */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Style du corps de la page */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ====================================
   EN-TÊTE
   ==================================== */
header {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ====================================
   NAVIGATION
   ==================================== */
nav {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav li {
    margin: 0;
}

nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Effet au survol des liens */
nav a:hover {
    background-color: #e8f5e9;
    color: #1b5e20;
}

/* Style du lien actif */
nav a.active {
    background-color: #4caf50;
    color: white;
}

/* ====================================
   CONTENU PRINCIPAL
   ==================================== */
main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Sections cachées par défaut sauf celle active */
.section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.section.active {
    display: block;
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style des titres de section */
.section h2 {
    color: #2e7d32;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.section p {
    font-size: 1.1rem;
    color: #555;
    text-align: center;
    margin-bottom: 2rem;
}

/* ====================================
   CARTES DE LA PAGE D'ACCUEIL
   ==================================== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dashboard-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 1.2rem;
    margin-top: 1rem;
}

.dashboard-section h3 {
    color: #2e7d32;
    margin-bottom: 0.8rem;
    text-align: left;
    font-size: 1.2rem;
}

.dashboard-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
}

.dashboard-section-head h3 {
    margin-bottom: 0;
}

.dashboard-toggle-btn {
    border: 1px solid #a5d6a7;
    background: #f1f8e9;
    color: #1b5e20;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.dashboard-toggle-btn:hover {
    background: #e8f5e9;
}

.dashboard-meteo-body {
    position: absolute;
    top: 0;
    right: 0;
    width: min(540px, 94vw);
    height: 100%;
    background: #ffffff;
    box-shadow: -14px 0 28px rgba(0, 0, 0, 0.2);
    padding: 1rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.24s ease;
}

.dashboard-meteo-body.is-open {
    transform: translateX(0);
}

.dashboard-meteo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    z-index: 2500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dashboard-meteo-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-meteo-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.dashboard-meteo-drawer-header h4 {
    margin: 0;
    color: #2e7d32;
}

.dashboard-meteo-close {
    border: 1px solid #cfd8dc;
    background: #fff;
    color: #37474f;
    border-radius: 999px;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.dashboard-meteo-resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.55rem;
}

.dashboard-meteo-card {
    border: 1px solid #dfe9df;
    background: #f8fff8;
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
}

.dashboard-meteo-card.meteo-type-canicule,
.dashboard-day-card.meteo-type-canicule {
    background: #fff1e6;
    border-color: #ffb88a;
}

.dashboard-meteo-card.meteo-type-gel,
.dashboard-day-card.meteo-type-gel {
    background: #eef6ff;
    border-color: #9fc5ff;
}

.dashboard-meteo-card.meteo-type-pluie-forte,
.dashboard-day-card.meteo-type-pluie-forte {
    background: #edf4ff;
    border-color: #8fb0e8;
}

.dashboard-meteo-card.meteo-type-averses,
.dashboard-day-card.meteo-type-averses {
    background: #f1f7ff;
    border-color: #b7cdee;
}

.dashboard-meteo-card.meteo-type-vent-fort,
.dashboard-day-card.meteo-type-vent-fort {
    background: #f4f7fa;
    border-color: #b0bec5;
}

.dashboard-meteo-card.meteo-type-ensoleille,
.dashboard-day-card.meteo-type-ensoleille {
    background: #fffbe9;
    border-color: #ffd766;
}

.dashboard-meteo-card.meteo-type-variable,
.dashboard-day-card.meteo-type-variable,
.dashboard-meteo-card.meteo-type-calme,
.dashboard-day-card.meteo-type-calme {
    background: #f8fff8;
    border-color: #dfe9df;
}

.dashboard-meteo-card h4 {
    margin: 0 0 0.3rem;
    color: #1b5e20;
    font-size: 0.82rem;
}

.dashboard-meteo-card p {
    margin: 0.15rem 0 !important;
    text-align: left !important;
    font-size: 0.78rem !important;
}

.dashboard-meteo,
.dashboard-conseil {
    text-align: left !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.95rem !important;
}

.dashboard-actions {
    margin: 0;
    padding-left: 1.1rem;
    color: #37474f;
}

.dashboard-meteo-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard-meteo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.dashboard-meteo-table th,
.dashboard-meteo-table td {
    border: 1px solid #dfe9df;
    padding: 0.4rem;
    text-align: center;
}

.dashboard-meteo-table th {
    background: #f1f8e9;
    color: #2e7d32;
}

.dashboard-meteo-table input,
.dashboard-meteo-table select {
    width: 100%;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    padding: 0.25rem 0.35rem;
    font-size: 0.82rem;
}

.dashboard-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.8rem;
}

.dashboard-day-card {
    border: 1px solid #dfe9df;
    border-radius: 10px;
    padding: 0.7rem;
    background: #f8fff8;
}

.dashboard-day-card h4 {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #1b5e20;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.dashboard-day-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2rem;
}

.dashboard-day-weather {
    text-align: left !important;
    margin-bottom: 0.35rem !important;
    font-size: 0.78rem !important;
    color: #607d8b !important;
}

.dashboard-day-card ul {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.85rem;
}

.dashboard-empty {
    color: #607d8b !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    text-align: left !important;
}

.dashboard-priority-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.dashboard-priority-item {
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    font-size: 0.88rem;
}

.dashboard-priority-critique {
    background: #ffebee;
    color: #b71c1c;
    border-left: 4px solid #d32f2f;
}

.dashboard-priority-haute {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #f57c00;
}

.dashboard-priority-moyenne {
    background: #fff8e1;
    color: #8d6e00;
    border-left: 4px solid #ffb300;
}

.dashboard-priority-basse {
    background: #e8f5e9;
    color: #1b5e20;
    border-left: 4px solid #43a047;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

/* Effet au survol des cartes */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card h3 {
    color: #4caf50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: #666;
    font-size: 1rem;
}

/* ====================================
   PIED DE PAGE
   ==================================== */
footer {
    background-color: #2e7d32;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}

/* ====================================
   CALENDRIER DE PLANTATION
   ==================================== */

/* Information de zone géographique */
.zone-info {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Sélecteur de mois */
.mois-selecteur {
    text-align: center;
    margin-bottom: 2rem;
}

.mois-selecteur label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2e7d32;
    margin-right: 1rem;
}

.mois-selecteur select {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #4caf50;
    border-radius: 8px;
    background-color: white;
    color: #2e7d32;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mois-selecteur select:hover {
    background-color: #e8f5e9;
}

/* Informations du mois */
.info-mois {
    display: none;
    margin-bottom: 2rem;
}

.info-mois-card {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.info-mois-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.conseil-mois {
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.3);
}

/* Légende */
.legende {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    flex-wrap: wrap;
}

.legende span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Badges d'activité */
.badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
}

.badge-semis {
    background-color: #8bc34a;
}

.badge-plantation {
    background-color: #4caf50;
}

.badge-recolte {
    background-color: #ff9800;
}

/* Grille des légumes */
.calendrier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Carte de légume */
.legume-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.legume-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.legume-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8f5e9;
}

.legume-emoji {
    font-size: 2.5rem;
}

.legume-header h3 {
    color: #2e7d32;
    font-size: 1.3rem;
}

/* Timeline des activités */
.legume-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.mois-activite {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mois-nom {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    min-width: 30px;
}

.pas-activite {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

/* Informations du légume */
.legume-infos {
    margin-top: 1rem;
}

.legume-infos p {
    text-align: left;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.conseils-region {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 5px;
    font-size: 0.9rem !important;
    color: #856404 !important;
}

/* Message vide */
.message-vide {
    text-align: center;
    padding: 3rem;
    background-color: white;
    border-radius: 10px;
    font-size: 1.2rem;
    color: #999;
}

/* ====================================
   SECTION RAPPELS
   ==================================== */
.section-rappels {
    margin-top: 3rem;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.section-rappels h3 {
    color: #2e7d32;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.rappel-intro {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2e7d32;
    margin-bottom: 1rem;
}

.liste-rappels {
    list-style: none;
    padding: 0;
}

.rappel-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.rappel-item:hover {
    background-color: #e8f5e9;
    transform: translateX(5px);
}

.rappel-icone {
    font-size: 1.5rem;
}

.rappel-message {
    font-size: 1rem;
    color: #333;
}

.rappel-semis {
    border-left: 4px solid #8bc34a;
}

.rappel-plantation {
    border-left: 4px solid #4caf50;
}

.rappel-recolte {
    border-left: 4px solid #ff9800;
}

.conseil-mois-rappel {
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    font-weight: 500;
    color: #1565c0;
    text-align: center;
}

/* ====================================
   FICHES PLANTES
   ==================================== */

.fiches-filtres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.fiches-ajout {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.fiches-ajout h3 {
    margin: 0 0 0.8rem;
    color: #2e7d32;
    text-align: left;
}

.fiches-ajout-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.fiches-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

.fiches-ajout-form label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: #37474f;
}

.fiches-ajout-form input,
.fiches-ajout-form select,
.fiches-ajout-form textarea {
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 0.5rem 0.55rem;
    font-size: 0.9rem;
    font-family: inherit;
    background: #fff;
}

.fiches-filtre-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.8rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.fiches-filtre-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 0.4rem;
}

.fiches-filtre-item input,
.fiches-filtre-item select {
    width: 100%;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 0.55rem 0.6rem;
    font-size: 0.9rem;
    background: #fff;
}

.fiches-stats {
    margin-bottom: 1rem;
}

.fiches-stats p {
    text-align: left !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
    color: #37474f !important;
}

.fiches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.fiche-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #43a047;
}

.fiche-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.fiche-header h3 {
    margin: 0;
    color: #1b5e20;
    font-size: 1.1rem;
}

.fiche-latin {
    margin: 0.2rem 0 0 !important;
    text-align: left !important;
    font-size: 0.8rem !important;
    color: #607d8b !important;
}

.fiche-badge {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.fiche-calendrier,
.fiche-infos,
.fiche-associations {
    background: #f8fff8;
    border: 1px solid #e0efe0;
    border-radius: 8px;
    padding: 0.6rem;
    margin-bottom: 0.6rem;
}

.fiche-calendrier p,
.fiche-infos p,
.fiche-associations p {
    margin: 0.2rem 0 !important;
    text-align: left !important;
    font-size: 0.86rem !important;
}

.fiche-conseil {
    margin: 0 !important;
    text-align: left !important;
    font-size: 0.88rem !important;
    color: #37474f !important;
    background: #fffde7;
    border-left: 4px solid #fbc02d;
    border-radius: 4px;
    padding: 0.5rem 0.6rem;
}

/* ====================================
   SUIVI DES CULTURES + ARBRES
   ==================================== */

.suivi-vide {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.suivi-vide p {
    margin: 0.3rem 0 !important;
    text-align: left !important;
}

.suivi-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.suivi-card {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #2e7d32;
}

.suivi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.suivi-card-header h3 {
    margin: 0;
    color: #1b5e20;
    font-size: 1.05rem;
}

.suivi-card-header span {
    font-size: 0.78rem;
    color: #607d8b;
}

.suivi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.suivi-grid label {
    font-size: 0.8rem;
    color: #455a64;
}

.suivi-grid select,
.suivi-grid input,
.suivi-card textarea {
    width: 100%;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    font-size: 0.88rem;
    font-family: inherit;
    margin-top: 0.25rem;
}

.suivi-taches {
    border: 1px solid #dfe9df;
    border-radius: 8px;
    padding: 0.55rem;
    margin-bottom: 0.6rem;
}

.suivi-taches legend {
    font-size: 0.8rem;
    color: #2e7d32;
    padding: 0 0.3rem;
}

.suivi-taches label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.suivi-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.7rem;
}

.arbres-section {
    margin-top: 1.2rem;
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.arbres-section h3 {
    text-align: left;
    color: #2e7d32;
}

.arbres-section p {
    text-align: left !important;
    margin-bottom: 0.8rem !important;
}

.arbres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.9rem;
}

.arbre-card {
    border: 1px solid #dfe9df;
    border-radius: 10px;
    padding: 0.8rem;
    background: #f8fff8;
}

.arbre-header h4 {
    margin: 0;
    color: #1b5e20;
}

.arbre-header p {
    margin: 0.25rem 0 0.5rem !important;
    font-size: 0.85rem !important;
}

.arbre-soins p {
    margin: 0.2rem 0 !important;
    text-align: left !important;
    font-size: 0.85rem !important;
}

.arbre-calendrier {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.arbre-saison {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e6efe6;
    padding: 0.45rem;
}

.arbre-saison h5 {
    margin: 0 0 0.25rem;
    color: #2e7d32;
    font-size: 0.8rem;
}

.arbre-saison ul {
    margin: 0;
    padding-left: 1rem;
}

.arbre-saison li {
    font-size: 0.78rem;
    margin-bottom: 0.15rem;
}

/* ====================================
   JOURNAL DU POTAGER
   ==================================== */

.journal-section {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.journal-header-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
    align-items: end;
}

.journal-header-actions label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
}

.journal-header-actions input {
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
}

.journal-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.journal-form input[type="text"],
.journal-form input[type="date"],
.journal-form textarea {
    width: 100%;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 0.5rem 0.55rem;
    font-size: 0.9rem;
}

.journal-tags,
.journal-actions {
    border: 1px solid #dfe9df;
    border-radius: 8px;
    padding: 0.55rem;
}

.journal-tags legend,
.journal-actions legend {
    color: #2e7d32;
    font-size: 0.85rem;
    padding: 0 0.25rem;
}

.journal-tags label,
.journal-actions label {
    margin-right: 0.6rem;
    font-size: 0.85rem;
}

.journal-other-actions {
    margin: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.journal-other-action-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem;
}

.journal-other-action-row input {
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
}

.journal-inline-check {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
}

.journal-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
}

.journal-photo-card {
    margin: 0;
    border: 1px solid #dfe9df;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fff8;
}

.journal-photo-card.clickable-photo {
    cursor: zoom-in;
}

.journal-photo-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.journal-photo-card figcaption {
    font-size: 0.75rem;
    padding: 0.35rem;
    color: #455a64;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.journal-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.journal-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
}

.journal-filters input,
.journal-filters select {
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
}

.journal-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.journal-timeline-item {
    border: 1px solid #dfe9df;
    border-radius: 10px;
    padding: 0.8rem;
    background: #f8fff8;
}

.journal-timeline-item h4 {
    margin: 0 0 0.35rem;
    color: #1b5e20;
}

.journal-timeline-item p {
    text-align: left !important;
    margin: 0.2rem 0 !important;
    font-size: 0.87rem !important;
}

.journal-empty {
    margin: 0;
    color: #607d8b;
    font-size: 0.85rem;
    text-align: left;
}

.journal-photo-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.journal-photo-modal.show {
    display: flex;
}

.journal-photo-modal img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.journal-photo-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: #ffffff;
    color: #263238;
    border-radius: 999px;
    width: 2rem;
    height: 2rem;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ====================================
   RESPONSIVE - Adaptation mobile
   ==================================== */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    nav ul {
        flex-direction: column;
    }

    nav a {
        text-align: center;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .calendrier-grid {
        grid-template-columns: 1fr;
    }

    .legende {
        flex-direction: column;
        gap: 1rem;
    }

    .mois-selecteur {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .dashboard-meteo-body {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        padding: 0.9rem;
    }
}

/* ====================================
   PLANIFICATEUR DE POTAGER
   ==================================== */

.planificateur-container {
    display: grid;
    grid-template-columns: 250px 250px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Panneau de configuration */
.config-panel {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.config-panel h3 {
    color: #2e7d32;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.config-group {
    margin-bottom: 1rem;
}

.config-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.config-group input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.config-group input:focus {
    outline: none;
    border-color: #4caf50;
}

.info-dimensions {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #e8f5e9;
    border-radius: 5px;
    text-align: center;
}

.info-dimensions p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
    color: #2e7d32;
}

.actions-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.statut-sauvegarde {
    margin-top: 0.8rem;
    font-size: 0.82rem;
    color: #455a64;
}

.regles-alertes {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.regles-alertes h4 {
    color: #2e7d32;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.liste-alertes-regles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alerte-regle {
    font-size: 0.85rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
}

.alerte-ok {
    background-color: #e8f5e9;
    color: #1b5e20;
    border-left: 3px solid #4caf50;
}

.alerte-warning {
    background-color: #fff8e1;
    color: #8d6e00;
    border-left: 3px solid #ffb300;
}

.alerte-erreur {
    background-color: #ffebee;
    color: #b71c1c;
    border-left: 3px solid #f44336;
}

/* Boutons */
.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #4caf50;
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #2196f3;
    color: white;
}

.btn-success:hover {
    background-color: #1976d2;
}

.btn-danger {
    background-color: #f44336;
    color: white;
}

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-secondary {
    background-color: #757575;
    color: white;
}

.btn-secondary:hover {
    background-color: #616161;
}

/* Palette de légumes */
.legumes-palette {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.legumes-palette h3 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.instruction {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    text-align: center;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.legume-palette-item {
    appearance: none;
    border: 2px solid transparent;
    font: inherit;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background-color: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legume-palette-item:hover {
    background-color: #e8f5e9;
    border-color: #4caf50;
}

.legume-palette-item.selected {
    background-color: #4caf50;
    border-color: #2e7d32;
    color: white;
}

.legume-palette-item.selected .legume-nom-small {
    color: white;
}

.legume-emoji-big {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.legume-nom-small {
    font-size: 0.75rem;
    text-align: center;
    color: #555;
    font-weight: 500;
}

/* Conteneur de la grille */
.grille-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.grille-orientations {
    text-align: center;
    margin-bottom: 0.5rem;
}

.orientation-nord {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e3f2fd;
    border-radius: 5px;
    font-weight: 500;
    color: #1565c0;
}

/* Grille du potager */
#grille-potager {
    display: grid;
    gap: 2px;
    background-color: #e0e0e0;
    padding: 2px;
    border-radius: 5px;
    margin: 1rem auto;
    max-width: 100%;
    aspect-ratio: auto;
}

.grille-cellule {
    appearance: none;
    font: inherit;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.grille-cellule:focus-visible,
.legume-palette-item:focus-visible,
.btn:focus-visible,
.modal-close:focus-visible,
nav a:focus-visible {
    outline: 3px solid #1976d2;
    outline-offset: 2px;
}

.grille-cellule:hover {
    background-color: #e8f5e9;
    transform: scale(1.05);
    z-index: 10;
}

.grille-cellule.cellule-plantee {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
    border-color: #4caf50;
}

.grille-cellule.cellule-plantee:hover {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
}

.cellule-contenu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.cellule-emoji {
    font-size: 1.5rem;
}

.cellule-nom {
    font-size: 0.7rem;
    font-weight: 500;
    color: #1b5e20;
    text-align: center;
}

.grille-legende {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #fff3cd;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
}

.grille-legende p {
    margin: 0;
    font-size: 0.9rem;
    color: #856404;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.modal-close:hover {
    color: #000;
}

#modal-body h3 {
    color: #2e7d32;
    margin-bottom: 1rem;
    text-align: center;
}

.modal-info {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 5px;
    margin: 1rem 0;
}

.modal-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    text-align: left;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

/* Notifications */
.message-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    font-weight: 500;
}

.message-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.message-success {
    background-color: #4caf50;
    color: white;
}

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

.message-info {
    background-color: #2196f3;
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .planificateur-container {
        grid-template-columns: 1fr;
    }

    .palette-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .palette-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #grille-potager {
        gap: 1px;
    }

    .grille-cellule {
        min-height: 50px;
    }

    .cellule-emoji {
        font-size: 1.2rem;
    }

    .cellule-nom {
        font-size: 0.6rem;
    }
}
