/**
 * Styles principaux - WiFi Ticket System
 * 
 * Design moderne, responsive et orienté UX
 */

/* =============================================
   VARIABLES ET CONFIGURATION GLOBALE
   ============================================= */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* =============================================
   RESET ET STYLES DE BASE
   ============================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="wifi" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23wifi)"/></svg>');
    opacity: 0.3;
}

/* =============================================
   TICKET OPTIONS
   ============================================= */
.ticket-option {
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.ticket-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.ticket-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.ticket-option .price-display {
    font-size: 2rem;
    font-weight: 700;
}

/* =============================================
   BOUTON MAGIQUE (CONNECT)
   ============================================= */
.btn-magic {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 2rem;
}

.btn-magic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-magic:hover::before {
    left: 100%;
}

.btn-magic:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(25, 135, 84, 0.3);
}

/* =============================================
   TICKET POCKET (IMAGE)
   ============================================= */
.ticket-pocket {
    max-width: 400px;
    margin: 0 auto;
}

.ticket-pocket img {
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* =============================================
   FORM STYLES
   ============================================= */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

/* =============================================
   CARD STYLES
   ============================================= */
.card {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* =============================================
   TICKET CARD (MES ACHATS)
   ============================================= */
.ticket-card {
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.ticket-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ticket-card .card-body {
    padding: 1.5rem;
}

/* =============================================
   SUCCESS PAGE
   ============================================= */
.success-header {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
    position: relative;
}

.success-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

/* =============================================
   NAVIGATION
   ============================================= */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

/* =============================================
   BUTTON STYLES
   ============================================= */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* =============================================
   ALERTS
   ============================================= */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

.alert-dismissible .btn-close {
    padding: 0.75rem;
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .ticket-option .price-display {
        font-size: 1.5rem;
    }
    
    .btn-magic {
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .ticket-option {
        margin-bottom: 1rem;
    }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* =============================================
   UTILITAIRES
   ============================================= */
.cursor-pointer {
    cursor: pointer;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* =============================================
   ADMIN STYLES
   ============================================= */
.admin-navbar {
    background-color: var(--dark-color);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.admin-navbar .navbar-brand {
    color: white;
    font-weight: 700;
}

.admin-stats-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.admin-stats-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
    .navbar, footer, .btn, .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .ticket-pocket img {
        max-width: 300px;
    }
}