/* ================================================================
   PUBLIC.CSS - VolDirect-Comores - Pages publiques
   ================================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #1a1a2e;
    background: #f0f4f8;
    min-height: 100vh;
}
a { text-decoration: none; color: inherit; }

/* ===== NAVBAR (pages internes) ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 48px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.navbar-logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #1a1a2e;
}
.navbar-logo img { height: 60px; }
.navbar-nav {
    display: flex;
    gap: 28px;
    list-style: none;
}
.navbar-nav a {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a2e;
    transition: color 0.2s;
}
.navbar-nav a:hover { color: #2563eb; }

/* ===== CONTAINER ===== */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px;
}
.container-sm { max-width: 720px; }
.container-xs { max-width: 640px; text-align: center; }

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    overflow: hidden;
}
.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 16px;
    font-weight: 700;
}
.card-body { padding: 24px; }

/* ===== ALERTS ===== */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #e0f2fe; color: #075985; border: 1px solid #bae6fd; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* ===== BUTTONS ===== */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    margin-bottom: 20px;
}
.btn-back:hover { background: #2563eb; }

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s;
    margin-top: 16px;
}
.btn-home:hover { background: #2563eb; }

.btn-submit {
    width: 100%;
    padding: 14px;
    background: #CE1126;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}
.btn-submit:hover { background: #b80f20; }

/* ===== FORMS ===== */
.form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.form-group { flex: 1; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a2e;
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: #2563eb; }


/* ================================================================
   PAGE: INDEX / HOME
   ================================================================ */
.page-home {
    background: #fff;
    overflow-x: hidden;
}

/* Navbar home (transparent, absolute) */
.page-home .navbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 18px 48px;
    background: transparent;
    box-shadow: none;
}
.page-home .navbar-logo img { height: 100px; }
.page-home .navbar-nav { gap: 32px; }
.page-home .navbar-nav a { font-size: 14px; }

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 60%, rgba(255,255,255,1) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 120px 48px 60px;
    display: flex;
    align-items: center;
    gap: 40px;
    background-image: url('../../images/background_ciel.jpg');
    background-size: cover;
    border-radius: 50px;
    height: 30vh;
}
.hero-left {
    flex: 1;
    min-width: 0;
}
.hero-right {
    flex: 0 0 auto;
    position: absolute;
    right: 0px;
}
.hero-right img {
    width: 50vh;
    max-width: 50vh;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
    animation: planeFloat 4s ease-in-out infinite;
    margin-right: -60px;
    margin-top: -15vh;
}
@keyframes planeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.hero-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 32px;
    color: #1a1a2e;
    margin-top: -140px;
}
.hero-title strong { color: #1a1a2e; }

/* Trip toggle */
.trip-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    margin-left: 20px;
}
.trip-toggle button {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.trip-toggle button.active {
    background: #CE1126;
    color: #fff;
}
.trip-toggle button:not(.active) {
    background: #1a1a2e;
    color: #FFFFFF;
}
.trip-toggle button:not(.active):hover {
    border: 2px solid #000000;
}

/* Search form */
.search-form {
    /* background: #fff; */
    /* border-radius: 16px; */
    /* box-shadow: 0 8px 40px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.06); */
    padding: 8px;
    display: flex;
    align-items: stretch;
    gap: 0;
    max-width: 100%;
}
.search-field {
    flex: 1;
    padding: 0px 10px;
    /* display: flex; */
    /* flex-direction: column; */
    justify-content: center;
    position: relative;
    min-width: 0;
    width: 25%;
    float: left;
}
.search-field:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    /* width: 1px; */
    /* background: #e5e7eb; */
}
.search-field label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 0px;
}
.search-field input,
.search-field select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #CCCCCC;
    padding: 10px;
    border-radius: 50px;
    width: 100%;
    margin-top: 10px;
    background: none;
}
.search-field input::placeholder,
.search-field select option:first-child {
    color: #9ca3af;
}
.search-field select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: none;
}
.field-passengers { flex: 0.6; }
.field-date { flex: 0.8; }

.search-btn {
    padding: 10px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    height: 35px;
    position: relative;
    float: left;
    margin-top: 30px;
    width: 120px;
}
.search-btn:hover { background: #2563eb; }

.field-retour.hidden { display: none; }

#formblanc {
    background: rgba(255, 255, 255, 0.5);
    padding: 50px;
    width: calc(100% - 110px);
    border: 1px solid #CCCCCC;
    margin-top: 0px;
    position: absolute;
    border-radius: 50px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}


/* ================================================================
   PAGE: RECHERCHE (resultats)
   ================================================================ */

/* Recap recherche */
.search-recap {
    background: #fff;
    border-radius: 12px;
    padding: 20px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.search-recap-route {
    font-size: 22px;
    font-weight: 700;
}
.search-recap-route .arrow { color: #2563eb; margin: 0 8px; }
.search-recap-details {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    gap: 20px;
}
.search-recap-details span { display: flex; align-items: center; gap: 4px; }

/* Section title */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    color: #1a1a2e;
}
.section-title .count {
    font-weight: 400;
    color: #6b7280;
    font-size: 14px;
}

/* Flight cards */
.flight-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }

.flight-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 24px;
    transition: box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
}
.flight-card:hover {
    box-shadow: 0 4px 20px rgba(37,99,235,0.12);
    transform: translateY(-1px);
}
.flight-card.selected {
    outline: 3px solid #2563eb;
    background: #f0f6ff;
}

.flight-number {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    min-width: 70px;
}
.flight-times {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}
.flight-time-block { text-align: center; }
.flight-time {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}
.flight-date {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}
.flight-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.flight-arrow-line {
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    position: relative;
}
.flight-arrow-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    border: 5px solid transparent;
    border-left: 7px solid #9ca3af;
}
.flight-route-label {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.flight-seats {
    text-align: center;
    min-width: 80px;
}
.flight-seats-number {
    font-size: 20px;
    font-weight: 700;
}
.seats-ok { color: #059669; }
.seats-low { color: #d97706; }
.seats-full { color: #dc2626; }
.flight-seats-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
}

.flight-status {
    min-width: 80px;
    text-align: center;
}

/* No results */
.no-results {
    text-align: center;
    padding: 48px 24px;
    color: #9ca3af;
}
.no-results-icon { font-size: 48px; margin-bottom: 12px; }
.no-results p { font-size: 15px; }

/* Selection bar */
.selection-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #1a1a2e;
    color: #fff;
    padding: 16px 48px;
    display: none;
    align-items: center;
    justify-content: space-between;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.selection-bar.visible { display: flex; }
.selection-bar-info { font-size: 14px; }
.selection-bar-info strong { color: #60a5fa; }
.btn-reserve {
    padding: 12px 32px;
    background: #CE1126;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-reserve:hover { background: #b80f20; }


/* ================================================================
   PAGE: RESERVATION (formulaire passager)
   ================================================================ */

/* Vol recap */
.vol-recap {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
}
.vol-recap:not(:last-child) { border-bottom: 1px solid #f3f4f6; }
.vol-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    min-width: 60px;
}
.vol-num { font-size: 16px; font-weight: 700; color: #2563eb; min-width: 70px; }
.vol-route { font-size: 14px; flex: 1; }
.vol-route strong { font-weight: 600; }
.vol-datetime { font-size: 13px; color: #6b7280; text-align: right; }


/* ================================================================
   PAGE: CONFIRMATION
   ================================================================ */

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #d1fae5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 24px;
}
.success-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}
.success-sub {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 32px;
}

.ref-number {
    font-size: 32px;
    font-weight: 800;
    color: #2563eb;
    letter-spacing: 2px;
    margin-bottom: 4px;
}
.ref-caption {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 28px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}
.info-row:not(:last-child) { border-bottom: 1px solid #f9fafb; }
.info-label { color: #6b7280; }
.info-value { font-weight: 600; }

/* Confirmation card header override */
.card-header-muted {
    padding: 14px 24px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
    .hero-right img { width: 340px; }
    .hero-title { font-size: 38px; }
}

@media (max-width: 768px) {
    /* Navbar */
    .navbar { padding: 12px 16px; }
    .page-home .navbar { padding: 14px 20px; }
    .page-home .navbar-nav { gap: 18px; }
    .page-home .navbar-nav a { font-size: 12px; }

    /* Container */
    .container { padding: 20px 16px; }

    /* Hero */
    .hero-content {
        flex-direction: column;
        padding: 100px 20px 40px;
        text-align: center;
    }
    .hero-right { order: -1; }
    .hero-right img { width: 280px; max-width: 70vw; }
    .hero-title { font-size: 30px; }
    .trip-toggle { justify-content: center; }
    .search-form {
        flex-direction: column;
        max-width: 100%;
        gap: 0;
    }
    .search-field::after { display: none !important; }
    .search-field { border-bottom: 1px solid #f3f4f6; }

    /* Recherche */
    .flight-card { flex-direction: column; gap: 12px; padding: 16px; }
    .flight-times { width: 100%; }
    .search-recap { flex-direction: column; text-align: center; }
    .selection-bar { padding: 12px 16px; flex-direction: column; gap: 10px; }
}

@media (max-width: 640px) {
    .form-row { flex-direction: column; gap: 12px; }
}
