/* Reset et variables CSS */
:root {
    --primary-color: #5B8FDB;
    --primary-dark: #3B7DD6;
    --secondary-color: #3B7DD6;
    --accent-color: #7BA8E3;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --text-color: #374151;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* === STYLES POUR LES FORMATIONS === */

/* Nouvelles cartes de formation (pour index.php et formation.php) */
.formation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.formation-card {
    position: relative;
    background: white;
    border-radius: 28px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
    overflow: hidden;
    border: 0px solid transparent;
}

.formation-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    border-color: transparent;
}

/* Cercle décoratif animé au hover */
.formation-card::before {
    content: '';
    position: absolute;
    top: -75px;
    right: -75px;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    z-index: 1;
    transition: all 0.5s ease;
}

.formation-card:hover::before {
    transform: scale(12);
}

/* Couleurs différentes pour chaque carte */
.formation-card:nth-child(1)::before {
    background: linear-gradient(135deg, #0066cc, #004999);
}

.formation-card:nth-child(2)::before {
    background: linear-gradient(135deg, #ff6600, #cc5200);
}

.formation-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.formation-logo {
    font-size: 2rem;
    font-weight: bold;
    margin-right: 1rem;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.formation-logo img {
    max-width: 120px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.formation-card:hover .formation-logo {
    color: white;
}

.isib-logo {
    color: #0066cc;
}

.ephec-logo {
    color: #ff6600;
}

.formation-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    color: #555;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

.formation-card:hover .formation-title {
    color: rgba(255, 255, 255, 0.9);
}

.formation-subtitle {
    color: #b0b0b0;
    margin: 0.5rem 0;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

.formation-card:hover .formation-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.formation-years {
    color: #888;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

.formation-card:hover .formation-years {
    color: rgba(255, 255, 255, 0.85);
}

.formation-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
    position: relative;
    z-index: 2;
    transition: all 0.5s ease;
}

.status-current {
    background: rgba(227, 242, 253, 0.9);
    color: #3B7DD6;
}

.formation-card:hover .status-current {
    background: rgba(255, 255, 255, 0.95);
    color: #3B7DD6;
}

.status-completed {
    background: rgba(232, 245, 232, 0.9);
    color: #388e3c;
}

.formation-card:hover .status-completed {
    background: rgba(255, 255, 255, 0.95);
    color: #388e3c;
}

.formation-summary {
    margin-top: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.formation-summary p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: #555;
}

/* Section compétences acquises */
.competences-acquises {
    margin: 3rem 0;
}

.competences-acquises h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: #333;
}

.competences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.competence-category {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.competence-category:nth-child(1) {
    border-top-color: #5B8FDB;
}

.competence-category:nth-child(2) {
    border-top-color: #28a745;
}

.competence-category:nth-child(3) {
    border-top-color: #ffc107;
}

.competence-category:nth-child(4) {
    border-top-color: #dc3545;
}

.competence-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.competence-category h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.competence-category ul {
    list-style: none;
    padding: 0;
}

.competence-category li {
    padding: 0.6rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.competence-category li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

.edit-note {
    background: linear-gradient(135deg, #e3f2fd 0%, #d1e7fd 100%);
    border-left: 5px solid #5B8FDB;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin: 3rem 0;
}

.edit-note p {
    margin: 0;
    color: #333;
    line-height: 1.7;
}

/* Formations Overview Section */
.formations-overview {
    background: linear-gradient(135deg, #f5f9fd 0%, #e6f1fb 100%);
    padding: 3rem 0;
}

/* Formation Navigation Section */
.formation-navigation {
    text-align: center;
    padding: 3rem 0;
    background: white;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Pages de formation spécifiques */
.formation-header-page {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f9fd 0%, #e6f1fb 100%);
    border-radius: 15px;
    border-left: 5px solid #5B8FDB;
}

.formation-logo-large {
    font-size: 3rem;
    font-weight: bold;
    color: #5B8FDB;
    min-width: 150px;
}

.formation-logo-large.isib-style {
    color: #0066cc;
}

.formation-info h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.2rem;
    color: #333;
}

.formation-period {
    font-size: 1.1rem;
    color: #5B8FDB;
    font-weight: 600;
    margin: 0.5rem 0;
}

.formation-school {
    color: #666;
    font-style: italic;
    margin: 0;
}

.formation-description {
    margin: 3rem 0;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.formation-description h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.description-content p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    color: #555;
}

.description-content a {
    color: #5B8FDB;
    text-decoration: none;
}

.description-content a:hover {
    text-decoration: underline;
}

/* Projets scolaires */
.projets-scolaires {
    margin: 3rem 0;
}

.projet-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #5B8FDB;
    transition: all 0.3s ease;
}

.projet-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

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

.projet-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5B8FDB 0%, #3B7DD6 100%);
    border-radius: 50%;
    color: white;
    box-shadow: 0 5px 15px rgba(91, 143, 219, 0.3);
}

.projet-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.4rem;
}

.projet-tag {
    display: inline-block;
    background: rgba(91, 143, 219, 0.15);
    color: #3B7DD6;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.projet-content h4 {
    color: #5B8FDB;
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
}

.projet-content p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.projet-details {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
}

.projet-details h5 {
    color: #333;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.projet-details ul {
    margin: 0;
    padding-left: 1.2rem;
}

.projet-details li {
    margin-bottom: 0.5rem;
    color: #666;
}

.projet-highlight {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-left: 4px solid #28a745;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.projet-highlight p {
    margin: 0;
    color: #155724;
    font-weight: 500;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3B7DD6;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: #3B7DD6;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Navbar */
.navbar {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 200px;
    margin-top: 0.5rem;
    list-style: none;
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
}

.dropdown-menu a:hover {
    background-color: var(--light-color);
}

.arrow {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

/* Mobile toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
    margin: 3px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Scroll offset pour les ancres (compensation de la navbar sticky) */
section[id],
.page-header[id] {
    scroll-margin-top: 100px;
}

/* Main content */
.main-content {
    min-height: calc(100vh - 60px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #5B8FDB 0%, #3B7DD6 50%, #2958B3 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-description {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Sections */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 3rem;
}

/* Activities Section */
.activities {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.activity-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.activity-card h3 {
    margin-bottom: 1rem;
}

.activity-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Style spécifique pour les activity-card dans les pages de contenu */
.page-content .activity-card {
    text-align: left;
}

.page-content .activity-card h3,
.page-content .activity-card h4 {
    text-align: left;
}

/* Background Banner Sections avec vagues SVG */
.background-banner {
    position: relative;
    min-height: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overflow: hidden;
}

.background-banner .container {
    position: relative;
    z-index: 2;
}

.background-banner svg {
    position: absolute;
    left: 0;
    width: 100%;
    height: 250px;
    z-index: 2;
}

.background-banner svg:first-child {
    top: -1px;
}

.background-banner svg:last-child {
    bottom: -1px;
}

.background-banner .banner-content {
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.background-banner .banner-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: bold;
}

.background-banner .banner-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
}

/* Timeline Preview */
.timeline-preview {
    padding: 4rem 0;
}

.timeline-teaser {
    max-width: 800px;
    margin: 2rem auto;
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--light-color);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background-color: #e5e7eb;
    transform: translateX(10px);
}

.timeline-date {
    font-weight: bold;
    color: #5B8FDB;
}

.timeline-event {
    flex: 1;
    text-align: right;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.8;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #d1d5db;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: #d1d5db;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: white;
    transform: translateY(-3px);
}

.social-links svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

.footer-separator {
    margin: 0 0.5rem;
    color: #6b7280;
}

.version-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Version Modal */
.version-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.version-item {
    padding: 1.5rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.version-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.version-date {
    font-size: 0.9rem;
    color: #6b7280;
}

.version-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.version-description {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* Modals */
.modal-container {
    position: relative;
    z-index: 2000;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2001;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2002;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

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

.modal-content {
    padding: 1.5rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    margin-bottom: 1rem;
    color: #5B8FDB;
}

.modal-section p {
    text-align: justify;
}

.moderation-card p,
.event-project-card p {
    text-align: center;
}

.modal-section ul {
    list-style: none;
    padding-left: 1rem;
}

.modal-section li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.modal-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #5B8FDB;
}

.event-list li::before {
    content: '📅';
}

/* Centrer les boutons dans les modals et ajouter de l'espace */
.modal-section .btn {
    display: block;
    margin: 1rem auto 0;
    text-align: center;
}

/* Correction du contraste en hover pour les boutons dans les modals */
.modal-section .btn-primary:hover {
    color: white;
}

/* Ajouter de l'espace pour la barre verticale des projets archivés */
.modal-section[style*="border-left"] {
    padding-left: 1rem;
}

/* Grille de projets dans le modal */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
    transition: all 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.project-card h3 {
    margin-bottom: 0.75rem;
    color: #5B8FDB;
}

.project-card p {
    text-align: justify;
}

.project-card ul {
    list-style: none;
    padding-left: 1rem;
    margin: 0.75rem 0;
}

.project-card li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.project-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #5B8FDB;
}

.project-card .btn {
    display: block;
    margin: 1rem auto 0;
    text-align: center;
}

.project-card .btn-primary:hover {
    color: white;
}

/* Projet archivé */
.project-card--archived {
    opacity: 0.85;
    border-left: 3px solid var(--secondary-color);
}

.archived-badge {
    font-size: 0.8em;
    color: var(--secondary-color);
}

/* YouTube Stats dans le modal */
.youtube-stats-section {
    background: linear-gradient(135deg, #f5f9fd 0%, #e6f1fb 100%);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.youtube-channels-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem 0;
}

.youtube-channel-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 0, 0, 0.2);
}

.youtube-channel-link:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 0, 0, 0.4);
    background: linear-gradient(135deg, #ff1a1a, #d60000);
    color: white;
}

.youtube-channel-link .channel-icon {
    font-size: 1.5rem;
}

.youtube-channel-link .channel-name {
    flex: 1;
    font-weight: 600;
    font-size: 1.05rem;
}

.youtube-channel-link .subscriber-count {
    font-weight: bold;
    font-size: 1.15rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    min-width: 60px;
    text-align: center;
    transition: all 0.3s ease;
}

.youtube-channel-link:hover .subscriber-count {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.youtube-channel-link .subscriber-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.youtube-note {
    margin-top: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Grille de modération et projets événementiels */
.moderation-grid,
.event-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.moderation-card,
.event-project-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.moderation-card:hover,
.event-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: block;
    border: 3px solid #5B8FDB;
}

.creator-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: var(--dark-color);
}

.creator-name a {
    color: #5B8FDB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.creator-name a:hover {
    color: #3B7DD6;
}

.moderation-card .subscriber-count {
    font-weight: bold;
    color: #5B8FDB;
    font-size: 1rem;
    margin: 0.5rem 0;
}

.creator-description,
.event-project-description {
    font-size: 0.9rem;
    color: #666;
    margin: 0.75rem 0;
    min-height: 40px;
}

.creator-links {
    font-size: 1rem;
    margin: 0.75rem 0;
}

.creator-links a {
    color: #5B8FDB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.creator-links a:hover {
    color: #3B7DD6;
    text-decoration: underline;
}

.creator-rank {
    font-size: 0.9rem;
    font-weight: 700;
    background: linear-gradient(135deg, #5B8FDB, #3B7DD6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.25rem 0;
}

.stats-loaded {
    animation: fadeIn 0.5s ease;
}

/* Styles spécifiques aux projets événementiels */
.event-project-card h3 {
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    color: var(--dark-color);
}

.stats-error {
    opacity: 0.5;
    font-style: italic;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Page Hero Sections - Formations */
.page-hero {
    position: relative;
    padding: 5rem 0 4rem;
    text-align: center;
    color: white;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #5B8FDB 0%, #3B7DD6 50%, #2958B3 100%);
    z-index: -1;
}

.ephec-hero::before {
    background: linear-gradient(135deg, #ff6600 0%, #cc5200 50%, #994000 100%);
}

.isib-hero::before {
    background: linear-gradient(135deg, #0066cc 0%, #004999 50%, #003366 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-icon {
    font-size: 1.5rem;
}

.hero-years {
    font-weight: 600;
    font-size: 1.1rem;
}

.page-hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin: 0 0 1rem 0;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-hero-subtitle {
    font-size: 1.8rem;
    margin: 0 0 2rem 0;
    opacity: 0.95;
    font-weight: 600;
}

.page-hero .hero-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.page-hero .hero-description p {
    margin: 0.5rem 0;
}

.hero-status {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Formation Intro Card */
.formation-intro {
    margin: -2rem 0 3rem 0;
}

.intro-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.intro-icon {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.1));
}

.intro-card h2 {
    text-align: center;
    color: #333;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.intro-card .description-content {
    max-width: 800px;
    margin: 0 auto;
}

.intro-card .description-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555;
    font-size: 1.05rem;
}

.source-note {
    font-style: italic;
    color: #888 !important;
    font-size: 0.95rem !important;
    margin-top: 2rem !important;
}

/* ========================================
   THÈMES DE COULEUR PAR FORMATION
   ======================================== */

/* Thème EPHEC - Orange */
.theme-ephec .projets-scolaires h2,
.theme-ephec .competences-acquises h2 {
    color: #ff6600;
}

.theme-ephec .section-title {
    background: linear-gradient(135deg, #ff6600, #cc5200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-ephec .projet-card {
    border-left-color: #ff6600;
}

.theme-ephec .projet-card:hover {
    border-left-color: #cc5200;
}

.theme-ephec .projet-icon {
    background: linear-gradient(135deg, #ff6600, #cc5200);
}

.theme-ephec .projet-content h4 {
    color: #ff6600;
}

.theme-ephec .projet-tag {
    background: rgba(255, 102, 0, 0.1);
    color: #ff6600;
}

.theme-ephec .competence-category:nth-child(1) {
    border-top-color: #ff6600;
}

.theme-ephec .competence-category:nth-child(2) {
    border-top-color: #ff8533;
}

.theme-ephec .competence-category:nth-child(3) {
    border-top-color: #ffad66;
}

.theme-ephec .competence-category:nth-child(4) {
    border-top-color: #cc5200;
}

.theme-ephec .competence-category li::before {
    color: #ff6600;
}

.theme-ephec .intro-card .description-content a {
    color: #ff6600;
}

.theme-ephec .intro-card .description-content a:hover {
    color: #cc5200;
}

/* Thème ISIB - Bleu */
.theme-isib .projets-scolaires h2,
.theme-isib .competences-acquises h2 {
    color: #0066cc;
}

.theme-isib .section-title {
    background: linear-gradient(135deg, #0066cc, #004999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-isib .projet-card {
    border-left-color: #0066cc;
}

.theme-isib .projet-card:hover {
    border-left-color: #004999;
}

.theme-isib .projet-icon {
    background: linear-gradient(135deg, #0066cc, #004999);
}

.theme-isib .projet-content h4 {
    color: #0066cc;
}

.theme-isib .projet-tag {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.theme-isib .competence-category:nth-child(1) {
    border-top-color: #0066cc;
}

.theme-isib .competence-category:nth-child(2) {
    border-top-color: #3385d6;
}

.theme-isib .competence-category:nth-child(3) {
    border-top-color: #66a3e0;
}

.theme-isib .competence-category:nth-child(4) {
    border-top-color: #004999;
}

.theme-isib .competence-category li::before {
    color: #0066cc;
}

.theme-isib .intro-card .description-content a {
    color: #0066cc;
}

.theme-isib .intro-card .description-content a:hover {
    color: #004999;
}

/* Note d'édition thématique */
.theme-ephec .edit-note {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left-color: #ff6600;
}

.theme-isib .edit-note {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left-color: #0066cc;
}

/* Placeholder content thématique */
.theme-ephec .placeholder-content {
    border-left: 4px solid #ff6600;
    background: rgba(255, 102, 0, 0.05);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.theme-isib .placeholder-content {
    border-left: 4px solid #0066cc;
    background: rgba(0, 102, 204, 0.05);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

/* Responsive YouTube Video Containers */
.projet-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Modern aspect-ratio support with fallback */
@supports (aspect-ratio: 16 / 9) {
    .video-container {
        padding-bottom: 0;
        aspect-ratio: 16 / 9;
        height: auto;
    }
}

/* Project Links */
.projet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0, 0, 0, 0.05);
}

.projet-links .btn {
    flex: 1 1 auto;
    min-width: 150px;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .projet-videos {
        grid-template-columns: 1fr;
    }

    .projet-links {
        flex-direction: column;
    }

    .projet-links .btn {
        width: 100%;
    }
}

/* Page sections */
.page-header {
    background: linear-gradient(135deg, #5B8FDB 0%, #3B7DD6 50%, #2958B3 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 3rem;
}

/* Espacement entre les sections */
.page-content section {
    margin-top: 3rem;
}

.page-content section:first-child {
    margin-top: 0;
}

/* Espacement supplémentaire pour les titres de section */
.page-content h2 {
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
}

.page-content section:first-child h2 {
    margin-top: 0;
}

/* Justification du texte (hors listes) */
.page-content p {
    text-align: justify;
}

/* Indentation des listes */
.page-content ul {
    padding-left: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Indentation supplémentaire pour les sous-listes */
.page-content ul ul {
    padding-left: 3rem;
    margin-top: 0.5rem;
}

/* Navbar Responsive - burger menu jusqu'à 1024px */
@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: var(--light-color);
        margin-top: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    /* Page Hero Responsive */
    .page-hero {
        padding: 3rem 0 2.5rem;
    }

    .page-hero-title {
        font-size: 2rem;
    }

    .page-hero-subtitle {
        font-size: 1.4rem;
    }

    .page-hero .hero-description {
        font-size: 1rem;
    }

    .hero-badge {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero-icon {
        font-size: 1.2rem;
    }

    .hero-status {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }

    /* Intro Card Responsive */
    .intro-card {
        padding: 2rem 1.5rem;
    }

    .intro-icon {
        font-size: 2.5rem;
    }

    .intro-card h2 {
        font-size: 1.6rem;
    }

    .intro-card .description-content p {
        font-size: 1rem;
    }

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

    .formation-cards {
        grid-template-columns: 1fr;
    }

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

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Background Banner Responsive */
    .background-banner {
        min-height: 600px;
        background-attachment: scroll;
    }

    .background-banner svg {
        width: 200%;
    }

    .background-banner .banner-title {
        font-size: 1.8rem;
    }

    .background-banner .banner-subtitle {
        font-size: 1.1rem;
    }

    .background-banner .banner-content {
        padding: 2rem 1rem;
    }
}