/**
 * Styles Ivoire Trail
 * Version 2.0
 */

/* ===================================
   VARIABLES
   =================================== */
:root {
    --ivt-primary: #FF8C00;
    --ivt-secondary: #FF6347;
    --ivt-success: #4CAF50;
    --ivt-warning: #FF9800;
    --ivt-danger: #f44336;
    --ivt-info: #2196F3;
    --ivt-text: #333;
    --ivt-text-light: #666;
    --ivt-border: #ddd;
    --ivt-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===================================
   RESET ET BASE
   =================================== */
.ivt-container * {
    box-sizing: border-box;
}

/* ===================================
   FORMULAIRES
   =================================== */
.ivt-form input[type="text"],
.ivt-form input[type="email"],
.ivt-form input[type="tel"],
.ivt-form input[type="date"],
.ivt-form select,
.ivt-form textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.ivt-form input:focus,
.ivt-form select:focus,
.ivt-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.ivt-form input.error,
.ivt-form select.error,
.ivt-form textarea.error {
    border-color: var(--ivt-danger);
}

/* ===================================
   BADGES ET STATUTS
   =================================== */
.ivt-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ivt-status-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.ivt-status-warning {
    background: #FFF3E0;
    color: #F57C00;
}

.ivt-status-danger {
    background: #FFEBEE;
    color: #C62828;
}

.ivt-status-info {
    background: #E3F2FD;
    color: #1565C0;
}

/* ===================================
   BOUTONS
   =================================== */
.ivt-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

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

.ivt-btn-primary {
    background: linear-gradient(135deg, var(--ivt-primary), var(--ivt-secondary));
    color: white;
}

.ivt-btn-secondary {
    background: var(--ivt-info);
    color: white;
}

.ivt-btn-success {
    background: var(--ivt-success);
    color: white;
}

.ivt-btn-outline {
    background: transparent;
    border: 2px solid var(--ivt-primary);
    color: var(--ivt-primary);
}

.ivt-btn-outline:hover {
    background: var(--ivt-primary);
    color: white;
}

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

/* ===================================
   CARDS
   =================================== */
.ivt-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--ivt-shadow);
    margin-bottom: 20px;
}

.ivt-card-header {
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ivt-border);
    margin-bottom: 15px;
}

.ivt-card-title {
    margin: 0;
    font-size: 1.5em;
    color: var(--ivt-text);
}

.ivt-card-body {
    padding: 15px 0;
}

.ivt-card-footer {
    padding-top: 15px;
    border-top: 1px solid var(--ivt-border);
    margin-top: 15px;
}

/* ===================================
   ALERTS
   =================================== */
.ivt-alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.ivt-alert-success {
    background: #E8F5E9;
    border-color: var(--ivt-success);
    color: #2E7D32;
}

.ivt-alert-warning {
    background: #FFF3E0;
    border-color: var(--ivt-warning);
    color: #F57C00;
}

.ivt-alert-danger {
    background: #FFEBEE;
    border-color: var(--ivt-danger);
    color: #C62828;
}

.ivt-alert-info {
    background: #E3F2FD;
    border-color: var(--ivt-info);
    color: #1565C0;
}

/* ===================================
   TABLES
   =================================== */
.ivt-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--ivt-shadow);
    border-radius: 8px;
    overflow: hidden;
}

.ivt-table thead {
    background: #f5f5f5;
}

.ivt-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--ivt-text);
    border-bottom: 2px solid var(--ivt-border);
}

.ivt-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.ivt-table tbody tr:hover {
    background: #fafafa;
}

.ivt-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===================================
   LOADING
   =================================== */
.ivt-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 140, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--ivt-primary);
    animation: ivt-spin 1s ease-in-out infinite;
}

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

.ivt-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ivt-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: ivt-spin 1s ease-in-out infinite;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .ivt-form-row {
        grid-template-columns: 1fr !important;
    }
    
    .ivt-table {
        font-size: 14px;
    }
    
    .ivt-table th,
    .ivt-table td {
        padding: 10px;
    }
    
    .ivt-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ===================================
   UTILITAIRES
   =================================== */
.ivt-text-center { text-align: center; }
.ivt-text-left { text-align: left; }
.ivt-text-right { text-align: right; }

.ivt-mt-0 { margin-top: 0; }
.ivt-mt-1 { margin-top: 10px; }
.ivt-mt-2 { margin-top: 20px; }
.ivt-mt-3 { margin-top: 30px; }

.ivt-mb-0 { margin-bottom: 0; }
.ivt-mb-1 { margin-bottom: 10px; }
.ivt-mb-2 { margin-bottom: 20px; }
.ivt-mb-3 { margin-bottom: 30px; }

.ivt-hidden { display: none; }
.ivt-visible { display: block; }

.ivt-flex {
    display: flex;
    gap: 15px;
    align-items: center;
}

.ivt-flex-wrap {
    flex-wrap: wrap;
}

.ivt-flex-between {
    justify-content: space-between;
}

.ivt-flex-center {
    justify-content: center;
}

/* ===================================
   PRINT
   =================================== */
@media print {
    .ivt-btn,
    .ivt-form,
    .no-print {
        display: none !important;
    }
    
    .ivt-card {
        box-shadow: none;
        border: 1px solid var(--ivt-border);
    }
}
