/*
 * components.css
 * Emplacement : public/assets/css/components.css
 * 
 * Composants réutilisables pour le site GAB Tennis de Table Metz
 */

/* ===== COMPOSANTS DE CARTES ===== */

/* Carte de statistique */
.stat-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.stat-detail {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Carte de fonctionnalité */
.feature-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
    font-family: 'Montserrat', sans-serif;
}

.feature-description {
    color: var(--text-light);
    flex-grow: 1;
    line-height: 1.6;
}

/* Carte de membre d'équipe */
.team-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.team-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-light);
}

.team-card-content {
    padding: 20px;
    text-align: center;
}

.team-card-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-dark);
    font-family: 'Montserrat', sans-serif;
}

.team-card-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.team-card-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== COMPOSANTS DE NAVIGATION ===== */

/* Breadcrumb */
.breadcrumb {
    background: var(--bg-light);
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '>';
    margin: 0 10px;
    color: var(--text-muted);
}

.breadcrumb-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb-current {
    color: var(--text-dark);
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination-item {
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-small);
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    background: white;
}

.pagination-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ===== COMPOSANTS DE CONTENU ===== */

/* Hero section - DÉSACTIVÉ - Remplacé par des titres simples */
/*
.hero-section {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.9), rgba(66, 165, 245, 0.9)), 
                url('<?= base_url('assets/bandeaux/hero-bg.jpg') ?>') no-repeat center center/cover;
    color: white;
    padding: 100px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 700px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

.hero-cta {
    background: var(--secondary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: white;
    text-decoration: none;
}
*/

/* Section avec titre */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== COMPOSANTS DE FORMULAIRE ===== */

/* Groupe de champs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius-small);
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-input.error {
    border-color: #f44336;
}

.form-error {
    color: #f44336;
    font-size: 0.9rem;
    margin-top: 5px;
}

.form-help {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ===== COMPOSANTS D'ALERTE ===== */

.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-small);
    margin-bottom: 20px;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-message {
    margin: 0;
}

.alert-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left-color: #4caf50;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left-color: #2196f3;
}

.alert-warning {
    background: #fff3e0;
    color: #ef6c00;
    border-left-color: #ff9800;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left-color: #f44336;
}

/* ===== COMPOSANTS DE CHARGEMENT ===== */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

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

.loading-content {
    text-align: center;
}

.loading-spinner-large {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

/* ===== COMPOSANTS DE MÉDIA ===== */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    .stat-card, .feature-card, .team-card {
        margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-item {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 60px 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-card, .feature-card, .team-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
}