/* Go Livraison — formulaires site public (section download, modales, contact) */

.s-download,
.s-download .row,
.gl-dual-actions,
.gl-apply-wrap,
.gl-apply-form,
.gl-modal__form {
    box-sizing: border-box;
}

.s-download .row.gl-dual-actions,
.gl-apply-form__grid,
.gl-modal__form {
    width: 100%;
    max-width: 100%;
}

/* Section download — pleine largeur */
.s-download__badges-block.gl-dual-actions {
    width: 100%;
    max-width: min(100%, 1480px);
    margin-left: auto;
    margin-right: auto;
}

.gl-dual-actions > .column {
    min-width: 0;
    width: 100%;
}

.gl-apply-wrap {
    width: 100%;
    min-width: 0;
}

/* Grille champs livreur */
.gl-apply-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem 1.25rem;
    align-items: start;
    width: 100%;
}

.gl-apply-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.gl-apply-form__field--full {
    grid-column: 1 / -1;
}

.gl-apply-form label,
.gl-modal__label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.35;
}

.gl-apply-form__field input,
.gl-apply-form__field select,
.gl-apply-form input:not([type="checkbox"]):not([type="radio"]),
.gl-apply-form select,
.gl-apply-form textarea,
.gl-modal__input,
.gl-modal__input--select,
.gl-modal__input--textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gl-apply-form input[type="file"],
.gl-modal__input[type="file"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.85rem 1rem;
    border: 1px dashed rgba(15, 23, 42, 0.22);
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    height: auto;
    line-height: 1.4;
}

.gl-apply-form input[type="file"]::file-selector-button,
.gl-modal__input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.gl-apply-form__field input,
.gl-apply-form__field select {
    margin-bottom: 0;
}

.gl-apply-form select,
.gl-modal__input--select {
    padding-right: 3rem;
}

.gl-client-panel .btn {
    white-space: normal;
    line-height: 1.35;
    min-height: 3.2rem;
    height: auto;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

/* Modales commande */
.gl-modal__form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem 1rem;
    align-items: start;
}

.gl-modal__group {
    min-width: 0;
    margin-bottom: 0;
}

.gl-modal__actions {
    grid-column: 1 / -1;
}

.gl-modal__success {
    grid-column: 1 / -1;
}

/* Tableaux site (si présents dans sections publiques) */
.gl-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gl-table {
    width: 100%;
    min-width: 640px;
    table-layout: auto;
}

.gl-table th,
.gl-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.gl-table td.wrap,
.gl-table th.wrap {
    white-space: normal;
    word-break: break-word;
    min-width: 140px;
}

@media (max-width: 1400px) {
    .s-download__badges-block.gl-dual-actions {
        max-width: 100%;
    }
}

@media (max-width: 1200px) {
    .gl-dual-actions > .column.lg-4,
    .gl-dual-actions > .column.lg-8 {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .gl-apply-wrap {
        padding: 2rem 1.5rem;
    }

    .gl-client-panel {
        padding: 2rem 1.5rem;
    }

    .gl-apply-form__grid,
    .gl-modal__form {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .gl-apply-wrap {
        padding: 1.5rem 1.1rem;
    }

    .gl-apply-form__grid,
    .gl-modal__form {
        grid-template-columns: 1fr;
    }

    .gl-driver-type__grid {
        grid-template-columns: 1fr;
    }

    .gl-client-panel .btn {
        width: 100%;
    }
}
