/* --- CUSTOM SELECT DROPDOWN --- */
.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    background-color: #f8fafc;
    border-radius: 1.25rem;
    padding: 1.125rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.custom-select-trigger:hover {
    background-color: #f1f5f9;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
    z-index: 500;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.custom-select-options.active {
    display: block;
    animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Option pour ouvrir vers le haut si près du bord bas */
.custom-select-container.open-up .custom-select-options {
    top: auto;
    bottom: calc(100% + 8px);
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(10px);
    }

    /* Start point */
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.custom-select-option {
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.custom-select-option:last-child {
    margin-bottom: 0;
}

.custom-select-option:hover {
    background-color: #f8fafc;
    color: #719671;
}

.custom-select-option.selected {
    background-color: #f0fdf4;
    /* Vert très pâle */
    color: #719671;
    font-weight: 700;
}

/* Puce circulaire */
.custom-select-option .bullet {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(113, 150, 113, 0.3);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-select-option.selected .bullet {
    background-color: #719671;
    border-color: #719671;
}

.custom-select-option.selected .bullet::after {
    content: '';
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
}

/* Typographie Variante */
.custom-select-option .variant {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.75rem;
    margin-left: 4px;
}

.custom-select-search {
    position: sticky;
    top: 0;
    background: white;
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    z-index: 10;
}

.custom-select-search input {
    width: 100%;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    outline: none;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.custom-select-search input:focus {
    border-color: rgba(113, 150, 113, 0.4);
    background: white;
}

/* --- INTERACTIVE SEARCH PILL --- */
.search-pill-container {
    position: relative;
    width: 100%;
}

.search-pill {
    background-color: #f8fafc;
    border: 1px solid rgba(113, 150, 113, 0.15);
    border-radius: 9999px;
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-pill:focus-within {
    background-color: white;
    border-color: #719671;
    box-shadow: 0 10px 25px -5px rgba(113, 150, 113, 0.15);
}

.search-pill input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
}

.search-pill input::placeholder {
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.search-pill .plus-btn {
    background-color: #719671;
    color: white;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(113, 150, 113, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-pill .plus-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(113, 150, 113, 0.4);
}

.search-pill .plus-btn:active {
    transform: scale(0.92);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 12px);
    left: 1.25rem;
    right: 4.5rem;
    background: white;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid #f1f5f9;
    z-index: 400;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    padding: 0.75rem;
}

.search-suggestions.active {
    display: block;
    animation: slideInSearch 0.3s ease-out;
}

@keyframes slideInSearch {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestion-item {
    padding: 0.875rem 1.25rem;
    border-radius: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    margin-bottom: 2px;
}

.suggestion-item:hover {
    background-color: #f8fafc;
    color: #719671;
}

.suggestion-item .bullet {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(113, 150, 113, 0.3);
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- SWIPEABLE CARDS (AGENDA) --- */
.harvest-card-row {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background-color: #f8fafc;
}

.harvest-card-actions {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 130px;
    /* Espace pour les icônes */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 1.25rem;
    gap: 0.75rem;
    z-index: 10;
}

.harvest-card-content {
    position: relative;
    background: white;
    z-index: 20;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.harvest-card-row.swiped .harvest-card-content {
    transform: translateX(-125px);
}

.action-btn-swipe {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn-swipe.edit {
    background-color: #f1f5f9;
    color: #94a3b8;
}

.action-btn-swipe.delete {
    background-color: #fef2f2;
    color: #ef4444;
}

.action-btn-swipe:active {
    transform: scale(0.9);
}