/* =======================================================
   GDF Disponibilites v2 - Styles
   Tous les styles critiques en !important pour
   neutraliser les overrides du theme Astra
   ======================================================= */

.gdf-booking {
    max-width: 100% !important;
    margin: 1.5em auto !important;
    padding: 1.5em !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
}

/* ── Grille desktop : 5 colonnes × 2 lignes ── */
.gdf-grid {
    display: grid !important;
    grid-template-columns: auto minmax(80px,1fr) auto minmax(120px,1fr) minmax(120px,auto) !important;
    grid-template-rows: auto auto !important;
    row-gap: 0.7em !important;
    column-gap: 0.6em !important;
    align-items: center !important;
    width: 100% !important;
}

/* Espace supplementaire entre col 2 et col 3 sur desktop :
   on ajoute un padding-left aux cellules de col 3 */
.gdf-grid > div:nth-child(3),
.gdf-grid > div:nth-child(8) {
    padding-left: 1.2em !important;
}

/* ── Responsive : 2 colonnes sur mobile/tablette ── */
@media (max-width: 700px) {
    .gdf-grid {
        grid-template-columns: auto 1fr !important;
        grid-template-rows: repeat(6, auto) !important;
    }
    /* Retirer le padding de col3 ajoute pour desktop */
    .gdf-grid > div:nth-child(3),
    .gdf-grid > div:nth-child(8) {
        padding-left: 0 !important;
    }
    /* Ordre mobile */
    .gdf-cell-label-arrivee  { order: 1 !important; }
    .gdf-cell-input-arrivee  { order: 2 !important; }
    .gdf-cell-label-depart   { order: 3 !important; }
    .gdf-cell-input-depart   { order: 4 !important; }
    .gdf-cell-cpt-adultes    { order: 5 !important; }
    .gdf-cell-lbl-adultes    { order: 6 !important; }
    .gdf-cell-cpt-bebes      { order: 7 !important; }
    .gdf-cell-lbl-bebes      { order: 8 !important; }
    /* Prix : pleine largeur, centré */
    .gdf-cell-prix           { order: 9 !important; grid-column: 1 / -1 !important; padding-left: 0 !important; justify-content: center !important; text-align: center !important; }
    /* Bouton : pleine largeur, centré */
    .gdf-cell-btn            { order: 10 !important; grid-column: 1 / -1 !important; justify-content: center !important; padding-left: 0 !important; }
}

/* Toutes les cellules : pas de flex-direction column par défaut */
.gdf-grid > div {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
}

/* ── Labels date (col 1 et 3) ── */
.gdf-cell-label {
    font-weight: 600 !important;
    font-size: 0.88em !important;
    color: #333 !important;
    white-space: nowrap !important;
}

/* ── Champs date (col 2 et 4) ── */
.gdf-cell-input {
    width: 100% !important;
}

.gdf-cell-input input[type="text"],
.gdf-cell-input input[type="text"].flatpickr-input {
    display: block !important;
    width: 100% !important;
    min-width: 80px !important;
    padding: 0.5em 0.7em !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 0.95em !important;
    background: #fff !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    float: none !important;
}

/* ── Prix indicatif (col 5 ligne 1) ── */
.gdf-cell-prix {
    padding-left: 0.8em !important;
}

.gdf-prix-inline {
    display: block !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0.45em 0.8em !important;
    font-size: 0.88em !important;
    font-weight: 700 !important;
    color: #000000 !important;
    white-space: nowrap !important;
    visibility: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.gdf-prix-inline.visible {
    visibility: visible !important;
}

/* ── Compteurs (col 1 et 3 ligne 2) ── */
.gdf-cell-counter {
    justify-content: center !important;
}

.gdf-counter {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
}

.gdf-counter input[type="number"] {
    display: inline-block !important;
    width: 32px !important;
    min-width: 32px !important;
    text-align: center !important;
    padding: 3px 2px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 0.95em !important;
    font-weight: 700 !important;
    -moz-appearance: textfield !important;
    background: #fff !important;
    pointer-events: none !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: content-box !important;
}
.gdf-counter input[type="number"]::-webkit-outer-spin-button,
.gdf-counter input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.gdf-counter .gdf-dec,
.gdf-counter .gdf-inc {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    border: 1px solid #0461BE !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: #0461BE !important;
    font-size: 1em !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background 0.15s, color 0.15s !important;
    float: none !important;
}
.gdf-counter .gdf-dec:hover:not(:disabled),
.gdf-counter .gdf-inc:hover:not(:disabled) {
    background: #0461BE !important;
    color: #fff !important;
}
.gdf-counter .gdf-dec:disabled,
.gdf-counter .gdf-inc:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    border-color: #bbb !important;
    color: #bbb !important;
}

/* ── Labels compteurs (col 2 et 4 ligne 2) ── */
.gdf-cell-counter-label {
    align-items: center !important;
}

.gdf-counter-label {
    font-size: 0.9em !important;
    color: #333 !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

.gdf-counter-label small {
    font-size: 1em !important;
    color: #333 !important;
    font-weight: 400 !important;
}

/* ── Bouton Réservez (col 5 ligne 2) ── */
.gdf-cell-btn {
    padding-left: 0.8em !important;
    justify-content: center !important;
}

.gdf-submit {
    display: inline-block !important;
    background-color: #0461BE !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    border-radius: 10px !important;
    border: none !important;
    text-decoration: none !important;
    line-height: normal !important;
    height: auto !important;
    min-height: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    cursor: pointer !important;
    transition: 0.3s !important;
    white-space: nowrap !important;
    margin: 0 !important;
    float: none !important;
}
.gdf-submit:hover:not(:disabled) {
    background-color: #034fa0 !important;
}
.gdf-submit:disabled {
    background-color: #b0b0b0 !important;
    cursor: not-allowed !important;
}

/* ── Ligne enfants optionnelle ── */
.gdf-row-enfants-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.6em !important;
    margin-top: 0.5em !important;
}

/* ── Erreur ── */
.gdf-error {
    color: #c62828 !important;
    font-size: 0.85em !important;
    margin-top: 0.8em !important;
    text-align: center !important;
}

/* ── Flatpickr : dates occupées ── */
.flatpickr-day.flatpickr-disabled {
    background: #ffcdd2 !important;
    color: #c62828 !important;
    text-decoration: line-through !important;
}
