/* style.css - INDATA Training Center */

/* ============================================ */
/* == Variables et Styles de Base == */
/* ============================================ */
:root {
    --primary: #1a2a4a;
    --secondary: #007bff;
    --accent: #10B981; /* Vert pour les accents positifs */
    --light: #f8f9fa; /* Fond clair pour sections */
    --dark: #343a40; /* Texte principal */
    --gray: #6c757d; /* Texte secondaire */
    --white: #ffffff;
    --bs-gutter-x: 1.5rem; /* Espace horizontal container */
    --bs-gutter-y: 0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base pour rem */
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7; /* Légèrement plus aéré */
    color: var(--dark);
    background-color: var(--light);
    direction: rtl; /* Direction par défaut */
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--bs-gutter-x, 15px);
    padding-right: var(--bs-gutter-x, 15px);
}

a {
    text-decoration: none;
    color: var(--secondary);
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #0056b3; /* Assombrir au survol/focus */
    outline: none; /* Supprime outline si focus visible autrement */
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Supprime espace sous image */
    vertical-align: middle;
}

ul {
    list-style: none;
    padding: 0; /* Assure pas de padding par défaut */
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: 700;
    line-height: 1.3;
}

/* Utilitaires */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============================================ */
/* == Header == */
/* ============================================ */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Alignement RTL */
}

.logo h1 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.2;
}

.logo h1:last-child {
    font-size: 1.2rem;
    color: var(--secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px; /* Espacement entre switcher et nav */
}

.language-switcher {
    display: flex;
    gap: 10px;
}

.lang-button {
    padding: 5px 10px;
    border-radius: 4px;
    background-color: var(--light);
    color: var(--gray);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    cursor: pointer;
    font-family: inherit;
}

.lang-button:hover,
.lang-button:focus {
    background-color: var(--secondary);
    color: var(--white);
    border-color: var(--secondary);
}

.lang-button.current-lang {
    font-weight: bold;
    color: var(--primary);
    background-color: #e9ecef;
    border-color: #adb5bd;
    cursor: default;
}

.lang-button.current-lang:hover {
     background-color: #e9ecef;
     color: var(--primary);
     border-color: #adb5bd;
}


/* Navigation */
nav#main-nav ul { /* Cible plus spécifique */
    display: flex;
    gap: 30px; /* Espacement entre liens nav */
}

nav#main-nav ul li a {
    color: var(--dark);
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}

nav#main-nav ul li a:hover,
nav#main-nav ul li a:focus,
nav#main-nav ul li a.active {
    color: var(--secondary);
}

nav#main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0; /* Position RTL */
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

nav#main-nav ul li a:hover::after,
nav#main-nav ul li a:focus::after,
nav#main-nav ul li a.active::after {
    width: 100%;
}

/* Menu Mobile */
.mobile-menu-button {
    display: none; /* Caché par défaut sur grand écran */
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
}

.mobile-menu-button:hover, .mobile-menu-button:focus {
    background-color: #0056b3;
}

/* ============================================ */
/* == Hero Section == */
/* ============================================ */
.hero {
    background-color: var(--primary); /* Fallback color */
    background-size: cover;
    background-position: center center;
    color: var(--white);
    text-align: center;
    padding: 100px 0 120px;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
	color: var(--white); /* <<< AJOUTEZ CETTE LIGNE */
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 35px; /* Plus d'espace avant CTA */
    line-height: 1.8;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--white);
    padding: 14px 35px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--secondary); /* Ajout bordure pour consistance */
}

.cta-button:hover, .cta-button:focus {
    background-color: #0069d9;
    border-color: #0069d9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3); /* Ombre plus colorée */
}

/* ============================================ */
/* == Styles Généraux des Sections == */
/* ============================================ */
.about, .courses, .stats, .software, .contact {
    padding: 80px 0;
}
.about, .courses, .contact { /* Sections avec fond clair */
     background-color: var(--light);
}
.software { /* Section Software fond blanc */
     background-color: var(--white);
     border-top: 1px solid #eee;
     border-bottom: 1px solid #eee;
}
.stats { /* Section avec fond principal */
     background-color: var(--primary);
     color: var(--white);
}


/* Titres de Section */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2, .about h2 { /* Styles communs titres */
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-header h2::after, .about h2::after { /* Soulignement */
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--secondary);
    bottom: 0;
    right: 50%; /* Position RTL initiale (centrée) */
    transform: translateX(50%); /* Pour RTL, translateX(50%) centre */
}

/* Spécifique pour About (aligné à droite en RTL) */
.about h2 {
    text-align: right;
    margin-bottom: 20px;
}
.about h2::after {
    right: 0; /* Aligne à droite en RTL */
    transform: none; /* Annule centrage */
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.8; /* Ajout hauteur de ligne pour paragraphes longs */
}

/* ============================================ */
/* == Section About == */
/* ============================================ */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text { flex: 1; }

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.about p {
    margin-bottom: 20px;
    color: var(--gray);
}

.features-list {
    margin-top: 30px;
    padding-right: 0; /* Pas de padding pour la liste elle-même */
}

.features-list li {
    display: flex;
    align-items: flex-start; /* Alignement vertical haut */
    margin-bottom: 15px;
    line-height: 1.6; /* Assure bon alignement vertical du texte multiligne */
}

.features-list i {
    color: var(--accent);
    margin-left: 12px; /* Espace à gauche de l'icône (pour RTL) */
    margin-top: 4px; /* Ajustement vertical fin */
    font-size: 1.1rem;
    flex-shrink: 0; /* Empêche l'icône de rétrécir */
}
.features-list span {
    flex-grow: 1; /* Le texte prend l'espace restant */
}


/* ============================================ */
/* == Section Courses == */
/* ============================================ */
.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    border: 1px solid #eee; /* Bordure légère */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Pour aligner actions en bas */
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #eee; /* Couleur de fond si image cassée */
}

.course-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Fait grandir le contenu */
}

.course-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.course-details {
    margin-bottom: 20px;
    flex-grow: 1; /* Pousse les actions en bas */
}

.course-details ul { padding-right: 0; } /* Pas de padding pour ul */

.course-details li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--gray);
}

.course-details strong {
    color: var(--dark);
    font-weight: 500;
    margin-left: 5px; /* Espace en RTL */
}

.course-actions {
    display: flex;
    gap: 10px;
    margin-top: auto; /* Colle en bas */
}

.details-button, .register-button-link {
    flex: 1; display: block; text-align: center; padding: 10px 15px;
    border-radius: 5px; transition: all 0.3s ease; font-weight: 500; font-size: 0.95rem;
}
.details-button { background-color: var(--secondary); color: var(--white); border: 1px solid var(--secondary); }
.details-button:hover, .details-button:focus { background-color: #0069d9; border-color: #0069d9; color: var(--white); }
.register-button-link { background-color: transparent; color: var(--secondary); border: 1px solid var(--secondary); }
.register-button-link:hover, .register-button-link:focus { background-color: rgba(0, 123, 255, 0.1); color: #0056b3; border-color: #0056b3; }


/* ============================================ */
/* == Section Stats == */
/* ============================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; text-align: center; }
.stat-item h3 { font-size: 3rem; margin-bottom: 5px; color: var(--white); font-weight: 700; }
.stat-item p { color: rgba(255, 255, 255, 0.8); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }


/* ============================================ */
/* == Section Logiciels Proposés == */
/* ============================================ */
.software { background-color: var(--white); padding: 80px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.software .section-header p { font-size: 1.05rem; line-height: 1.7; }
.software-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 40px 30px; justify-items: center; margin-top: 50px;
}
.software-item { display: flex; flex-direction: column; align-items: center; text-align: center; transition: transform 0.3s ease; }
.software-item:hover { transform: scale(1.05); }
.software-item img {
    max-width: 70px; height: 70px; object-fit: contain; margin-bottom: 15px;
    background-color: #f0f0f0; /* Fond léger pour logos si PNG transparent */
    border-radius: 4px; /* Coins arrondis pour fond */
    padding: 5px; /* Petit padding autour du logo */
}
.software-item span { font-size: 0.9rem; color: var(--dark); font-weight: 500; margin-top: auto; }


/* ============================================ */
/* == Section Contact == */
/* ============================================ */
.contact-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 50px; align-items: stretch; }
.contact-info, .contact-form-container { background-color: var(--white); padding: 40px; border-radius: 8px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07); display: flex; flex-direction: column; }
.contact-info h3, .contact-form-container h3 { color: var(--primary); margin-bottom: 30px; position: relative; padding-bottom: 15px; font-size: 1.6rem; }
.contact-info h3::after, .contact-form-container h3::after { content: ''; position: absolute; width: 50px; height: 3px; background-color: var(--secondary); bottom: 0; right: 0; /* RTL */ }
.contact-details { margin-bottom: 30px; flex-grow: 1; }
.contact-item { display: flex; align-items: flex-start; margin-bottom: 25px; }
.contact-icon { color: var(--secondary); font-size: 1.4rem; margin-left: 20px; /* RTL */ margin-top: 3px; width: 25px; text-align: center; flex-shrink: 0; }
.contact-text h4 { color: var(--dark); margin-bottom: 8px; font-size: 1.1rem; font-weight: 500; }
.contact-text p, .contact-text a { color: var(--gray); transition: color 0.3s ease; font-size: 1rem; line-height: 1.6; }
.contact-text a:hover, .contact-text a:focus { color: var(--secondary); }
.contact-form-container form { display: flex; flex-direction: column; flex-grow: 1; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--primary); font-weight: 500; }
.form-control { width: 100%; padding: 12px 15px; border: 1px solid #ced4da; border-radius: 5px; font-family: 'Tajawal', sans-serif; transition: border-color 0.3s ease, box-shadow 0.3s ease; font-size: 1rem; line-height: 1.5; }
.form-control:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); }
textarea.form-control { min-height: 120px; resize: vertical; }
.submit-btn { background-color: var(--secondary); color: var(--white); border: none; padding: 12px 30px; border-radius: 5px; cursor: pointer; font-weight: 500; font-size: 1rem; transition: all 0.3s ease; align-self: flex-start; /* RTL */ margin-top: auto; }
.submit-btn:hover, .submit-btn:focus { background-color: #0069d9; outline: none; }
#form-status, #newsletter-status { margin-top: 15px; font-weight: 500; font-size: 0.95rem; min-height: 1.5em; }
#form-status.success, #newsletter-status.success { color: var(--accent); }
#form-status.error, #newsletter-status.error { color: #dc3545; }
#form-status.processing, #newsletter-status.processing { color: var(--gray);}


/* ============================================ */
/* == Footer == */
/* ============================================ */
footer { background-color: var(--primary); color: rgba(255, 255, 255, 0.8); padding: 60px 0 30px; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: var(--white); margin-bottom: 25px; position: relative; padding-bottom: 15px; font-size: 1.3rem; }
.footer-col h3::after { content: ''; position: absolute; width: 40px; height: 3px; background-color: var(--secondary); bottom: 0; right: 0; /* RTL */ }
.footer-col p { margin-bottom: 20px; line-height: 1.8; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255, 255, 255, 0.7); transition: color 0.3s ease, padding-right 0.3s ease; }
.footer-links a:hover, .footer-links a:focus { color: var(--white); padding-right: 5px; /* RTL */ }
.social-links { display: flex; gap: 15px; margin-top: 20px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; color: var(--white); transition: all 0.3s ease; }
.social-links a:hover, .social-links a:focus { background-color: var(--secondary); transform: translateY(-3px); }
.newsletter-form { margin-top: 20px; }
.newsletter-form input { margin-bottom: 10px; color: var(--dark); }
.newsletter-form button { width: 100%; margin-top: 0; align-self: auto; }
.copyright { text-align: center; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.copyright p { margin-bottom: 0; }


/* ============================================ */
/* == Bouton Retour en Haut == */
/* ============================================ */
.back-to-top {
    position: fixed; bottom: 25px; right: 25px; /* RTL */ width: 45px; height: 45px;
    background-color: var(--secondary); color: var(--white); border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 1.2rem; text-align: center; z-index: 999;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover, .back-to-top:focus { background-color: #0056b3; color: var(--white); }


/* ============================================ */
/* == Styles Spécifiques pour LTR (Gauche-à-Droite) == */
/* ============================================ */

html[dir="ltr"] { text-align: left; }

/* Header LTR */
html[dir="ltr"] .logo { align-items: flex-start; }
html[dir="ltr"] nav ul li a::after { right: auto; left: 0; }

/* Section About LTR */
html[dir="ltr"] .about h2 { text-align: left; }
html[dir="ltr"] .about h2::after { right: auto; left: 0; transform: none; }
/* --- Règles spécifiques pour .features-list en LTR --- */
html[dir="ltr"] .features-list li { flex-direction: row; text-align: left; }
html[dir="ltr"] .features-list i { margin-left: 0; margin-right: 12px; order: 1; flex-shrink: 0; }
html[dir="ltr"] .features-list span { order: 2; text-align: left; }
/* --- Fin des règles .features-list en LTR --- */

/* Cartes de cours / Logiciels (Texte LTR) */
html[dir="ltr"] .course-card h3,
html[dir="ltr"] .course-details li,
html[dir="ltr"] .software-item span { text-align: left; }
html[dir="ltr"] .course-details strong { margin-left: 5px; margin-right: 0; }

/* Section Headers Génériques LTR */
html[dir="ltr"] .section-header h2 { /* Centré par défaut */ }
html[dir="ltr"] .section-header h2::after { left: 50%; transform: translateX(-50%); } /* Soulignement centré */
html[dir="ltr"] .section-header p { text-align: center; } /* Paragraphe centré */


/* Section Contact LTR */
html[dir="ltr"] .contact-info h3,
html[dir="ltr"] .contact-form-container h3 { text-align: left; }
html[dir="ltr"] .contact-info h3::after,
html[dir="ltr"] .contact-form-container h3::after { right: auto; left: 0; }
html[dir="ltr"] .contact-icon { margin-left: 0; margin-right: 20px; }
html[dir="ltr"] .contact-text h4,
html[dir="ltr"] .contact-text p { text-align: left; }
html[dir="ltr"] .form-group label { text-align: left; }
html[dir="ltr"] form { text-align: left; }
html[dir="ltr"] .submit-btn { align-self: flex-start; }

/* Footer LTR */
html[dir="ltr"] .footer-col h3 { text-align: left; }
html[dir="ltr"] .footer-col h3::after { right: auto; left: 0; }
html[dir="ltr"] .footer-col p { text-align: left; }
html[dir="ltr"] .footer-links { padding-right: 0; padding-left: 0; text-align: left; }
html[dir="ltr"] .footer-links a:hover,
html[dir="ltr"] .footer-links a:focus { padding-right: 0; padding-left: 5px; }
html[dir="ltr"] .social-links { justify-content: flex-start; }
html[dir="ltr"] .newsletter-form input,
html[dir="ltr"] .newsletter-form button { text-align: left; }

/* Bouton Retour en Haut LTR */
html[dir="ltr"] .back-to-top { right: auto; left: 25px; }


/* ============================================ */
/* == Responsive Design == */
/* ============================================ */
@media (max-width: 992px) {
    .hero h2 { font-size: 2.4rem; }
    .about-content { flex-direction: column; text-align: center; }
     html[dir="rtl"] .about-content .about h2 { text-align: center; }
     html[dir="rtl"] .about-content .about h2::after { right: 50%; transform: translateX(50%);}
     html[dir="ltr"] .about-content .about h2 { text-align: center; }
     html[dir="ltr"] .about-content .about h2::after { left: 50%; transform: translateX(-50%);}
     html[dir="ltr"] .about-content .features-list li { justify-content: center; }
     html[dir="rtl"] .about-content .features-list li { justify-content: center; }

    .about-image { margin-top: 40px; max-width: 500px; margin-right: auto; margin-left: auto; }
    .contact-container { gap: 30px; }
    .contact-info, .contact-form-container { padding: 30px; }
    .software-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 30px 20px;}
    .software-item img { max-width: 60px; height: 60px; }
}

@media (max-width: 768px) {
    /* Affichage Menu Mobile */
    .mobile-menu-button { display: block; }
    .header-right {
        display: none; position: absolute; top: 100%; left: 0; right: 0; width: 100%;
        background-color: var(--white); box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-top: 1px solid #eee; padding: 15px 20px; flex-direction: column;
        align-items: stretch; gap: 0;
    }
     .header-right.is-open { display: flex; }
     .language-switcher { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid #eee; justify-content: center; }
     nav#main-nav ul { flex-direction: column; gap: 0; width: 100%; text-align: center; }
     nav#main-nav ul li { width: 100%; }
     nav#main-nav ul li a { display: block; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
     nav#main-nav ul li:last-child a { border-bottom: none; }
     nav#main-nav ul li a::after { display: none; }

    /* Autres ajustements responsives */
    .hero { padding: 80px 0; }
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1.1rem; }
    .section-header h2, .about h2 { font-size: 1.8rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .stat-item h3 { font-size: 2.5rem; }
    .footer-container { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .contact-container { grid-template-columns: 1fr; }
    .software-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); }

}

@media (max-width: 576px) {
    html { font-size: 15px; }
    .hero { padding: 60px 0; }
    .hero h2 { font-size: 1.8rem; }
    .course-list, .stats-grid, .software-grid { grid-template-columns: repeat(2, 1fr); } /* 2 colonnes sur mobile */
    .software-item img { max-width: 50px; height: 50px; margin-bottom: 10px;}
    .software-item span { font-size: 0.85rem;}
    .section-header h2, .about h2 { font-size: 1.6rem; }
    .cta-button { padding: 12px 25px; font-size: 0.9rem; }
    .stat-item h3 { font-size: 2rem; }
    .contact-info, .contact-form-container { padding: 25px; }
    .footer-container { gap: 30px; grid-template-columns: 1fr; }
    .footer-col { text-align: center; }
     html[dir="rtl"] .footer-col h3::after { right: 50%; transform: translateX(50%); }
     html[dir="ltr"] .footer-col h3::after { left: 50%; transform: translateX(-50%); }
     html[dir="rtl"] .footer-col p { text-align: center; }
     html[dir="ltr"] .footer-col p { text-align: center; }
     .social-links { justify-content: center; }
}


/* ============================================ */
/* == Styles pour Page Détail Cours == */
/* ============================================ */

.course-detail-page {
    padding-top: 40px; /* Espace après le header */
    padding-bottom: 60px;
}

.course-detail-hero {
    background-color: var(--light); /* Couleur de fond légère */
    padding: 60px 0;
    /* Ajoutez un dégradé ou une image de fond subtile ici si vous voulez */
    /* background-image: linear-gradient(to bottom right, var(--light), #eef); */
}

.course-detail-layout {
    display: flex;
    align-items: center; /* Centre verticalement */
    gap: 40px; /* Espace entre texte et image */
    flex-direction: row-reverse; /* Image à gauche, texte à droite pour RTL */
}

.course-detail-text {
    flex: 1; /* Prendra environ 1/3 */
    min-width: 300px; /* Largeur minimale pour le texte */
}

.course-detail-image {
    flex: 2; /* Prendra environ 2/3 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.course-detail-image img {
    display: block;
    width: 100%;
    height: auto;
}


.course-detail-text h1 {
    font-size: 2.6rem; /* Titre plus grand */
    color: var(--primary);
    margin-bottom: 15px;
    line-height: 1.2;
}

.course-detail-text .course-detail-dates {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 30px; /* Espace avant le bouton */
    font-weight: 500;
}

.course-detail-text .small-cta {
    padding: 10px 25px; /* Bouton un peu plus petit */
    font-size: 0.95rem;
}

/* Styles LTR pour la mise en page détail */
html[dir="ltr"] .course-detail-layout {
    flex-direction: row; /* Image à droite, texte à gauche pour LTR */
}
html[dir="ltr"] .course-detail-text {
    text-align: left; /* Texte aligné à gauche */
}


/* Section détails supplémentaires optionnelle */
.course-more-details {
    padding: 60px 0;
    background-color: var(--white);
}
.course-more-details h2 {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    display: inline-block; /* Pour centrer le ::after */
    left: 50%;
    transform: translateX(-50%); /* Centrage RTL */
}
.course-more-details h2::after { /* Soulignement */
    content: ''; position: absolute; width: 60px; height: 4px;
    background-color: var(--secondary); bottom: -10px;
    left: 50%; transform: translateX(-50%); /* Centrage */
}
html[dir="rtl"] .course-more-details h2 {
     transform: translateX(50%); /* Centrage RTL */
}
html[dir="rtl"] .course-more-details h2::after {
      left: auto; right: 50%; transform: translateX(50%); /* Centrage RTL */
}

.course-more-details ul {
    list-style: disc;
    margin-right: 20px; /* Indentation RTL */
    margin-left: 0;
    color: var(--gray);
}
html[dir="ltr"] .course-more-details ul {
    margin-right: 0;
    margin-left: 20px; /* Indentation LTR */
}
.course-more-details ul li { margin-bottom: 10px; }


/* Responsive pour la page détail */
@media (max-width: 768px) {
    .course-detail-layout {
        flex-direction: column; /* Empile sur mobile */
        gap: 30px;
    }
    html[dir="ltr"] .course-detail-layout {
        flex-direction: column; /* Empile aussi en LTR */
    }
    .course-detail-text {
        text-align: center; /* Centre le texte sur mobile */
        min-width: auto;
    }
     html[dir="ltr"] .course-detail-text {
        text-align: center; /* Centre aussi en LTR */
    }
    .course-detail-text h1 { font-size: 2rem; }
    .course-detail-image { order: -1; /* Met l'image en premier sur mobile */}
}