/* =====================================================================
   CœursConnect — Hero search V3
   Formulaire de recherche doux, moderne, raffiné, épuré et responsive.
   Chargé après les CSS globaux afin d'éviter de casser le reste du site.
   ===================================================================== */

.premium-home .premium-search.cc-search-form {
    position: absolute;
    z-index: 70;
    left: 50%;
    bottom: -44px;
    display: grid;
    width: min(1180px, calc(100% - 72px));
    min-height: 86px;
    grid-template-columns: minmax(210px, 1fr) minmax(200px, .9fr) minmax(250px, 1.12fr) auto;
    align-items: stretch;
    gap: 9px;
    padding: 9px;
    transform: translateX(-50%);
    color: #2f2932;
    border: 1px solid rgba(237, 226, 232, .92);
    border-radius: 26px;
    background: rgba(255, 255, 255, .965);
    box-shadow:
        0 22px 58px rgba(45, 27, 39, .14),
        0 1px 0 rgba(255, 255, 255, .96) inset;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    isolation: isolate;
}

/* Chaque champ devient un petit panneau autonome : pas de traits verticaux durs. */
.premium-home .premium-search.cc-search-form .cc-search-field {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 66px;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 10px 13px;
    color: inherit;
    border: 1px solid rgba(236, 228, 233, .78);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(253,250,252,.96));
    box-shadow: none;
    cursor: default;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

.premium-home .premium-search.cc-search-form .cc-search-field:hover,
.premium-home .premium-search.cc-search-form .cc-search-field:focus-within {
    border-color: rgba(238, 115, 150, .34);
    background: #fff;
    box-shadow: 0 9px 24px rgba(91, 48, 69, .07);
}

.premium-home .premium-search.cc-search-form .cc-search-field-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ef557f;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff4f7, #ffe9f0);
    box-shadow: inset 0 0 0 1px rgba(239, 85, 127, .09);
}

.premium-home .premium-search.cc-search-form .cc-search-field-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.premium-home .premium-search.cc-search-form .cc-search-field-content {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

/* Le label reste DANS le champ, exactement aligné avec sa valeur. */
.premium-home .premium-search.cc-search-form .cc-search-field-label {
    display: block;
    margin: 0;
    color: #8d8490;
    font-size: 9.5px;
    font-weight: 720;
    line-height: 1;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ------- SELECT CUSTOM ------- */
.premium-home .premium-search.cc-search-form .cc-soft-select {
    position: relative;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-trigger {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 0;
    color: #302a33;
    border: 0;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-value {
    display: block;
    min-width: 0;
    overflow: hidden;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-value-label {
    display: block;
    overflow: hidden;
    color: #342e37;
    font-size: 14px;
    font-weight: 630;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-caret {
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    color: #aaa1ac;
    transition: color .18s ease, transform .18s ease;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-caret svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.premium-home .premium-search.cc-search-form .cc-soft-select.is-open .cc-soft-select-caret {
    color: #e84e79;
    transform: rotate(180deg);
}

/* Menu flottant : fin, blanc, peu chargé. */
.premium-home .premium-search.cc-search-form .cc-soft-select-menu {
    position: absolute;
    z-index: 110;
    top: calc(100% + 16px);
    left: -12px;
    width: calc(100% + 24px);
    min-width: 218px;
    max-width: none;
    overflow: hidden;
    padding: 6px;
    border: 1px solid rgba(232, 224, 230, .96);
    border-radius: 16px;
    background: rgba(255,255,255,.992);
    box-shadow: 0 20px 44px rgba(40, 26, 36, .13);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.premium-home .premium-search.cc-search-form .cc-soft-select-menu[hidden] { display: none; }

.premium-home .premium-search.cc-search-form .cc-soft-select-option {
    display: grid;
    width: 100%;
    min-height: 40px;
    grid-template-columns: 24px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 7px 9px;
    color: #4d4650;
    border: 0;
    border-radius: 11px;
    background: transparent;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 570;
    text-align: left;
    cursor: pointer;
    transition: color .16s ease, background .16s ease;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-option + .cc-soft-select-option {
    margin-top: 2px;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-option-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    color: #ec5b82;
    border-radius: 8px;
    background: #fff3f6;
    box-shadow: none;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-option-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-option::after {
    content: "";
    width: 6px;
    height: 6px;
    justify-self: center;
    border-radius: 50%;
    background: transparent;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-option:hover,
.premium-home .premium-search.cc-search-form .cc-soft-select-option:focus-visible {
    outline: 0;
    color: #cf4068;
    background: #fff6f8;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-option.is-selected {
    color: #cf4068;
    background: #fff8fa;
}

.premium-home .premium-search.cc-search-form .cc-soft-select-option.is-selected::after {
    background: #f05b84;
    box-shadow: 0 0 0 3px #ffe7ee;
}

/* ------- VILLE ------- */
.premium-home .premium-search.cc-search-form .cc-search-city-field {
    border-right: 1px solid rgba(236, 228, 233, .78);
}

.premium-home .premium-search.cc-search-form .cc-search-city-input {
    width: 100%;
    min-width: 0;
    height: 24px;
    margin: 0;
    padding: 0 2px 0 0;
    color: #342e37;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 570;
    line-height: 24px;
}

.premium-home .premium-search.cc-search-form .cc-search-city-input::placeholder {
    color: #aaa1ac;
    opacity: 1;
    font-weight: 500;
}

.premium-home .premium-search.cc-search-form .city-suggestions {
    position: absolute;
    z-index: 115;
    top: calc(100% + 16px);
    left: -12px;
    right: -12px;
    overflow: hidden;
    padding: 6px;
    border: 1px solid rgba(232, 224, 230, .96);
    border-radius: 16px;
    background: rgba(255,255,255,.992);
    box-shadow: 0 20px 44px rgba(40, 26, 36, .13);
    backdrop-filter: blur(18px);
}

.premium-home .premium-search.cc-search-form .city-suggestions button {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12.5px;
}

/* ------- BOUTON ------- */
.premium-home .premium-search.cc-search-form .cc-search-submit {
    position: relative;
    display: inline-flex;
    width: auto;
    min-width: 132px;
    min-height: 66px;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    gap: 8px;
    margin: 0;
    padding: 0 20px;
    color: #fff;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff709f 0%, #ff3c79 48%, #ec1d62 100%);
    box-shadow: 0 14px 28px rgba(236, 47, 103, .23);
    font-size: 12px;
    font-weight: 720;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.premium-home .premium-search.cc-search-form .cc-search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 17px 34px rgba(236, 47, 103, .29);
    filter: saturate(1.04);
}

.premium-home .premium-search.cc-search-form .cc-search-submit:active { transform: translateY(0); }

.premium-home .premium-search.cc-search-form .cc-search-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ------- DARK ------- */
html[data-theme="dark"] .premium-home .premium-search.cc-search-form {
    color: #f3edf5;
    border-color: rgba(83, 63, 78, .72);
    background: rgba(25, 20, 28, .96);
    box-shadow: 0 22px 58px rgba(0,0,0,.35);
}

html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-search-field {
    border-color: rgba(89, 72, 86, .64);
    background: rgba(36, 29, 39, .92);
}

html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-search-field-label { color: #a99fab; }
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-soft-select-value-label,
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-search-city-input { color: #f3edf5; }
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-search-field-icon,
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-soft-select-option-icon {
    color: #ff87ad;
    background: rgba(255, 81, 133, .12);
    box-shadow: inset 0 0 0 1px rgba(255, 135, 173, .10);
}
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-soft-select-menu,
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .city-suggestions {
    border-color: rgba(82, 65, 78, .9);
    background: rgba(28, 23, 31, .995);
    box-shadow: 0 20px 44px rgba(0,0,0,.38);
}
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-soft-select-option { color: #eee7f0; }
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-soft-select-option:hover,
html[data-theme="dark"] .premium-home .premium-search.cc-search-form .cc-soft-select-option.is-selected {
    color: #ffb5cb;
    background: rgba(255, 88, 139, .10);
}

/* ------- RESPONSIVE ------- */
@media (max-width: 1100px) {
    .premium-home .premium-search.cc-search-form {
        width: calc(100% - 42px);
        grid-template-columns: minmax(190px, 1fr) minmax(180px, .9fr) minmax(220px, 1.05fr) 64px;
    }
    .premium-home .premium-search.cc-search-form .cc-search-submit {
        min-width: 64px;
        width: 64px;
        padding: 0;
        border-radius: 18px;
    }
    .premium-home .premium-search.cc-search-form .cc-search-submit span { display: none; }
}

@media (max-width: 820px) {
    .premium-home .premium-search.cc-search-form {
        bottom: -119px;
        width: calc(100% - 30px);
        min-height: 0;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding: 8px;
        border-radius: 22px;
    }
    .premium-home .premium-search.cc-search-form .cc-search-city-field { grid-column: 1 / 2; }
    .premium-home .premium-search.cc-search-form .cc-search-submit {
        grid-column: 2 / 3;
        width: 100%;
        min-width: 0;
        min-height: 66px;
    }
    .premium-home .premium-search.cc-search-form .cc-search-submit span { display: inline; }
    .premium-home .profile-showcase { padding-top: 176px; }
}

@media (max-width: 560px) {
    .premium-home .premium-search.cc-search-form {
        bottom: -272px;
        width: calc(100% - 24px);
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 8px;
        border-radius: 22px;
    }
    .premium-home .premium-search.cc-search-form .cc-search-field {
        min-height: 58px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 11px;
        border-radius: 15px;
    }
    .premium-home .premium-search.cc-search-form .cc-search-field-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }
    .premium-home .premium-search.cc-search-form .cc-search-field-label { font-size: 8.5px; }
    .premium-home .premium-search.cc-search-form .cc-soft-select-value-label,
    .premium-home .premium-search.cc-search-form .cc-search-city-input { font-size: 13.5px; }
    .premium-home .premium-search.cc-search-form .cc-search-city-field,
    .premium-home .premium-search.cc-search-form .cc-search-submit {
        grid-column: 1;
    }
    .premium-home .premium-search.cc-search-form .cc-search-submit {
        width: 100%;
        min-height: 52px;
        border-radius: 15px;
    }
    .premium-home .premium-search.cc-search-form .cc-soft-select-menu,
    .premium-home .premium-search.cc-search-form .city-suggestions {
        top: calc(100% + 12px);
        left: -10px;
        right: -10px;
        width: auto;
        min-width: 0;
    }
    .premium-home .profile-showcase { padding-top: 342px; }
}


/* =====================================================================
   V5 — HERO SEARCH PLUS FIN
   Réduit uniquement la hauteur du formulaire et son chevauchement avec
   les CTA du hero. Le menu du compte et le reste du site ne sont pas touchés.
   ===================================================================== */
@media (min-width: 821px) {
    .premium-home .premium-search.cc-search-form {
        bottom: -38px;
        min-height: 66px;
        gap: 7px;
        padding: 7px;
        border-radius: 21px;
        box-shadow:
            0 15px 38px rgba(45, 27, 39, .105),
            0 1px 0 rgba(255, 255, 255, .96) inset;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field {
        min-height: 52px;
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
        padding: 7px 11px;
        border-radius: 14px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-icon svg {
        width: 17px;
        height: 17px;
        stroke-width: 1.6;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-content {
        gap: 3px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-label {
        font-size: 8.5px;
        line-height: 1;
        letter-spacing: .045em;
    }

    .premium-home .premium-search.cc-search-form .cc-soft-select-trigger {
        min-height: 20px;
    }

    .premium-home .premium-search.cc-search-form .cc-soft-select-value-label,
    .premium-home .premium-search.cc-search-form .cc-search-city-input {
        font-size: 13px;
        line-height: 20px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-city-input {
        height: 20px;
    }

    .premium-home .premium-search.cc-search-form .cc-soft-select-caret {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .premium-home .premium-search.cc-search-form .cc-soft-select-caret svg {
        width: 12px;
        height: 12px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-submit {
        min-height: 52px;
        min-width: 126px;
        padding: 0 17px;
        border-radius: 14px;
        box-shadow: 0 10px 22px rgba(236, 47, 103, .20);
        font-size: 11.5px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-submit:hover {
        box-shadow: 0 13px 27px rgba(236, 47, 103, .25);
    }

    .premium-home .premium-search.cc-search-form .cc-search-submit svg {
        width: 16px;
        height: 16px;
    }

    .premium-home .premium-search.cc-search-form .cc-soft-select-menu,
    .premium-home .premium-search.cc-search-form .city-suggestions {
        top: calc(100% + 11px);
    }

    .premium-home .profile-showcase {
        padding-top: 84px;
    }
}

@media (min-width: 821px) and (max-width: 1100px) {
    .premium-home .premium-search.cc-search-form {
        width: calc(100% - 34px);
        grid-template-columns: minmax(176px, 1fr) minmax(166px, .88fr) minmax(205px, 1.05fr) 56px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-submit {
        width: 56px;
        min-width: 56px;
        padding: 0;
        border-radius: 14px;
    }
}

@media (max-width: 820px) and (min-width: 561px) {
    .premium-home .premium-search.cc-search-form {
        bottom: -100px;
        gap: 7px;
        padding: 7px;
        border-radius: 19px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field {
        min-height: 54px;
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 9px;
        padding: 7px 10px;
        border-radius: 14px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-icon svg {
        width: 17px;
        height: 17px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-content { gap: 3px; }
    .premium-home .premium-search.cc-search-form .cc-search-field-label { font-size: 8.3px; }
    .premium-home .premium-search.cc-search-form .cc-soft-select-value-label,
    .premium-home .premium-search.cc-search-form .cc-search-city-input { font-size: 13px; }

    .premium-home .premium-search.cc-search-form .cc-search-submit {
        min-height: 54px;
        border-radius: 14px;
    }

    .premium-home .profile-showcase { padding-top: 152px; }
}

@media (max-width: 560px) {
    .premium-home .premium-search.cc-search-form {
        bottom: -244px;
        gap: 6px;
        padding: 7px;
        border-radius: 19px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field {
        min-height: 52px;
        grid-template-columns: 31px minmax(0, 1fr);
        gap: 9px;
        padding: 7px 10px;
        border-radius: 13px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-icon {
        width: 31px;
        height: 31px;
        border-radius: 10px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-icon svg {
        width: 16px;
        height: 16px;
    }

    .premium-home .premium-search.cc-search-form .cc-search-field-content { gap: 3px; }
    .premium-home .premium-search.cc-search-form .cc-search-field-label { font-size: 8px; }
    .premium-home .premium-search.cc-search-form .cc-soft-select-value-label,
    .premium-home .premium-search.cc-search-form .cc-search-city-input { font-size: 13px; }

    .premium-home .premium-search.cc-search-form .cc-search-submit {
        min-height: 48px;
        border-radius: 13px;
    }

    .premium-home .profile-showcase { padding-top: 310px; }
}
