/* ================================================
   Appels d'offres — Page Layout
   ================================================ */

.call-for-tenders-page {
    margin: 0;
    padding-top: 1px; /* empêche le margin collapse du .hero premier enfant */
    background: var(--light-warm);
    min-height: 100vh;
    font-family: var(--font-rubik);
}


/* ── Hero ─────────────────────────────────────── */
/* margin + border-radius hérités de .hero dans hero-visual.css */

.hero--call-for-tenders {
    height: 420px;
}

.hero--call-for-tenders .hero__container {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 0 var(--padding-horizontal-large);
    text-align: center;
}

/* Heading toujours visible — pas de fade hover comme sur le home */
.hero--call-for-tenders .heading {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

/* Sous-titre légèrement réduit pour le long texte descriptif */
.hero--call-for-tenders .heading__subtitle {
    font-size: 15px;
    line-height: 1.6;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero--call-for-tenders {
        height: 320px;
    }

    .hero--call-for-tenders .hero__container {
        padding: 0 var(--padding-horizontal-medium);
    }
}


/* ── Form Section (page wrapper) ─────────────── */
/*
   Le hero a margin: 40px de chaque côté (hero-visual.css).
   On retracte de 190px supplémentaires par rapport aux bords du hero,
   soit 40 + 190 = 230px de padding horizontal depuis le viewport.
*/
.call-for-tenders__form-section {
    padding: 48px 230px 80px;
}

.call-for-tenders__container {
    background: var(--white);
    border-radius: var(--border-radius-large);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}


/* ── Form Actions ────────────────────────────── */

.call-for-tenders__form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.call-for-tenders__form-actions .cta-button {
    min-width: 200px;
}


/* ── Responsive ──────────────────────────────── */

@media (max-width: 1280px) {
    .call-for-tenders__form-section {
        padding: 48px 100px 80px;
    }
}

@media (max-width: 1024px) {
    .call-for-tenders__form-section {
        padding: 40px var(--padding-horizontal-large) 60px;
    }
}

@media (max-width: 768px) {
    .call-for-tenders__form-section {
        padding: 24px var(--padding-horizontal-small) 48px;
    }

    .call-for-tenders__container {
        padding: 24px 20px;
        border-radius: var(--border-radius-medium);
    }

    .call-for-tenders__form-actions {
        justify-content: stretch;
    }

    .call-for-tenders__form-actions .cta-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}


/* ── Destination select ──────────────────────────────────────────────────── */

.form-field__input--select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}


/* ── Panneau succès ──────────────────────────────────────────────────────── */

.cft-success:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 40px;
    gap: 16px;
}

.cft-success__icon {
    font-size: 56px;
    color: var(--primary, #37241c);
    line-height: 1;
}

.cft-success__title {
    font-family: var(--font-rubik);
    font-size: 22px;
    font-weight: 600;
    color: var(--dark1);
    margin: 0;
}

.cft-success__msg {
    font-size: 15px;
    color: var(--dark4);
    max-width: 440px;
    line-height: 1.6;
    margin: 0;
}

.cft-success__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px;
}

.cft-success__actions .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}


/* ── Erreur globale ──────────────────────────────────────────────────────── */

.cft-error:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff3f3;
    border: 1px solid #f5c2c2;
    border-radius: var(--border-radius-small, 6px);
    color: #c0392b;
    font-size: 14px;
    padding: 12px 16px;
    margin-top: 16px;
}

.cft-error i {
    flex-shrink: 0;
    font-size: 16px;
}


/* ── Loader dans le bouton ───────────────────────────────────────────────── */

.cft-btn-loader[hidden] {
    display: none !important;
}

.cft-btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Destination Autocomplete dans le formulaire ── */
.cft-destination-wrap {
    position: relative;
}

.cft-destination-wrap #destination-picker-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--white);
    border: 1px solid var(--gray2, #aeaeb2);
    border-top: none;
    border-radius: 0 0 var(--border-radius-small, 5px) var(--border-radius-small, 5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
    max-height: 280px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cft-destination-wrap .destination-picker__results {
    overflow-y: auto;
    max-height: 280px;
}

.cft-destination-wrap .destination-picker__input {
    padding-left: 44px;
}
