/* =============================================================================
   Seasonal Plants Snippet Styles
   ============================================================================= */

.s_seasonal_plants {
    background-color: #f8f9fa;
}

.seasonal-plants-container {
    min-height: 400px;
}

.seasonal-plants-loader {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.seasonal-plants-loader.hidden {
    display: none;
}

.seasonal-plants-grid {
    opacity: 0;
    transition: opacity 0.3s ease-in;
    display: flex;
    flex-wrap: wrap;
}

.seasonal-plants-grid.loaded {
    opacity: 1;
    display: flex !important;
}

/* Plant Card Styles - Selon specs Diapositive13 */
.seasonal-plant-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    position: relative;
    margin: 0;
    padding: 0;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    .seasonal-plant-card:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .seasonal-plant-card:hover .seasonal-plant-detail-view {
        opacity: 1;
        visibility: visible;
    }

    .seasonal-plant-card:hover .seasonal-plant-image-wrapper {
        opacity: 0;
    }

    .seasonal-plant-card:hover .seasonal-plant-body {
        opacity: 0;
    }
}

.seasonal-plant-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.seasonal-plant-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Vue détail au hover - harmonisée avec la première vue */
.seasonal-plant-detail-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Image de semis full (même style que l'image principale) */
.seasonal-plant-detail-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.seasonal-plant-detail-image img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* Body harmonisé avec la première vue */
.seasonal-plant-detail-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.seasonal-plant-detail-name {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.seasonal-plant-detail-latin {
    font-size: 0.8125rem;
    font-style: italic;
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.seasonal-plant-detail-chars {
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.seasonal-plant-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.seasonal-plant-name {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.seasonal-plant-latin {
    font-size: 0.8125rem;
    font-style: italic;
    color: #6c757d;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.seasonal-plant-characteristics {
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.seasonal-plant-char-item {
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #495057;
    display: flex;
    align-items: center;
}

.seasonal-plant-char-item .char-label {
    font-weight: 500;
    margin-right: 0.375rem;
    color: #495057;
}

.seasonal-plant-char-item .char-value {
    color: #212529;
    font-weight: 400;
}

.seasonal-plant-char-item .char-icon {
    margin-right: 0.5rem;
    color: #6c757d;
    width: 16px;
    text-align: center;
}

/* Calendar Styles (identique à plant_essential_info) */
.seasonal-plant-calendar {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.seasonal-plant-calendar-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.seasonal-plant-calendar-months {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 2px;
}

.seasonal-plant-calendar-month {
    width: calc(8.33% - 2px);
    height: 20px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #495057;
}

.seasonal-plant-calendar-month.sowing {
    background-color: #17a2b8; /* bg-info */
    color: white;
}

.seasonal-plant-calendar-month.planting {
    background-color: #2d5016; /* bg-greenforge */
    color: white;
}

.seasonal-plant-calendar-month.harvest {
    background-color: #ffc107; /* bg-warning */
    color: #212529;
}

.seasonal-plant-calendar-month.empty {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.seasonal-plant-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.seasonal-plant-calendar-legend-item {
    display: flex;
    align-items: center;
}

.seasonal-plant-calendar-legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 0.5rem;
    display: inline-block;
}

.seasonal-plant-calendar-legend-color.sowing {
    background-color: #17a2b8;
}

.seasonal-plant-calendar-legend-color.planting {
    background-color: #2d5016;
}

.seasonal-plant-calendar-legend-color.harvest {
    background-color: #ffc107;
}

.seasonal-plant-calendar-legend-label {
    font-weight: 600;
    color: #6c757d;
}

/* Info succincte avec pictos (pas de photos) */
.seasonal-plant-info-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seasonal-plant-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.8125rem;
}

.seasonal-plant-info-icon {
    font-size: 1rem;
    color: #2d5016;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.seasonal-plant-info-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.seasonal-plant-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.125rem;
}

.seasonal-plant-info-value {
    font-size: 0.8125rem;
    color: #212529;
    font-weight: 500;
    word-wrap: break-word;
}

/* Responsive Design */
@media (max-width: 768px) {
    .seasonal-plants-grid {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .seasonal-plants-grid.loaded {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    /* Layout mobile : Structure rigide pour garantir le 1:1 */
    .seasonal-plant-card {
        flex-direction: row !important;
        display: flex !important;
        align-items: flex-start !important;
        height: 165px !important;
        min-height: 165px !important;
        margin: 0 !important;
        border-radius: 8px !important;
        border: 1px solid #eee !important;
        overflow: hidden !important;
        background: white !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    }
    
    .seasonal-plant-image-wrapper,
    .seasonal-plant-detail-image {
        width: 165px !important;
        height: 165px !important;
        flex: 0 0 165px !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: #f8f9fa !important;
        position: relative !important;
    }
    
    .seasonal-plant-image,
    .seasonal-plant-detail-image img {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        display: block !important;
    }
    
    .seasonal-plant-body,
    .seasonal-plant-detail-body {
        width: auto !important;
        flex: 1 !important;
        padding: 0.5rem 0.75rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        overflow: hidden !important;
        height: 165px !important;
    }

    .seasonal-plant-name,
    .seasonal-plant-detail-name {
        font-size: 1rem !important; /* Reduced title */
        font-weight: 700 !important;
        margin: 0 0 2px 0 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        color: #212529 !important;
        flex-shrink: 0 !important;
        line-height: 1.2 !important;
    }
    
    .seasonal-plant-latin,
    .seasonal-plant-detail-latin {
        font-size: 0.8rem !important; /* Reduced latin */
        margin: 0 0 4px 0 !important;
        color: #6c757d !important;
        font-style: italic !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        line-height: 1.2 !important;
    }
    
    .seasonal-plant-info-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important; /* Reduced gap */
        margin: 0 !important;
        flex-grow: 1 !important;
    }
    
    .seasonal-plant-info-item {
        background: #f8f9fa !important;
        padding: 4px 8px !important; /* Reduced padding */
        border-radius: 6px !important;
        border: none !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important; /* Reduced gap */
        min-width: 0 !important;
        min-height: 34px !important; /* Reduced height */
        height: auto !important;
        width: 100% !important;
    }
    
    /* No longer need grid-column since we use flex-column */
    .seasonal-plant-info-full {
        width: 100% !important;
    }
    
    .seasonal-plant-info-icon {
        font-size: 0.9rem !important; /* Slightly smaller icon */
        width: 18px !important;
        color: #2d5016 !important;
        text-align: center !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
    }
    
    .seasonal-plant-info-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    .seasonal-plant-info-label {
        font-size: 0.55rem !important; /* Reduced label */
        font-weight: 600 !important;
        color: #888 !important;
        text-transform: uppercase !important;
        margin: 0 !important;
        line-height: 1 !important;
    }
    
    .seasonal-plant-info-value {
        font-size: 0.75rem !important; /* Reduced value */
        font-weight: 700 !important;
        color: #333 !important;
        line-height: 1.1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .seasonal-plant-detail-view {
        flex-direction: row !important;
        height: 100% !important;
        padding: 0 !important;
        gap: 0 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: white !important;
    }

    /* Support du toggle tactile sur mobile */
    .seasonal-plant-card.active .seasonal-plant-detail-view {
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media (min-width: 769px) {
    .seasonal-plants-grid {
        /* 4 colonnes sur desktop */
    }
}

/* Water and Sun badges */
.seasonal-plant-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.seasonal-plant-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: #f8f9fa;
    color: #212529;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}
