/* Styles de base pour l'application Auto-École */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    color: #333;
    padding-top: 115px; /* Espace pour le header sticky */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    color: #495057;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #3b3b3b;
    font-weight: 600;
}

header p {
    font-size: 1.2em;
    color: #6c757d;
}

/* Formulaires */
.form-container {
    background: white;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.btn-full {
    width: 100%;
    margin-bottom: 15px;
}

/* Messages d'erreur et de succès */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

/* Navigation */
.nav-links {
    text-align: center;
    margin-top: 20px;
}

.nav-links a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Options d'authentification */
.auth-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.auth-options .btn {
    flex: 1;
    max-width: 200px;
}

/* Checkbox personnalisé */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

/* Dashboard */
.dashboard-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-header h2 {
    color: #333;
}

.user-info {
    text-align: right;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .form-container {
        padding: 25px;
        margin: 0 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .auth-options {
        flex-direction: column;
        align-items: center;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        text-align: center;
        margin-top: 15px;
    }
}

/* Loader */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================================
   HEADER & NAVIGATION
   =========================================== */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar {
    height: 115px;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo et marque */
.nav-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.5em;
    color: #e67e22;
    text-decoration: none;
}

.logo {
    height: 85px;
    width: auto;
    margin: 15px 15px 15px 0;
    border-radius: 4px;
}

.brand-text {
    font-weight: 700;
}

/* Menu burger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #e67e22;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Menu principal */
.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 10px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    gap: 8px;
    min-height: 44px;
    box-sizing: border-box;
}

.nav-link:hover {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
    transform: translateY(-1px);
}

.nav-icon {
    font-size: 16px;
}

/* Lien vers le site principal */
.site-link {
    background: linear-gradient(135deg, #1E90FF 0%, #1565C0 100%);
    color: white !important;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(30, 144, 255, 0.4);
    padding: 10px 14px;
    min-height: 44px;
    box-sizing: border-box;
    font-size: 15px;
}

.site-link:hover {
    background: linear-gradient(135deg, #0D47A1 0%, #01579B 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.5);
}

.site-link img {
    width: 15px !important;
    height: 15px !important;
    filter: brightness(0) invert(1);
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.external-icon {
    font-size: 14px;
}

/* Styles pour utilisateur non connecté */
.nav-link.login-link {
    color: #495057 !important;
    background: transparent;
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    min-height: 44px;
    box-sizing: border-box;
}

.nav-link.login-link:hover {
    background: rgba(230, 126, 34, 0.1);
    border-color: #e67e22;
    color: #e67e22 !important;
}

/* Bouton Tableau de bord */
.dashboard-btn {
    background: #f8f9fa;
    color: #333 !important;
    font-weight: 500;
    border: 1px solid #e1e1e1;
    padding: 10px 20px;
    min-height: 44px;
    box-sizing: border-box;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dashboard-btn:hover {
    background: #fff;
    color: #e67e22 !important;
    border-color: #e67e22;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(230, 126, 34, 0.1);
}

.dashboard-btn:hover .nav-icon img {
    filter: invert(57%) sepia(73%) saturate(1234%) hue-rotate(349deg) brightness(98%) contrast(89%);
}

/* Bouton CTA inscription */
.nav-cta {
    background: #e67e22;
    color: white !important;
    font-weight: 600;
    border: 1px solid #e67e22;
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.2);
    padding: 12px 16px;
    min-height: 44px;
    box-sizing: border-box;
}

.nav-cta:hover {
    background: #d35400;
    border-color: #d35400;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

/* Dropdown utilisateur */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.dropdown-arrow {
    font-size: 10px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown-toggle:hover .dropdown-arrow,
.dropdown-menu.show ~ .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    list-style: none;
    padding: 8px 0;
    margin: 8px 0 0 0;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-link:hover {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
    padding-left: 25px;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

.site-link-dropdown:hover {
    background: rgba(0, 149, 255, 0.1) !important;
    color: #0095ff !important;
}

.site-link-mobile {
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
    background: transparent !important;
    font-weight: 500;
}

.site-link-mobile:hover {
    background: rgba(230, 126, 34, 0.1) !important;
    color: #e67e22 !important;
    border-color: #e67e22 !important;
}

.site-link-mobile:hover img {
    filter: invert(57%) sepia(73%) saturate(1234%) hue-rotate(349deg) brightness(98%) contrast(89%);
}

.site-link-mobile img {
    filter: brightness(0) saturate(100%) invert(32%) sepia(6%) saturate(622%) hue-rotate(182deg) brightness(95%) contrast(87%);
}

.logout-link {
    color: #dc3545;
}

.logout-link:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 768px) {
    body {
        padding-top: 95px;
    }

    .navbar {
        height: 95px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .logo {
        height: 75px;
        margin: 10px 10px 10px 0;
    }
    
    .brand-text {
        font-size: 1.2em;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 95px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        max-height: calc(100vh - 95px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        justify-content: center;
        padding: 15px;
        font-size: 16px;
        border-radius: 8px;
        min-height: 52px;
    }

    .nav-link.login-link {
        padding: 15px !important;
        min-height: 52px !important;
    }

    .nav-link.nav-cta {
        padding: 15px !important;
        min-height: 52px !important;
    }

    .site-link {
        margin-bottom: 10px;
    }

    .site-link-mobile {
        padding: 15px !important;
        min-height: 52px !important;
    }
    
    /* Dropdown en mobile */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(230, 126, 34, 0.05);
        border-radius: 8px;
        margin-top: 10px;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
    }
    
    .dropdown-menu.show {
        display: block;
    }
    
    .dropdown-menu::before {
        display: none;
    }
    
    .dropdown-link {
        padding: 10px 15px;
        text-align: center;
    }

    /* Séparateur mobile */
    .mobile-divider {
        height: 1px;
        background: #e9ecef;
        margin: 10px 0;
        width: 100%;
    }

    /* Affichage mobile/desktop pour navigation */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }
}

/* Classes pour navigation mobile/desktop */
@media (min-width: 769px) {
    .desktop-only {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* ==========================================================================
   STYLES COMMUNS POUR LES PAGES DE RÉSERVATION
   ========================================================================== */

/* Conteneur principal des pages de sélection */
.selection-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
}

/* Lien de retour (breadcrumb) */
.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Header des pages de sélection */
.selection-header {
    text-align: center;
    margin-bottom: 40px;
}

.selection-header h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 10px;
}

.selection-header p {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Grille de types de véhicules/cours */
.vehicle-types,
.type-selection {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

/* Cartes de sélection */
.vehicle-card,
.type-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.vehicle-card:hover,
.type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.2);
    border-color: #e67e22;
    text-decoration: none;
    color: white;
}

/* Icônes des cartes */
.vehicle-card .vehicle-icon,
.type-card .icon {
    font-size: 3.5em;
    margin-bottom: 20px;
}

/* Titres des cartes */
.vehicle-card .vehicle-title,
.type-card h3 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.3em;
    font-weight: 600;
}

/* Descriptions des cartes */
.vehicle-card .vehicle-description,
.type-card p {
    color: #7f8c8d;
    margin: 0;
    line-height: 1.5;
}

.type-card:hover p {
    color: #dddddd;
    font-weight: 400;
}

/* Conteneur de réservation */
.booking-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    .selection-container {
        padding: 10px;
    }
    
    .vehicle-types,
    .type-selection {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .vehicle-card,
    .type-card {
        padding: 20px;
    }
    
    .selection-header h1 {
        font-size: 1.8em;
    }
    
    .booking-container {
        padding: 20px;
        margin: 10px;
    }
}

/* Styles spécifiques pour la page principale de réservation */
.vehicle-card.voiture,
.vehicle-card.moto,
.vehicle-card.remorque {
    border-color: #e67e22;
}

.vehicle-card.voiture:hover,
.vehicle-card.moto:hover,
.vehicle-card.remorque:hover {
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.vehicle-card.voiture:hover .vehicle-description,
.vehicle-card.moto:hover .vehicle-description,
.vehicle-card.remorque:hover .vehicle-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Styles spécifiques pour la page de réservation moto */
.type-card:hover {
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.2);
    background: linear-gradient(135deg, #e67e22 0%, #f39c12 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .vehicle-types {
        grid-template-columns: 1fr;
    }
}