/* =====================================================
   WHERY V2 - À LA CARTE - DESIGN COMPONENTS
   ===================================================== */

/* ── Layout Formulaire ── */
.v2c-row-main {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}
.v2c-field-month { flex: 0.8; }
.v2c-field-envies { flex: 1.5; }
.v2c-field-scope { flex: 1; }

.v2c-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    gap: 1rem;
}

/* ── Custom Dropdowns ── */
.v2c-dd {
    position: relative;
    width: 100%;
}
.v2c-trigger {
    width: 100%;
    height: 44px;
    background: #F7F5F0;
    border: 1.5px solid transparent;
    border-radius: 8px;
    padding: 0 2.2rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    box-sizing: border-box;
}
.v2c-trigger:focus, .v2c-trigger[aria-expanded="true"] {
    border-color: var(--w-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,90,101,0.1);
    outline: none;
}
.v2c-value {
    font-size: 0.92rem;
    color: var(--w-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.v2c-placeholder { color: #888; }
.v2c-chevron {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #666;
    transition: transform 0.2s;
    pointer-events: none;
}
.v2c-trigger[aria-expanded="true"] .v2c-chevron {
    transform: translateY(-50%) rotate(180deg);
}

/* ── Dropdown Panels ── */
.v2c-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--w-shadow-lg);
    border: 1px solid var(--w-border);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s;
}
.v2c-dd.open .v2c-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.v2c-option {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: var(--w-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s;
}
.v2c-option:hover { background: #F7F5F0; }
.v2c-option[aria-selected="true"] {
    background: rgba(255,90,101,0.08);
    font-weight: 600;
    color: var(--w-accent-dark);
}
.v2c-opt-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.v2c-option[aria-selected="true"] .v2c-opt-check {
    background: var(--w-accent);
    border-color: var(--w-accent);
}
.v2c-option[aria-selected="true"] .v2c-opt-check::after {
    content: "✓";
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

/* ── Envies Chips ── */
.v2c-chips {
    display: flex;
    gap: 0.3rem;
    overflow: hidden;
    padding-right: 0.5rem;
}
.v2c-chip {
    font-size: 0.75rem;
    background: var(--w-tag-beige);
    color: var(--w-text);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.v2c-chip-x {
    cursor: pointer;
    opacity: 0.6;
}
.v2c-chip-x:hover { opacity: 1; color: var(--w-accent); }

/* ── Volet Affiner (Drawer) ── */
.v2c-refine {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 20px;
    height: 44px;
    padding: 0 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}
.v2c-refine:hover, .v2c-refine[aria-expanded="true"] {
    background: rgba(0, 0, 0, 0.04);
}
.v2c-refine svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.v2c-refine-hint { font-weight: 400; color: var(--w-text-muted); }
.v2c-refine-count {
    background: var(--w-accent);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 12px;
}
.v2c-drawer {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height 0.3s ease, opacity 0.3s ease;
}
.v2c-drawer.open {
    height: auto;
    opacity: 1;
}
.v2c-drawer-inner {
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--w-border);
}
.v2c-drawer-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
.v2c-group { display: flex; flex-direction: column; gap: 0.5rem; }
.v2c-pills {
    display: grid;
    gap: 0.5rem;
}
.v2c-pills-temp, .v2c-pills-rain, .v2c-pills-crowd, .v2c-pills-cost {
    grid-template-columns: repeat(2, 1fr);
}
.v2c-pill {
    text-align: center;
    padding: 0.6rem 0.5rem !important;
    white-space: normal;
    overflow: visible;
    font-size: 0.85rem;
}
.v2c-pill {
    background: var(--w-bg);
    border: 1px solid transparent;
    color: var(--w-text);
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
}
.v2c-pill small {
    display: block;
    font-size: 0.65rem;
    color: #888;
    margin-top: 2px;
}
.v2c-pill:hover { background: #e5e5e5; }
.v2c-pill.active {
    background: rgba(255,90,101,0.1);
    color: var(--w-accent-dark);
    border-color: var(--w-accent);
}
.v2c-pill.active small { color: var(--w-accent); }
.v2c-drawer-foot {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}
.v2c-reset {
    background: none;
    border: none;
    color: var(--w-text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
}

/* ── Results Specifics ── */
.v2c-results-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.v2c-more-wrap {
    text-align: center;
    padding-bottom: 2rem;
}
.v2c-more {
    background: transparent;
    border: 1.5px solid var(--w-border);
    color: var(--w-text);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.v2c-more:hover {
    background: var(--w-white);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.v2c-results-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--w-text-muted);
    margin: -0.5rem auto 1.5rem;
    font-style: italic;
    max-width: 600px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .v2c-row-main { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .v2c-row-actions { flex-direction: column; align-items: stretch; margin-top: 0.5rem; }
    .v2c-refine { width: 100%; justify-content: center; }
    .v2-cta { width: 100%; justify-content: center; }
    .v2c-drawer-body { grid-template-columns: 1fr; gap: 1rem; }
}
