/**
 * Travel Booking Master - Frontend Styles
 * Styles généraux pour tout le plugin
 *
 * @package TravelBookingMaster
 * @author Hatem Chanoufi
 */

/* ===========================
   VARIABLES CSS
   =========================== */
:root {
    /* Couleurs principales */
    --tbm-primary:  #1e88e5;
    --tbm-primary-dark: #1565c0;
    --tbm-primary-light: #64b5f6;
    --tbm-secondary: #ff6f00;
    --tbm-secondary-dark: #e65100;
    --tbm-secondary-light: #ff9800;
    
    /* Couleurs de statut */
    --tbm-success: #4caf50;
    --tbm-error: #f44336;
    --tbm-warning: #ff9800;
    --tbm-info: #2196f3;
    
    /* Couleurs neutres */
    --tbm-white: #ffffff;
    --tbm-black: #212121;
    --tbm-gray-100: #f5f5f5;
    --tbm-gray-200: #eeeeee;
    --tbm-gray-300: #e0e0e0;
    --tbm-gray-400: #bdbdbd;
    --tbm-gray-500: #9e9e9e;
    --tbm-gray-600: #757575;
    --tbm-gray-700: #616161;
    --tbm-gray-800: #424242;
    --tbm-gray-900: #212121;
    
    /* Typographie */
    --tbm-font-family:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --tbm-font-size-base: 16px;
    --tbm-font-size-sm: 14px;
    --tbm-font-size-lg: 18px;
    --tbm-font-size-xl: 20px;
    --tbm-line-height:  1.6;
    
    /* Espacements */
    --tbm-spacing-xs: 4px;
    --tbm-spacing-sm: 8px;
    --tbm-spacing-md:  16px;
    --tbm-spacing-lg: 24px;
    --tbm-spacing-xl: 32px;
    --tbm-spacing-2xl: 48px;
    
    /* Bordures */
    --tbm-border-radius:  8px;
    --tbm-border-radius-sm:  4px;
    --tbm-border-radius-lg: 12px;
    --tbm-border-color: var(--tbm-gray-300);
    
    /* Ombres */
    --tbm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --tbm-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tbm-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --tbm-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --tbm-transition:  all 0.3s ease;
}

/* ===========================
   RESET & BASE
   =========================== */
. tbm-package-builder *,
.tbm-booking-wizard *,
.tbm-my-bookings * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

. tbm-package-builder,
.tbm-booking-wizard,
.tbm-my-bookings {
    font-family: var(--tbm-font-family);
    font-size: var(--tbm-font-size-base);
    line-height: var(--tbm-line-height);
    color: var(--tbm-black);
}

/* ===========================
   BOUTONS
   =========================== */
.tbm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tbm-spacing-sm);
    padding: 12px 24px;
    font-size: var(--tbm-font-size-base);
    font-weight: 600;
    text-decoration: none;
    border:  none;
    border-radius:  var(--tbm-border-radius);
    cursor: pointer;
    transition: var(--tbm-transition);
    white-space: nowrap;
}

.tbm-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--tbm-shadow-md);
}

.tbm-btn:active {
    transform: translateY(0);
}

.tbm-btn: disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none ! important;
}

/* Bouton primaire */
.tbm-btn-primary {
    background:  linear-gradient(135deg, var(--tbm-primary), var(--tbm-primary-dark));
    color: var(--tbm-white);
}

.tbm-btn-primary:hover {
    background: linear-gradient(135deg, var(--tbm-primary-dark), var(--tbm-primary));
}

/* Bouton secondaire */
. tbm-btn-secondary {
    background: var(--tbm-white);
    color: var(--tbm-primary);
    border: 2px solid var(--tbm-primary);
}

.tbm-btn-secondary:hover {
    background: var(--tbm-primary);
    color: var(--tbm-white);
}

/* Bouton succès */
.tbm-btn-success {
    background: var(--tbm-success);
    color: var(--tbm-white);
}

/* Bouton danger */
.tbm-btn-danger {
    background: var(--tbm-error);
    color: var(--tbm-white);
}

/* Tailles */
.tbm-btn-sm {
    padding: 8px 16px;
    font-size: var(--tbm-font-size-sm);
}

.tbm-btn-lg {
    padding: 16px 32px;
    font-size: var(--tbm-font-size-lg);
}

. tbm-btn-large {
    padding: 18px 48px;
    font-size: var(--tbm-font-size-xl);
    font-weight: 700;
}

. tbm-btn-block {
    width: 100%;
    display: flex;
}

/* ===========================
   FORMULAIRES
   =========================== */
.tbm-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--tbm-spacing-md);
    margin-bottom: var(--tbm-spacing-md);
}

.tbm-form-field {
    display: flex;
    flex-direction: column;
    gap: var(--tbm-spacing-xs);
}

.tbm-form-field label {
    font-weight:  600;
    font-size: var(--tbm-font-size-sm);
    color: var(--tbm-gray-700);
}

.tbm-form-field input[type="text"],
.tbm-form-field input[type="email"],
.tbm-form-field input[type="tel"],
.tbm-form-field input[type="date"],
.tbm-form-field input[type="number"],
.tbm-form-field select,
.tbm-form-field textarea {
    padding: 12px 16px;
    font-size: var(--tbm-font-size-base);
    border: 2px solid var(--tbm-border-color);
    border-radius: var(--tbm-border-radius);
    transition: var(--tbm-transition);
    font-family: var(--tbm-font-family);
}

.tbm-form-field input: focus,
.tbm-form-field select:focus,
. tbm-form-field textarea: focus {
    outline: none;
    border-color: var(--tbm-primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* ===========================
   CARTES
   =========================== */
.tbm-card {
    background: var(--tbm-white);
    border-radius: var(--tbm-border-radius);
    box-shadow: var(--tbm-shadow-sm);
    padding: var(--tbm-spacing-lg);
    transition: var(--tbm-transition);
}

.tbm-card:hover {
    box-shadow: var(--tbm-shadow-md);
}

/* ===========================
   BADGES
   =========================== */
. tbm-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size:  var(--tbm-font-size-sm);
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
}

.tbm-badge-primary {
    background: var(--tbm-primary-light);
    color: var(--tbm-primary-dark);
}

.tbm-badge-success {
    background: #c8e6c9;
    color: #2e7d32;
}

/* ===========================
   MESSAGES
   =========================== */
. tbm-message {
    padding: var(--tbm-spacing-md);
    border-radius: var(--tbm-border-radius);
    margin-bottom: var(--tbm-spacing-md);
    display: flex;
    align-items: center;
    gap: var(--tbm-spacing-sm);
}

.tbm-message-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--tbm-success);
}

.tbm-message-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--tbm-error);
}

/* ===========================
   LOADING
   =========================== */
. tbm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--tbm-spacing-2xl);
}

.tbm-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--tbm-gray-300);
    border-top-color: var(--tbm-primary);
    border-radius: 50%;
    animation: tbm-spin 0.8s linear infinite;
}

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

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    : root {
        --tbm-font-size-base: 14px;
        --tbm-spacing-md: 12px;
        --tbm-spacing-lg: 16px;
    }

    .tbm-form-row {
        grid-template-columns: 1fr;
    }
}
