* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {    
    --primary-color: #103176;
    --secondary-color: #a6b2d9;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
}

.header {
    background: linear-gradient(315deg, #00f0ff 0%, #3889bf 25%, #647b9e 50%, #032791 100%);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
    box-shadow: 
        0 4px 20px rgba(0, 153, 255, 0.3),
        0 0 40px rgba(0, 240, 255, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.intro {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    border-left: 4px solid var(--accent-color);
}

.intro h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.intro p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-light);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.formation-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 2rem 0.5rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.formation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.formation-header {
    margin-bottom: 1.5rem;
}

.formation-title {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

.formation-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-duration {
    background-color: #dbeafe;
    color: var(--primary-color);
}

.badge-level {
    background-color: #fef3c7;
    color: #d97706;
}

.formation-section {
    margin-bottom: 1.5rem;
}

.formation-section h4 {
    color: var(--text-dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.formation-section p,
.formation-section ul {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.formation-section ul {
    list-style-position: inside;
    padding-left: 0;
}

/* SECTION INFO (nouvelle section séparée) */
.info-section {
    padding: 3rem 2rem;
    margin: 3rem 0;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.info-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 2em;
}

/* Grille 4 cartes sur 2 lignes */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card li {
    padding: 6px 0;
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
}

/* SECTION CONTACT */
.contact-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    margin-top: 3rem;
}

.contact-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-size: 2.2em;
}

/* Formulaire pleine largeur */
.contact-form-full {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form-full h3 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 1.5em;
    text-align: center;
}

.form-row-2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 0;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.95em;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin: 20px 0;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

.checkbox-label span {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
}

.submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer p {
    opacity: 0.8;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.category-java {
    border-left: 4px solid #f59e0b;
}

.category-web {
    border-left: 4px solid #10b981;
}

.category-frameworks {
    border-left: 4px solid #8b5cf6;
}

.category-devops {
    border-left: 4px solid #ef4444;
}

.category-ia {
    border-left: 4px solid #06b6d4;
}

.category-gestion {
    border-left: 4px solid #ec4899;
}

/* Section complémentaire */
.complementary-section {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 3rem 2rem;
    border-radius: 12px;
    margin: 3rem 0;
    border: 2px solid var(--border-color);
}

.complementary-section h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.complementary-section>p {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.tech-tag {
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tech-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
    background: var(--bg-light);
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .contact-info-grid {
        grid-template-columns: 1fr;
    }

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

    .contact-form-full {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .formations-grid {
        grid-template-columns: 1fr;
    }

    .filters {
        justify-content: center;
    }

    .filter-btn {
        flex: 1;
        min-width: 140px;
    }
}

/* ===== SUPPRESSION DES ESPACES DANS LES CARTES ===== */

/* Première section : pas d'espace en haut */
.formation-card > *:first-child {
    margin-top: 0 !important;
}

/* Dernière section : pas d'espace en bas */
.formation-card > *:last-child {
    margin-bottom: 0 !important;
}

/* Dernier élément de chaque section : pas d'espace en bas */
.formation-section > *:last-child {
    margin-bottom: 0 !important;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.header-logo {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.header-description {
    font-size: 1.2rem;
    opacity: 0.95;
    line-height: 1.5;
    color: white;
}

/* ===== MODALES MENTIONS LÉGALES & CONFIDENTIALITÉ ===== */
/* Compatible Chrome, Firefox, Safari */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
    /* État caché par défaut */
    visibility: hidden;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transition: visibility 0s linear 0.2s, opacity 0.2s ease;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    padding: 2.5rem;
    position: relative;
    margin: 2rem auto;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    /* Animation d'entrée */
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-color);
}

.modal-content h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent-color);
}

.modal-content h3 {
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-content p,
.modal-content li {
    color: #555;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.modal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-content strong {
    color: var(--primary-color);
}

.modal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-links {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    font-size: 0.95rem;
    cursor: pointer;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.info-box {
    background: #fff3cd;
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.info-box p {
    margin: 0;
    color: #856404;
}

@media (max-width: 768px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}
