body {
    overflow-x: hidden;
}

/* Variables CSS personnalisées */
:root {
    --rouge-cma: #A8131D;
    --rouge-eclaire: #EA4B3C;
    --rouge-eclaire-accessible: #CD493D;
    --bleu-marine: #0F3250;
    --bleu-frais: #B0D2D9;

    /* Variables de thème (par défaut bleu) */
    --couleur-principale: #0F3250;
    /* Bleu marine CMA par défaut */
    --couleur-secondaire: #CD493D;
    /* Orange CMA pour les actions */
    --couleur-secondaire-accessible: #B83E32;
}

/* Thème bleu */
body.theme-blue {
    --couleur-principale: #0F3250;
    /* Bleu marine CMA */
    --couleur-secondaire: #CD493D;
    /* Orange CMA pour les actions */
    --couleur-secondaire-accessible: #B83E32;
    /* Orange plus accessible */
}

/* Logo en bleu pour le thème bleu (sauf dans le footer) */
body.theme-blue .logo_letter:not(.footer-logo-element),
body.theme-blue .logo_symbol:not(.footer-logo-element) {
    fill: #CD493D !important;
}

/* Logo du footer reste blanc */
.footer-logo-element {
    fill: #FFFFFF !important;
}

/* Boutons d'action dans le thème bleu */
body.theme-blue .btn-rouge {
    background-color: #CD493D;
    /* Orange CMA */
    border-color: #CD493D;
    color: white !important;
}

body.theme-blue .btn-rouge:hover {
    background-color: #B83E32;
    /* Orange plus foncé au hover */
    border-color: #B83E32;
    color: white !important;
}

body.theme-blue .btn-theme {
    background-color: #CD493D;
    /* Orange CMA */
    border-color: #CD493D;
}

/* Navigation par étapes */
.step-navigation {
    padding: 20px 0;
}

.step-navigation .d-flex {
    position: relative;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #e9ecef;
    z-index: 1;
}

.progress-line {
    transition: background 0.3s ease;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.step-item.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.step-item.active .step-circle {
    background-color: var(--couleur-principale);
    color: white;
    border-color: var(--couleur-principale);
    transform: scale(1.1);
}

.step-item.completed .step-circle {
    background-color: var(--couleur-secondaire);
    color: white;
    border-color: var(--couleur-secondaire);
}

.step-item:hover:not(.disabled) .step-circle {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    color: #6c757d;
    margin-top: 5px;
    white-space: nowrap;
    max-width: 80px;
}

.step-item.active .step-label {
    color: var(--couleur-principale);
    font-weight: 600;
}

.step-item.completed .step-label {
    color: var(--couleur-secondaire);
    font-weight: 600;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .step-label {
        font-size: 10px;
        max-width: 60px;
    }
}

body.theme-blue .btn-theme:hover {
    background-color: #B83E32;
    /* Orange plus foncé au hover */
    border-color: #B83E32;
}

/* Autres éléments qui utilisent la couleur principale dans le thème bleu */
body.theme-blue .progress-bar,
body.theme-blue .badge-primary,
body.theme-blue .notification,
body.theme-blue .btn-primary {
    background-color: #CD493D;
    border-color: #CD493D;
}

/* Pictos des types d'épreuves en bleu pour le thème bleu */
body.theme-blue .exam-type-card .icon-circle {
    background-color: var(--couleur-principale) !important;
}

/* Étape 3 : couleurs spécifiques pour le thème bleu */
/* Créer un compte : reste rouge */
body.theme-blue .account-create-card .icon-circle {
    background-color: var(--rouge-cma) !important;
}

body.theme-blue .account-create-card .btn-rouge {
    background-color: var(--rouge-cma) !important;
    border-color: var(--rouge-cma) !important;
}

/* Me connecter : picto et bouton orange */
body.theme-blue .account-login-card .icon-circle {
    background-color: #CD493D !important;
}

body.theme-blue .account-login-card .btn-bleu {
    background-color: #CD493D !important;
    border-color: #CD493D !important;
    color: white !important;
}

/* France Connect : picto de la même couleur que le bouton */
body.theme-blue .account-franceconnect-card .icon-circle {
    background-color: #000091 !important;
}

/* Bouton France Connect uniformisé */
.btn-france-connect {
    background-color: #000091;
    border-color: #000091;
    color: white;
    padding: 12px 24px;
    font-weight: 600;
}

.btn-france-connect:hover {
    background-color: #1212ff;
    border-color: #1212ff;
    color: white;
}

/* Étape 5 : Total à payer en orange pour le thème bleu */
body.theme-blue .total-price {
    color: #CD493D !important;
}

/* Mon Espace Candidat : éléments en orange pour le thème bleu */
body.theme-blue .dashboard-widget .h4[style*="color: var(--couleur-principale)"] {
    color: #CD493D !important;
}

/* Numéro de dossier */
.dossier-number {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Timeline moderne */
.timeline {
    position: relative;
    margin: 0;
    padding: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.timeline-item.completed .timeline-marker {
    background: #28a745;
    color: white;
}

.timeline-item.current .timeline-marker {
    background: #ffc107;
    color: #333;
    animation: pulse 2s infinite;
}

.timeline-item.pending .timeline-marker {
    background: #6c757d;
    color: white;
}

@keyframes pulse {
    0% {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    50% {
        box-shadow: 0 2px 6px rgba(255, 193, 7, 0.4), 0 0 20px rgba(255, 193, 7, 0.3);
    }

    100% {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
}

.timeline-content {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-content {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.timeline-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-weight: 600;
    margin: 0;
    flex-grow: 1;
    color: #212529;
}

.timeline-date {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    white-space: nowrap;
    margin-left: 1rem;
}

.timeline-description {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Actions requises améliorées */
.action-required-item {
    transition: all 0.3s ease;
    position: relative;
}

.action-required-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-required-item .btn {
    white-space: nowrap;
    min-width: 140px;
    font-size: 0.875rem;
}

.action-required-item .btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
    font-size: 0.8rem;
}

.action-required-item .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

/* Priorités d'actions */
.priority-high::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #dc3545;
    border-radius: 2px;
}

.priority-medium::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #17a2b8;
    border-radius: 2px;
}

.priority-low::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #28a745;
    border-radius: 2px;
}

/* Boutons d'actions dans le thème bleu */
body.theme-blue .action-required-item .btn-bleu {
    background-color: #CD493D !important;
    border-color: #CD493D !important;
}

body.theme-blue .action-required-item .btn-bleu:hover {
    background-color: #B83E32 !important;
    border-color: #B83E32 !important;
}

/* Éléments avec var(--couleur-principale) qui doivent être orange dans le thème bleu */
body.theme-blue .upload-btn,
body.theme-blue .save-btn,
body.theme-blue .confirm-btn,
body.theme-blue .action-btn {
    background-color: #CD493D !important;
    border-color: #CD493D !important;
}

body.theme-blue .upload-btn:hover,
body.theme-blue .save-btn:hover,
body.theme-blue .confirm-btn:hover,
body.theme-blue .action-btn:hover {
    background-color: #B83E32 !important;
    border-color: #B83E32 !important;
}

/* Styles spécifiques pour les éléments de documents.css dans le thème bleu */
body.theme-blue [style*="background: var(--couleur-principale)"],
body.theme-blue [style*="background-color: var(--couleur-principale)"] {
    background: #CD493D !important;
    background-color: #CD493D !important;
}

body.theme-blue .document-upload-btn,
body.theme-blue .crop-apply-btn,
body.theme-blue .signature-save-btn {
    background: #CD493D !important;
    border-color: #CD493D !important;
}

body.theme-blue .document-upload-btn:hover,
body.theme-blue .crop-apply-btn:hover,
body.theme-blue .signature-save-btn:hover {
    background: #B83E32 !important;
    border-color: #B83E32 !important;
}

/* Réinitialisation globale */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typographie */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto Slab', serif;
}

/* Navigation */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.navbar-logo {
    height: 48px;
    width: auto;
}

.nav-link {
    color: #374151 !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--bleu-marine) !important;
    /* Navigation reste bleue */
}

.nav-link.active {
    color: var(--couleur-principale) !important;
}

/* Navigation active en orange pour le thème bleu */
body.theme-blue .nav-link.active {
    color: #CD493D !important;
    position: relative;
}

/* Trait orange sous le menu sélectionné pour le thème bleu (seulement header principal) */
body.theme-blue .navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: #CD493D;
    border-radius: 2px;
}

/* ========== STYLES POUR LE RÉCAPITULATIF DE PAIEMENT ========== */

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.summary-item:last-child {
    margin-bottom: 0;
}

.summary-label {
    font-weight: 500;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 140px;
}

.summary-label i {
    color: var(--couleur-principale);
    width: 16px;
    text-align: center;
}

.summary-value {
    font-weight: 600;
    color: #212529;
    text-align: right;
    flex: 1;
}

.total-item {
    padding-top: 0.5rem;
    border-top: 2px solid #dee2e6;
    margin-top: 0.5rem;
}

.total-item .summary-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bleu-marine);
    /* Texte reste bleu marine */
}

.total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--couleur-principale);
    font-family: 'Roboto Slab', serif;
}

/* Responsive design pour le récapitulatif */
@media (max-width: 768px) {
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .summary-label {
        min-width: auto;
    }

    .summary-value {
        text-align: left;
        font-size: 1rem;
    }

    .total-price {
        font-size: 1.25rem;
    }
}

font-weight: 700;
background-color: transparent !important;
}

/* S'assurer qu'il n'y a pas de fond sur les liens actifs */
.navbar-nav .nav-link.active {
    background-color: transparent !important;
    color: var(--couleur-principale) !important;
}

/* Hover pour les liens actifs */
.nav-link.active:hover {
    color: var(--couleur-principale) !important;
    background-color: transparent !important;
}

/* Gestion des pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Boutons personnalisés CMA */
.btn-cma {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-cma:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-rouge {
    background-color: var(--couleur-principale);
    color: white !important;
    border-color: var(--couleur-principale);
}

.btn-rouge:hover {
    background-color: #8A0F17;
    border-color: #8A0F17;
    color: white !important;
}

.btn-rouge-eclaire {
    background-color: var(--couleur-secondaire);
    color: white !important;
    border-color: var(--couleur-secondaire);
}

.btn-rouge-eclaire:hover {
    background-color: var(--rouge-eclaire-accessible);
    border-color: var(--rouge-eclaire-accessible);
    color: white !important;
}

.btn-bleu {
    background-color: var(--bleu-marine);
    /* Texte reste bleu marine */
    color: white !important;
    border-color: var(--bleu-marine);
    /* Texte reste bleu marine */
}

.btn-bleu:hover {
    background-color: #0A2136;
    border-color: #0A2136;
    color: white !important;
}

.btn-blanc {
    background-color: white;
    color: var(--couleur-principale) !important;
    border-color: white;
}

.btn-blanc:hover {
    background-color: #f8f9fa;
    border-color: #f8f9fa;
    color: var(--couleur-principale) !important;
}

.btn-accessibility {
    background-color: white;
    color: var(--bleu-marine) !important;
    /* Navigation reste bleue */
    border: 2px solid var(--bleu-marine);
    font-weight: 500;
}

.btn-accessibility:hover {
    background-color: #f8f9fa;
    color: var(--bleu-marine) !important;
    /* Navigation reste bleue */
    border-color: var(--bleu-marine);
    /* Texte reste bleu marine */
}

.btn-theme {
    background-color: var(--couleur-principale);
    color: white;
    border: 2px solid var(--couleur-principale);
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-theme:hover {
    background-color: var(--couleur-secondaire);
    color: white;
    border-color: var(--couleur-secondaire);
}

.btn-rouge-outline {
    border: 2px solid white !important;
}

.btn-rouge-outline:hover {
    border: 2px solid #f8f9fa !important;
}

/* Bouton transparent "Espace connecté" dans le thème bleu - garder texte et bordure blancs */
body.theme-blue .btn-rouge-outline {
    background-color: transparent !important;
    border: 2px solid white !important;
    color: white !important;
}

body.theme-blue .btn-rouge-outline:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid white !important;
    color: white !important;
}

/* Hero Section */
.hero-section {
    background-color: var(--couleur-principale);
    padding: 80px 0;
}

/* Cartes */
.card {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
    transition: all 0.3s ease;
}

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

/* Icônes circulaires */
.icon-circle {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--couleur-principale);
    color: white;
    font-size: 1.5rem;
}

.icon-circle-eclaire {
    background-color: var(--couleur-secondaire);
}

.icon-circle-bleu {
    background-color: var(--bleu-marine);
    /* Texte reste bleu marine */
}

/* Types d'examens */
.exam-type-item {
    border-left-color: var(--couleur-principale) !important;
}

.exam-type-item.exam-type-eclaire {
    border-left-color: var(--couleur-principale) !important;
}

.exam-type-item.exam-type-bleu {
    border-left-color: var(--couleur-principale) !important;
}

.exam-type-item.exam-type-frais {
    border-left-color: var(--couleur-principale) !important;
}

/* Layout pour les types d'examens avec icônes */
.exam-type-item-container {
    align-items: flex-start;
}

.exam-type-icon {
    flex-shrink: 0;
    margin-top: 0.25rem;
    width: 60px;
    /* Largeur fixe pour l'alignement */
    display: flex;
    justify-content: center;
}

/* Alignement parfait des traits verticaux dans les types d'examens */
.exam-type-item {
    position: relative;
}

.exam-type-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--couleur-principale);
}

/* Indicateurs d'étapes */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--rouge-cma);
    color: white;
    font-weight: bold;
}

/* Indicateurs d'étapes dans le thème bleu */
body.theme-blue .step-indicator {
    background: var(--couleur-principale) !important;
}

/* Barres de progression */
.progress-bar {
    background-color: var(--couleur-principale);
}

/* Cartes d'examen */
.exam-card {
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exam-card:hover {
    border-color: var(--couleur-principale);
}

.exam-card.selected {
    border-color: var(--couleur-principale);
    background-color: rgba(168, 19, 29, 0.05);
}

/* Widgets du tableau de bord */
.dashboard-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Navigation par onglets */
.tab-button {
    padding: 12px 24px;
    border: none;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    border-radius: 8px;
    margin-right: 4px;
    transition: all 0.3s ease;
}

.tab-button.active {
    background: var(--rouge-cma) !important;
    color: white !important;
}

/* Onglets actifs dans le thème bleu */
body.theme-blue .tab-button.active {
    background: var(--couleur-principale) !important;
    color: white !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Badges de statut */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-en-cours {
    background: #FEF3C7;
    color: #92400E;
}

.status-valide {
    background: #D1FAE5;
    color: #065F46;
}

.status-invalide {
    background: #FFDDDD;
    color: #CD493D;
}

.status-blank {
    background: #E8E8E8;
    color: #454545;
}

.status-attente {
    background: #E0E7FF;
    color: #3730A3;
}

/* Contrôles d'accessibilité */
.accessibility-controls {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1090;
    display: none;
    min-width: 250px;
}

.accessibility-controls.active {
    display: block;
}

/* Classes d'accessibilité */
.high-contrast {
    filter: contrast(1.5) brightness(1.2);
}

.large-text {
    font-size: 1.2em !important;
}

.small-text {
    font-size: 0.9em !important;
}

/* Zone de téléchargement de fichiers */
.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--couleur-principale);
}

.attFileUploadArea {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

.attFileUploadArea:hover {
    border-color: var(--couleur-principale);
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
}

.file-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--rouge-cma);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    display: none;
}

.notification-success {
    background: #28a745 !important;
}

.notification-error {
    background: #dc3545;
}

/* Footer */
footer {
    background-color: #1f2937 !important;
    /* Équivalent bg-gray-800 */
    padding: 48px 0 !important;
    /* Équivalent py-12 */
}

/* Container principal pour éviter les espaces blancs */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Le contenu principal prend l'espace disponible */
.main-content {
    flex: 1;
}

/* Sur les grands écrans, étendre le background du footer vers le bas */
@media (min-height: 800px) {
    footer {
        box-shadow: 0 100vh 0 100vh #1f2937;
    }
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-description {
    color: #9ca3af;
    /* Équivalent text-gray-400 */
    margin-bottom: 0;
}

.footer-title {
    font-size: 1.125rem;
    /* Équivalent text-lg */
    font-weight: 700;
    /* Équivalent font-bold */
    color: white;
}

.footer-links {
    margin-bottom: 0;
}

.footer-link {
    color: #9ca3af;
    /* Équivalent text-gray-400 */
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
    /* Équivalent hover:text-white */
}

.footer-bottom {
    border-top: 1px solid #374151;
    /* Équivalent border-gray-700 */
}

.footer-copyright {
    color: #9ca3af;
    /* Équivalent text-gray-400 */
}

/* Formulaires */
.form-label {
    color: var(--bleu-marine);
    /* Texte reste bleu marine */
    font-weight: 600;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--couleur-principale);
    box-shadow: 0 0 0 0.2rem rgba(168, 19, 29, 0.25);
}

/* Contenus cachés */
.step-content.d-none {
    display: none !important;
}

.tab-content.d-none {
    display: none !important;
}

/* Liens d'effets spéciaux */
.cma-link {
    position: relative;
    overflow: hidden;
}

.cma-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cma-link:hover::before {
    left: 100%;
}

.radio-container {
    flex-direction: row;
}

#messagesPluginContainer {
  #attachFileBtn {
      position: absolute; 
      right: 10px; 
      bottom: 50px; 
      transform: translateY(-50%);
  }
  #attachFileBtn::after {
    content: "Cliquer ici pour transmettre un document"
  }
}

/* Responsive Design */
@media (max-width: 991px) {
    body.theme-blue .navbar-nav .nav-link.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        transform: unset;
        width: 140px;
        height: 3px;
        background-color: #CD493D;
        border-radius: 2px;
    }
}
@media (max-width: 768px) {
    .btn-cma {
        padding: 10px 16px;
        font-size: 14px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .dashboard-widget {
        padding: 16px;
        margin-bottom: 16px;
    }

    .hero-section {
        padding: 60px 0;
    }

    .step-indicator {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    table.table thead {
    display: none;
  }

  table.table tbody tr {
    display: block;
    margin-bottom: 1rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 0.75rem;
  }

  table.table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.5rem 0;
    border: none;
    border-bottom: 1px solid #eee;
    word-break: break-word;
  }

  table.table tbody tr td:last-child {
    border-bottom: none;
  }

  table.table tbody tr td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: small;
    color: #6c757d;
    flex-basis: 45%;
    text-align: left;
  }

  table.table tbody tr td > *:not([type="button"]) {
    flex-basis: 55%;
    text-align: right;
  }

  #messagesPluginContainer {
    #attachFileBtn {
        bottom: -40px; 
        width: 150px;
    }
    #attachFileBtn::after {
        content: "Transmettre un document";
    }
  }
}

@media (max-width: 576px) {
    .accessibility-controls {
        right: 10px;
        left: 10px;
        min-width: auto;
    }

    .file-upload-area {
        padding: 20px;
    }

    .attFileUploadArea {
        padding: 20px;
    }

    .radio-container {
        flex-direction: column;
        gap: .5rem !important
    }
}

/* Animations et transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Utilitaires */
.text-rouge-cma {
    color: var(--couleur-principale) !important;
}

.text-bleu-marine {
    color: var(--bleu-marine) !important;
    /* Navigation reste bleue */
}

.bg-rouge-cma {
    background-color: var(--couleur-principale) !important;
}

.bg-bleu-marine {
    background-color: var(--bleu-marine) !important;
    /* Navigation reste bleue */
}

.border-rouge-cma {
    border-color: var(--couleur-principale) !important;
}

.border-bleu-marine {
    border-color: var(--bleu-marine) !important;
    /* Navigation reste bleue */
}

/* Exception : Support Technique reste rouge même en thème bleu */
body.theme-blue .support-technique-card .icon-circle {
    background-color: var(--rouge-cma) !important;
}

body.theme-blue .support-technique-card .btn-rouge {
    background-color: var(--rouge-cma) !important;
    border-color: var(--rouge-cma) !important;
    color: white !important;
}

body.theme-blue .support-technique-card .btn-rouge:hover {
    background-color: #8A0F17 !important;
    border-color: #8A0F17 !important;
    color: white !important;
}

/* Styles pour la messagerie */
.message-cma {
    background-color: rgba(168, 19, 29, 0.05);
    border-left: 4px solid var(--rouge-cma);
}

.message-user {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
}

/* Icône utilisateur en orange dans les messages pour le thème bleu */
body.theme-blue .message-user .text-primary {
    color: #CD493D !important;
}

/* Uniformisation des hauteurs des cartes d'examen */
.exam-card-uniform {
    min-height: 230px;
}

.exam-card-uniform .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Cartes de sessions d'examens */
.exam-session-card {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    overflow: visible;
}

.exam-session-card:hover {
    border-color: var(--couleur-principale);
    box-shadow: 0 4px 12px rgba(168, 19, 29, 0.1);
}

.exam-session-card.selected {
    border-color: var(--couleur-principale);
    background-color: rgba(168, 19, 29, 0.05);
    box-shadow: 0 4px 12px rgba(168, 19, 29, 0.2);
}

.exam-session-card .progress-bar {
    transition: width 0.3s ease;
}

/* Badge pré-sélectionné */
.exam-session-card .badge {
    font-size: 0.75rem;
    z-index: 10;
}

/* Boutons d'actions pour les sessions */
.btn-outline-secondary {
    border-color: #6c757d;
    color: #6c757d;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background-color: var(--couleur-principale);
    border-color: var(--couleur-principale);
    color: white;
}

.btn-outline-secondary .badge {
    transition: all 0.3s ease;
}

/* Cartes de choix de type d'épreuve */
.exam-type-card {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    height: 100%;
}

.exam-type-card:hover {
    border-color: var(--couleur-principale);
    box-shadow: 0 4px 12px rgba(168, 19, 29, 0.1);
    transform: translateY(-2px);
}

.exam-type-card.selected {
    border-color: var(--couleur-principale);
    background-color: rgba(168, 19, 29, 0.05);
    box-shadow: 0 4px 12px rgba(168, 19, 29, 0.2);
}

.exam-type-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
}

.exam-type-card .icon-circle {
    transition: all 0.3s ease;
}

.exam-type-card:hover .icon-circle {
    transform: scale(1.1);
}

/* Cartes d'options de compte avec alignement */
.account-option-card {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    height: 100%;
}

.account-option-card:hover {
    border-color: var(--couleur-principale);
    box-shadow: 0 4px 12px rgba(168, 19, 29, 0.1);
    transform: translateY(-2px);
}

.account-option-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
    padding: 2rem 1.5rem;
}

.account-option-card .icon-circle {
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.account-option-card:hover .icon-circle {
    transform: scale(1.05);
}

/* Section du contenu texte */
.account-option-card .card-title {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.account-option-card .card-text {
    flex-grow: 1;
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Boutons alignés en bas */
.account-option-card .btn {
    margin-top: auto;
    flex-shrink: 0;
}

/* Bouton France Connect */
.btn-france-connect {
    background-color: #000091;
    border-color: #000091;
    color: white;
    transition: all 0.3s ease;
}

.btn-france-connect:hover {
    background-color: #1212ff;
    border-color: #1212ff;
    color: white;
    transform: translateY(-1px);
}

/* Hover spécial pour France Connect */
.account-option-card:hover .btn-france-connect {
    background-color: #1212ff;
    border-color: #1212ff;
}

/* Modales personnalisées */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
}

/* Validation des formulaires */
.is-invalid {
    /*border-color: var(--couleur-principale) !important;*/
    border-color: var(--bs-form-invalid-border-color) !important;
}

.is-valid {
    border-color: #22c55e !important;
}

.dnd-plugins-content .bg-primary {
    background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important;
}

[class^="plugin-width"] {
    /* to avoid conflicting with bootstrap classes */
    margin: 0 !important;
}

.ui-autocomplete {
    z-index: 99999 !important;
}

.ui-menu.ui-widget.ui-widget-content.ui-autocomplete {
    max-height: 22em;
    overflow: auto;
}

.ui-menu.ui-widget.ui-widget-content.ui-autocomplete .ui-menu-item .ui-state-active {
    color: white;
    background-color: #0F3250;
    border-color: #CD493D;
}

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-ruban {
  position: absolute;
  bottom: 0;
  right: 0;
  max-width: 18%; 
  height: auto;
  object-fit: contain;
}

@media (max-width: 768px) {
  .hero-ruban {
    max-width: 35%;
  }
}

@media (max-width: 480px) {
  .hero-ruban {
    max-width: 50%;
  }
}

.flatpickr-wrapper{
    width: 100%;
}

/* Hide browser's built-in password reveal icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-textfield-decoration-container {
  display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-clear-button {
  visibility: hidden;
  display: none;
  pointer-events: none;
}

/* Safari specific fix */
input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-webkit-textfield-decoration {
  display: none !important;
}

/* General */
input[type="password"] {
  -webkit-text-security: disc !important;
}

.invalid-feedback{
    font-size: 1em !important;
}
