/* style.css - Plateforme Tutorat */
/* Simple, sûr, stable — comme Scribblar, mais en mieux */
/* Conçu pour être fluide, accessible et multilingue */

/* Réinitialisation légère */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: #2c7be5;
    margin-top: 0;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: #2c7be5;
}

a:hover {
    color: #1a68d1;
}

/* Boutons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: #2c7be5;
    border: none;
    color: white;
    padding: 10px 20px;
}

.btn-primary:hover {
    background-color: #1a68d1;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

/* Conteneur principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Cartes */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    padding: 1.5rem;
}

/* Tableaux */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f1f3f5;
    color: #333;
    font-weight: 600;
    vertical-align: middle;
}

.table td, .table th {
    vertical-align: middle;
}

/* Alertes */
.alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Ratio vidéo (YouTube) */
.ratio-16x9 {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 */
}

.ratio-16x9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* --- SUPPORT COMPLET RTL (Arabe) --- */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, 'Helvetica Neue', sans-serif;
}

[dir="rtl"] body {
    font-feature-settings: 'rtla' on;
}

[dir="rtl"] .text-center {
    text-align: center !important;
}

[dir="rtl"] .btn {
    direction: rtl;
    text-align: center;
}

[dir="rtl"] .sidebar {
    float: right !important;
    margin-left: 0;
    margin-right: 20px;
}

[dir="rtl"] .main-content {
    margin-right: 260px;
    margin-left: auto;
}

[dir="rtl"] .nav-item .nav-link {
    text-align: right;
    padding-right: 15px;
    padding-left: 8px;
}

[dir="rtl"] .nav-tabs .nav-link {
    margin-right: -1px;
    margin-left: 0;
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .nav-tabs .nav-link.active {
    border-radius: 8px 0 0 0;
}

[dir="rtl"] label,
[dir="rtl"] .form-label {
    text-align: right;
}

[dir="rtl"] .form-control {
    text-align: right;
    padding-right: 14px;
    padding-left: 8px;
}

[dir="rtl"] .icon,
[dir="rtl"] .text-muted a {
    margin-left: 8px;
    margin-right: 0;
    float: right;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .btn {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .card-body {
        padding: 1rem;
    }

    h1, h2, h3 {
        font-size: 1.5rem;
    }

    /* Ajustement RTL sur mobile */
    [dir="rtl"] .sidebar {
        width: 100%;
        position: static;
        height: auto;
        margin-bottom: 20px;
        float: none;
    }

    [dir="rtl"] .main-content {
        margin-right: 0;
        margin-left: 0;
    }
}

/* Style spécifique pour le tableau blanc */
.iframe-container {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Onglets */
.nav-tabs .nav-link {
    border: 1px solid #dee2e6;
    margin-bottom: -1px;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link.active {
    background-color: white;
    border-bottom: none;
    color: #2c7be5;
}

/* Formulaire */
.form-control {
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 10px 14px;
}

.form-control:focus {
    border-color: #2c7be5;
    box-shadow: 0 0 0 0.2rem rgba(44, 123, 229, 0.25);
}

/* En-tête fixe si besoin */
.header-action {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 24px;
}

/* Icônes alignées */
.icon {
    font-size: 1.5rem;
    margin-right: 8px;
    vertical-align: middle;
}

/* Espacement général */
.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-5 {
    margin-top: 3rem;
}

.text-muted {
    color: #6c757d !important;
}

.bg-white {
    background-color: white !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-10 {
    border-radius: 10px;
}

/* Centre parfait */
.d-flex.align-items-center.justify-content-center {
    min-height: 80vh;
}

/* Chargement propre */
html {
    scroll-behavior: smooth;
}

/* Code inline (ex: ID élève) */
.code-inline {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #1a68d1;
}

<style>
    /* ... tous tes styles existants ... */

    /* === Style spécifique pour la langue arabe === */
    html[lang="ar"] .main-content,
    html[lang="ar"] .main-content * {
        text-align: center !important;
        direction: rtl;
        font-family: 'Segoe UI', Tahoma, 'Helvetica Neue', sans-serif;
    }

    html[lang="ar"] .container-nav {
        flex-direction: row-reverse;
    }

    html[lang="ar"] .container-nav img {
        margin-left: auto;
        margin-right: 10px;
    }

    html[lang="ar"] .btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }
</style>
/* Fin du fichier CSS — Simple, sûr, stable, comme Scribblar... mais en mieux. */