/* RESET ET STYLES DE BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-title .underline {
    width: 100px;
    height: 4px;
    background: var(--secondary);
    margin: 0 auto;
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:hover {
    background: #c0392b;
}

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

.btn-success:hover {
    background: #27ae60;
}

.btn-icon {
    padding: 8px 12px;
    border-radius: 4px;
    background: #f5f7fa;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* HEADER */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo i {
    font-size: 2rem;
    color: var(--secondary);
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--secondary);
}

.admin-link {
    background: var(--primary);
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
}

.admin-link:hover {
    background: var(--secondary);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 160px 0 100px;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* FORMATIONS */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.formation-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.formation-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.formation-img {
    height: 200px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.formation-content {
    padding: 25px;
}

.formation-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.formation-content p {
    margin-bottom: 20px;
    color: #666;
}

.formation-content .btn {
    width: 100%;
    text-align: center;
}

/* INSCRIPTION */
#inscription {
    background: var(--light);
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 25%;
}

.progress-step::before {
    content: '';
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: bold;
    color: white;
}

.progress-step.active::before {
    background: var(--success);
    content: '✓';
}

.progress-step::after {
    content: attr(data-step);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    line-height: 30px;
    color: white;
    font-weight: bold;
}

.form-container {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-prev {
    background: #95a5a6;
}

.btn-prev:hover {
    background: #7f8c8d;
}

.confirmation-container {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-icon {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 20px;
}

.confirmation-container h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.confirmation-container p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: #666;
}

.inscrit-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 30px auto;
    max-width: 500px;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* TÉMOIGNAGES */
.testimonials {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 0;
    scrollbar-width: none;
}

.testimonials::-webkit-scrollbar {
    display: none;
}

.testimonial-card {
    min-width: 300px;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
}

.testimonial-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.testimonial-info p {
    color: var(--secondary);
    font-size: 0.9rem;
}

.testimonial-text {
    font-style: italic;
    color: #555;
    line-height: 1.8;
}

/* FOOTER */
footer {
    background: var(--primary);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--secondary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
}

.contact-info {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-icon {
    margin-right: 15px;
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* ADMIN */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-form {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.login-logo h2 {
    color: var(--primary);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #777;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-actions {
    display: flex;
    gap: 15px;
}

.admin-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-filters .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 200px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.stat-card h3 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.nouveau {
    background: #e1f0ff;
    color: var(--secondary);
}

.status-badge.confirme {
    background: #e6f7ee;
    color: var(--success);
}

.status-badge.annule {
    background: #fde8e8;
    color: var(--danger);
}

.actions {
    display: flex;
    gap: 5px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .admin-filters {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        background: white;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .progress-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .progress-bar::before {
        display: none;
    }
    
    .progress-step {
        flex-direction: row;
        width: 100%;
        gap: 15px;
    }
    
    .progress-step::before {
        margin-bottom: 0;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}


/* Améliorations responsive supplémentaires */
@media (max-width: 992px) {
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .hero h2 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  /* Adaptation du tableau admin */
  #inscriptionsList {
    overflow-x: auto;
    display: block;
  }
  
  /* Réorganisation des filtres admin */
  .admin-filters {
    flex-direction: column;
  }
  
  .admin-filters .form-group {
    width: 100%;
  }
  
  /* Ajustement des boutons */
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  /* Adaptation complète pour très petits écrans */
  .container {
    width: 95%;
    padding: 0 10px;
  }
  
  .formation-card {
    min-width: 100%;
  }
  
  .form-container {
    padding: 20px;
  }
  
  /* Transformation du tableau en cartes sur mobile */
  #inscriptionsList table {
    display: none;
  }
  
  #inscriptionsList .mobile-card {
    display: block;
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
}