/* ============================================================
   Paris Private Airport Transfer — RESERVATION.CSS
   Styles spécifiques à la page de réservation
   ============================================================ */


/* ─────────────────────────────────────────────────────────
   CALCULATEUR — TOGGLE ALLER / ALLER-RETOUR
───────────────────────────────────────────────────────── */
.trip-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 5px;
    gap: 4px;
    margin: 0 auto 2rem;
    width: fit-content;
    backdrop-filter: blur(6px);
}

.trip-toggle-btn {
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.3px;
}

.trip-toggle-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.trip-toggle-btn i {
    margin-right: 0.4rem;
}

.calc-price-sub {
    font-size: 0.85rem;
    opacity: 0.85;
    text-align: center;
    margin-top: 0.3rem;
    min-height: 1.2em;
}


/* ─────────────────────────────────────────────────────────
   CASE ALLER-RETOUR (formulaire)
───────────────────────────────────────────────────────── */
.roundtrip-wrapper {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.08), rgba(139, 115, 85, 0.05));
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0 0.5rem;
    transition: all 0.3s ease;
}

.roundtrip-wrapper.checked {
    border-color: var(--secondary);
}

.roundtrip-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.roundtrip-label input[type="checkbox"] {
    display: none;
}

.rt-check {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--secondary);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    color: transparent;
    font-size: 0.8rem;
}

.rt-check.is-checked {
    background: var(--secondary);
    color: var(--white);
}

.rt-text strong {
    display: block;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.15rem;
}

.rt-text span {
    font-size: 0.88rem;
    color: var(--text-light);
}

.rt-badge {
    margin-left: auto;
    background: var(--secondary);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.25s ease;
}

.rt-badge.show {
    opacity: 1;
    transform: scale(1);
}


/* ─────────────────────────────────────────────────────────
   HINT AUTO-SÉLECTION VÉHICULE
───────────────────────────────────────────────────────── */
.vehicle-hint {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.75rem;
    padding: 0.7rem 1rem;
    background: rgba(201, 169, 97, 0.12);
    border: 1px solid rgba(201, 169, 97, 0.4);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
}

.vehicle-hint.show {
    display: flex;
}

.vehicle-hint i {
    color: var(--secondary);
}


/* ─────────────────────────────────────────────────────────
   TÉLÉPHONE AVEC INDICATIF PAYS
───────────────────────────────────────────────────────── */
.phone-input-wrapper {
    display: flex;
    gap: 0;
    border: 2px solid rgba(201, 169, 97, 0.2);
    border-radius: 8px;
    overflow: visible;
    background: var(--white);
    transition: border-color 0.3s ease;
    position: relative;
    z-index: 50;
}

.phone-input-wrapper:focus-within {
    border-color: var(--secondary);
}

.phone-input-wrapper.error {
    border-color: #dc3545 !important;
}

.country-select-wrapper {
    position: relative;
    flex-shrink: 0;
    z-index: 9999;
}

.country-flag-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.8rem;
    background: var(--bg-light);
    border-right: 1px solid rgba(201, 169, 97, 0.2);
    cursor: pointer;
    min-width: 110px;
    user-select: none;
    height: 100%;
}

.country-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 99999;
    background: var(--white);
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    width: 260px;
    max-height: 280px;
    overflow: hidden;
}

.country-dropdown.open {
    display: flex;
    flex-direction: column;
}

.country-list {
    overflow-y: auto;
    max-height: 280px;
}

.country-option {
    width: 100%;
    border: none;
    background: var(--white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.9rem;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.country-option:hover {
    background: rgba(201, 169, 97, 0.1);
}

.country-option .flag {
    font-size: 1.2rem;
}

.country-option .name {
    flex: 1;
    color: var(--text-dark);
}

.country-option .code {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.85rem;
}

#phone-number {
    flex: 1;
    border: none;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    background: transparent;
    min-width: 0;
}


/* ─────────────────────────────────────────────────────────
   VALIDATION FORMULAIRE — ERREURS
───────────────────────────────────────────────────────── */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #dc3545 !important;
    background: #fff8f8;
}

.field-error {
    display: none;
    color: #dc3545;
    font-size: 0.82rem;
    margin-top: 0.35rem;
    font-weight: 500;
    align-items: center;
    gap: 0.3rem;
}

.field-error.show,
.form-group.has-error .field-error {
    display: flex;
}

.field-error i {
    font-size: 0.75rem;
}


/* ─────────────────────────────────────────────────────────
   RÉCAPITULATIF PRIX (avant confirmation)
───────────────────────────────────────────────────────── */
.price-summary {
    background: linear-gradient(135deg, var(--primary), #2c2c2c);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    color: var(--white);
    border: 1px solid rgba(201, 169, 97, 0.3);
}

.price-summary h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--secondary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

.price-line:last-child {
    border-bottom: none;
}

.price-line .label {
    color: rgba(255, 255, 255, 0.75);
}

.price-line .value {
    font-weight: 600;
    color: var(--white);
}

.price-line.night .value {
    color: #ffd700;
}

.price-line.discount .value {
    color: #4caf50;
}

.price-line.total {
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(201, 169, 97, 0.4) !important;
    border-bottom: none;
}

.price-line.total .label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
}

.price-line.total .value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--secondary);
    font-weight: 700;
}

.night-warning {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    font-size: 0.88rem;
    color: #ffd700;
    align-items: center;
    gap: 0.5rem;
}

.night-warning.show {
    display: flex;
}


/* ─────────────────────────────────────────────────────────
   MODE ADMINISTRATEUR
───────────────────────────────────────────────────────── */
.admin-toggle-btn {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 10000;
    background: var(--primary);
    color: var(--secondary);
    border: 2px solid var(--secondary);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.admin-toggle-btn:hover {
    background: var(--secondary);
    color: var(--primary);
}

.admin-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--primary);
    border-top: 2px solid var(--secondary);
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.admin-bar.visible {
    transform: translateY(0);
}

.admin-bar-label {
    color: var(--secondary);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.admin-badge {
    background: var(--secondary);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.admin-bar-note {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.admin-panel {
    display: none;
    background: #1a1a1a;
    border: 2px solid var(--secondary);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.admin-panel.open {
    display: block;
}

.admin-panel h4 {
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-field label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.admin-field input,
.admin-field select,
.admin-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #2a2a2a;
    border: 1px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
}

.admin-field input:focus,
.admin-field select:focus {
    border-color: var(--secondary);
}

/* Firefox */
.admin-field input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Chrome, Safari, Edge */
.admin-field input[type="number"]::-webkit-outer-spin-button,
.admin-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.admin-section-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.75rem;
}

.admin-price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-price-input {
    position: relative;
    flex: 1;
}

.admin-price-input input {
    padding-left: 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary) !important;
}

.admin-price-input::before {
    content: '€';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-weight: 700;
}

.admin-promo {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.admin-promo input {
    flex: 1;
}

.admin-promo-type {
    width: auto !important;
    flex-shrink: 0;
}

.admin-apply-btn {
    padding: 0.75rem 1.25rem;
    background: var(--secondary);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.admin-apply-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.admin-apply-btn.reset {
    background: #555;
    color: var(--white);
}

.admin-apply-btn.reset:hover {
    background: #444;
}

.admin-override-notice {
    display: none;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(201, 169, 97, 0.15);
    border: 1px solid rgba(201, 169, 97, 0.4);
    border-radius: 8px;
    color: var(--secondary);
    font-size: 0.88rem;
    align-items: center;
    gap: 0.5rem;
}

.admin-override-notice.show {
    display: flex;
}


/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-price-row {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-promo {
        flex-direction: column;
    }
}

@media (max-width: 500px) {
    .country-flag-display {
        min-width: 90px;
    }

    .country-dropdown {
        width: 240px;
    }
}
