/* ===============================================================================
   PARCOURS CONNECT - CSS ORGANISÉ EN SECTIONS LOGIQUES
   Version réorganisée pour une maintenance optimale
   =============================================================================== */


/* =============================================================================
   01. FONDATIONS - Polices, Variables CSS
   ============================================================================= */

/* ===== POLICES ===== */
@font-face {
    font-family: 'cabin-regular';
    src: url('../fonts/Cabin-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Ratios propres pour la mise en page 25%/75% sans grid */
.editor-container { align-items: stretch; }
.editor-container .fiches-container {
    flex: 1 1 25%;
    min-width: 260px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.editor-container .editor-wrapper {
    flex: 3 1 0;
    min-width: 0; /* permet au contenu de rétrécir correctement */
}

/* Empêche la liste de déborder vers le bas et délègue le scroll à l'intérieur */
.editor-container .fiche-outil-list {
    display: flex;
    flex-direction: column;
    min-height: 0; /* nécessaire avec flex pour autoriser le shrink */
}

/* Proportions verticales des listes (N1/N2) dans l'éditeur d'étape */
.editor-container .fiches-container .fiche-outil-list,
.editor-container .fiches-container .fiche-outil-niv2-list {
    min-height: 0; /* autorise le shrink et le scroll interne */
}

/* Légère réduction de N1 et augmentation de N2 */
.editor-container .fiches-container .fiche-outil-list {
    flex: 1 1 75%;
}
.editor-container .fiches-container .fiche-outil-niv2-list {
    flex: 1 1 25%;
}

.editor-container #fiche-outil-container {
    flex: 1 1 auto;
    min-height: 0; /* important pour éviter l'étirement infini */
    overflow: auto; /* scroll interne propre */
    max-height: none; /* retire d'anciens plafonds qui tronquaient mal */
}

@font-face {
    font-family: 'cabin-semibold';
    src: url('../fonts/Cabin-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'moretype-regular';
    src: url('../fonts/moretype-Mic32New-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'moretype-medium';
    src: url('../fonts/moretype-Mic32New-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}


/* ===============================================================================
   VARIABLES CSS CONSOLIDÉES ET OPTIMISÉES
   Toutes les variables CSS du projet dans un seul endroit logique
   =============================================================================== */

:root {
    /* =============================================================================
       SYSTÈME DE DESIGN - FONDATIONS
       ============================================================================= */

    /* === TYPOGRAPHIE === */
    --font-family: 'cabin-regular', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-heading: 'cabin-semibold', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-moretype-regular: 'moretype-regular', var(--font-family);
    --font-moretype-medium: 'moretype-medium', var(--font-heading);

    /* === ESPACEMENT SYSTÈME === */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-xxl: 3rem;      /* 48px */

    /* === COULEURS FONDAMENTALES === */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* === COULEURS SÉMANTIQUES === */
    --primary-color: #0056b3;
    --primary-hover: #003d73;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;

    /* === COULEURS SPÉCIFIQUES MÉTIER === */
    --assurance-maladie-blue: #3b4a6b;
    --color-pratique: #a21caf;
    --color-etape: #0e7490;
    --color-fiche: #be185d;

    /* === COULEURS D'INTERFACE === */
    --light-bg-color: #E8EDF7;
    --link-color: var(--primary-color);
    --link-hover-color: var(--primary-hover);
    --heading-color: var(--dark-color);
    --text-color: var(--gray-800);
    --text-muted: var(--gray-600);
    --border-color: #dee2e6;

    /* === SYSTÈME DE BORDURES === */
    --border-width: 1px;
    --border-style: solid;
    --border: var(--border-width) var(--border-style) var(--border-color);
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --border-radius-full: 9999px;

    /* === SYSTÈME D'OMBRES === */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* === TRANSITIONS === */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-colors: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
    --transition-transform: transform var(--transition-base);
    --transition-shadow: box-shadow var(--transition-base);
    --transition-all: all var(--transition-base);

    /* === ÉDITEURS === */
    --tinymce-min-height: 400px;
    --tinymce-min-height-large: 500px;
    --tinymce-min-height-editor: 500px;
    --tinymce-border-color: #dee2e6;
    --tinymce-border-radius: var(--border-radius);
    --tinymce-drag-bg: rgba(13, 110, 253, 0.05);
    --tinymce-drag-border-color: #0d6efd;

    /* === VARIABLES MANQUANTES === */
    --banner-text-color: var(--header-text);
    --grid-columns: 12;

    /* =============================================================================
       COMPOSANTS - VARIABLES SPÉCIALISÉES
       ============================================================================= */

    /* === HEADER & NAVIGATION === */
    --header-bg: var(--assurance-maladie-blue);
    --header-text: var(--white);
    --header-padding: var(--spacing-xl) 0;
    --header-z-index: 100;
    --logo-spacing: var(--spacing-lg);
    --nav-button-size: 40px;
    --nav-button-icon-size: 24px;
    --nav-gap: var(--spacing-md);
    --nav-z-index: 1000;
    --nav-offset: 20px;

    /* === BOUTONS === */
    --btn-padding-y: 0.5rem;
    --btn-padding-x: 1rem;
    --btn-padding: var(--btn-padding-y) var(--btn-padding-x);
    --btn-font-size: 1rem;
    --btn-font-weight: 500;
    --btn-line-height: 1.5;
    --btn-border-radius: var(--border-radius);
    --btn-transition: var(--transition-colors), var(--transition-shadow);
    --btn-disabled-opacity: 0.65;
    --btn-hover-transform: translateY(-1px);
    --button-size: var(--nav-button-size);
    --button-bg: var(--white);
    --button-shadow: var(--shadow);
    --button-transition: var(--transition-all);

    /* Variantes boutons */
    --btn-sm-padding-y: 0.25rem;
    --btn-sm-padding-x: 0.5rem;
    --btn-sm-font-size: 0.875rem;
    --btn-lg-padding-y: 0.75rem;
    --btn-lg-padding-x: 1.5rem;
    --btn-lg-font-size: 1.125rem;

    /* === FORMULAIRES === */
    --form-group-margin: var(--spacing-md);
    --form-label-margin: var(--spacing-xs);
    --form-label-font-weight: 500;
    --form-control-padding: 0.5rem 0.75rem;
    --form-control-font-size: 1rem;
    --form-control-line-height: 1.5;
    --form-control-bg: var(--white);
    --form-control-border: var(--border);
    --form-control-border-radius: var(--border-radius-sm);
    --form-control-focus-border: var(--primary-color);
    --form-control-focus-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    --form-control-disabled-bg: var(--light-color);
    --form-control-transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    --form-control-color: var(--text-color);


    /* === CARTES === */
    --card-bg: var(--white);
    --card-border: var(--border);
    --card-border-radius: var(--border-radius);
    --card-shadow: var(--shadow-sm);
    --card-shadow-hover: var(--shadow-md);
    --card-padding: var(--spacing-md);
    --card-header-bg: linear-gradient(135deg, var(--primary-color) 0%, #0b5ed7 100%);
    --card-header-color: var(--white);
    --card-footer-bg: var(--light-color);
    --card-footer-border: var(--border);
    --card-transition: var(--transition-shadow);

    /* === TIMELINE === */
    --timeline-line-color: #4a5568;
    --timeline-line-width: 4px;
    --timeline-item-gap: 100px;
    --timeline-circle-size: 16px;
    --timeline-icon-size: 70px;
    --timeline-icon-border: 4px solid var(--white);
    --timeline-active-color: #3182ce;
    --timeline-number-size: 2.5rem;
    --timeline-title-width: 200px;
    --timeline-vertical-height: 100px;

    /* === FICHES-OUTILS === */
    --fiche-bg: var(--white);
    --fiche-border-radius: 6px;
    --fiche-padding: 12px 15px;
    --fiche-margin: 10px 0;
    --fiche-transition: var(--transition-all);
    --fiche-border-base: var(--border-color);
    --fiche-text-color: var(--black);
    --fiche-icon-color: var(--gray-500);
    --fiche-shadow-hover: 0 3px 8px rgba(0, 0, 0, 0.15);

    /* Fiches niveau 1 */
    --fiche-niv1-border: #0d6efd;
    --fiche-niv1-bg-hover: #e3f2fd;
    --fiche-niv1-border-hover: #2196f3;
    --fiche-niv1-shadow-hover: rgba(33, 150, 243, 0.2);

    /* Fiches niveau 2 */
    --fiche-niv2-border: var(--success-color);
    --fiche-niv2-bg-hover: #e8f5e8;
    --fiche-niv2-border-hover: var(--success-color);
    --fiche-niv2-shadow-hover: rgba(40, 167, 69, 0.2);

    /* === ÉDITEURS === */
    --editor-min-height: 400px;
    --editor-min-height-large: 500px;
    --editor-min-height-xl: 600px;
    --editor-padding: 1rem;
    --editor-font-size: 1rem;
    --editor-line-height: 1.6;
    --editor-transition: all 0.2s ease;
    --editor-border: var(--border);
    --editor-border-radius: var(--border-radius);
    --editor-drag-border: 2px dashed #0d6efd;
    --editor-drag-bg: rgba(13, 110, 253, 0.05);
    --editor-drag-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);

    /* === ACCORDÉONS === */
    --accordion-border: 1px solid rgba(0, 0, 0, 0.125);
    --accordion-border-radius: var(--border-radius-md);
    --accordion-shadow: var(--shadow-sm);
    --accordion-padding: 1rem 1.25rem;
    --accordion-transition: all 0.3s ease-in-out;
    --accordion-focus-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    --accordion-active-bg: rgba(13, 110, 253, 0.1);
    --accordion-active-color: var(--primary-color);

    /* === Z-INDEX SYSTÈME === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;

    /* === CONTENEURS === */
    --container-max-width: 1200px;
    --container-padding: var(--spacing-md);
    --sidebar-max-width: 280px;
    --sidebar-bg: #C4D0EB;
    --content-max-height: calc(100vh - 250px);
}

/* =============================================================================
   VARIABLES RESPONSIVE
   ============================================================================= */

/* Tablettes et inférieures */
@media (max-width: 768px) {
    :root {
        --spacing-xs: 0.2rem;
        --spacing-sm: 0.4rem;
        --spacing-md: 0.8rem;
        --spacing-lg: 1.2rem;
        --spacing-xl: 1.6rem;
        --spacing-xxl: 2rem;

        --container-padding: var(--spacing-sm);
        --card-padding: var(--spacing-sm);

        --timeline-item-gap: 90px;
        --timeline-icon-size: 60px;
        --timeline-number-size: 1.8rem;
        --timeline-title-width: 180px;
        --timeline-vertical-height: 80px;

        --nav-button-size: 35px;
        --nav-button-icon-size: 18px;
        --nav-offset: 10px;

        --btn-padding-y: 0.4rem;
        --btn-padding-x: 0.8rem;
        --btn-font-size: 0.9rem;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    :root {
        --border-radius: 0.3rem;
        --border-radius-lg: 0.6rem;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
        --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.1);

        --timeline-icon-size: 50px;
        --timeline-number-size: 1.6rem;
        --timeline-title-width: 160px;
        --timeline-vertical-height: 70px;

        --container-padding: 5px;
        --card-padding: 0.75rem;
    }
}

/* =============================================================================
   02. RESET & BASE - Reset global, Styles HTML de base, Typographie
   ============================================================================= */

/* Reset global */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Styles de base */
html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    height: 100%;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-bg-color, #E8EDF7);
    height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.fiches-associees-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
}

.fiches-associees-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.saving-indicator.show {
    display: flex;
}

.saving-indicator i {
    animation: spin 1s linear infinite;
    font-size: 1.1rem;
}

/* Upload d'icônes */
.icon-upload-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

#icon-preview img,
.current-icon img {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.current-icon {
    margin-bottom: 1rem;
}

.current-icon img {
    max-width: 100px;
    max-height: 100px;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.4;
}

.form-text i {
    color: #007bff;
}

/*  Sélecteur de couleur avec aperçu */
.color-select-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-preview {
    width: 30px;
    height: 30px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}



/* Typographie */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    color: var(--heading-color, var(--dark-color));
}

/* Liens */
a {
    color: var(--link-color, var(--primary-color));
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

a:hover, a:focus {
    color: var(--link-hover-color, var(--primary-hover, #003d73));
    text-decoration: underline;
    outline: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-style: none;
}

/* Formulaires de base */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
input {
    overflow: visible;
}

button,
select {
    text-transform: none;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
    cursor: pointer;
}

/* =============================================================================
   03. LAYOUT & GRILLES - Containers, Layout principal, Grilles responsive
   ============================================================================= */

/* Conteneur racine de l'application */
#body-content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--light-bg-color, #E8EDF7);
    gap: 15px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Conteneur principal flexible */
.main-container {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Conteneur de contenu standard */
.container {
    width: 100%;
    max-width: 1200px; /* Limite raisonnable */
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Suppression des conteneurs imbriqués problématiques */
.container .container {
    padding: 0;
    max-width: 100%;
    margin: 0;
}

/* =============================================================================
   LAYOUTS SPÉCIALISÉS
   ============================================================================= */

/* Layout avec sidebar (pages d'édition) */
.main-content.with-sidebar {
    display: flex;
    flex-direction: row;
    padding: 20px;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 30px;
    box-sizing: border-box;
}
/* Zone de contenu centrée (pages publiques) */
.content-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    flex: 1;
    background-color: #E8EDF7;
    box-sizing: border-box;
}


.left-content {
    flex: 3;
    padding-right: 30px;
    min-width: 0; /* Évite le débordement du contenu */
}

/* =============================================================================
   SECTIONS PRINCIPALES
   ============================================================================= */

/* En-têtes de page */
.page-header {
    padding: 0;
    margin-bottom: 0.25rem;
    width: 100%;
}

.page-header h1 {
    margin: 0;
    font-size: 1.75rem;
    color: var(--assurance-maladie-blue);
}

/* Fil d'Ariane */
.breadcrumb-container {
    padding: 1rem 0;
    background-color: var(--white);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

/* ============================================================================
   HOME LAYOUT - Bloc simplifié et prioritaire
   ----------------------------------------------------------------------------
   Objectif: garantir l'ordre Desktop (left | right ; contact | right)
             et l'empilement Mobile (left, right, contact) sans conflit.
   ============================================================================ */
.main-content.home-layout {
    display: grid;
    /* Colonne droite élargie (+2 crans) et responsive */
    grid-template-columns: 1fr minmax(400px, 480px);
    grid-template-areas: "left right" "contact right";
    grid-auto-flow: row;
    gap: 30px;
    align-items: start;
}

.main-content.home-layout > .left-content { grid-area: left; }
.main-content.home-layout > .right-sidebar { grid-area: right; }
.main-content.home-layout > .contact-button-container { grid-area: contact; }

/* Ajustements structurels pour la home: largeur contenue et colonne gauche qui s'étire */
.main-content.home-layout {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.main-content.home-layout > .left-content {
    display: flex;
    align-items: stretch;
}

/* Styles visuels du menu de droite (home uniquement) */
.main-content.home-layout > .right-sidebar {
    background: #C9DDED;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Laisser la sidebar grandir selon le contenu sur desktop */
    max-height: none;
    overflow: visible;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .main-content.home-layout {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas: "left" "right" "contact";
        gap: 20px;
    }

    .main-content.home-layout > .left-content { grid-area: left; }
    .main-content.home-layout > .right-sidebar { grid-area: right; }
    .main-content.home-layout > .contact-button-container { grid-area: contact; }

    /* Ajustements mobile du menu de droite */
    .main-content.home-layout > .right-sidebar {
        max-height: none;
        margin: 0;
        padding: 20px;
    }
}

/* Desktop: contraindre la hauteur pour éviter la scrollbar globale (sans toucher header/footer)
   (déplacé dans la section des media queries consolidées) */



/* Fil d'Ariane - Normalisation de l'espacement sous le menu public */
.content-area > .container:first-child {
    /* Neutraliser les espacements initiaux variables (mt-4, py-4, etc.) */
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Assurer un espacement identique du breadcrumb quelle que soit la page */
.content-area nav[aria-label="breadcrumb"] {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

/* Cas le plus fréquent : breadcrumb placé dans le premier container */
.content-area > .container:first-child nav[aria-label="breadcrumb"] {
    margin-top: var(--spacing-sm);
}

/* Sections de contenu avec carte */
#body-content .content-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* =============================================================================
   SUPPRESSION DES RÈGLES PROBLÉMATIQUES
   ============================================================================= */

/* Masquage du conteneur indésirable (au lieu de le supprimer) */
body > .container.mt-4 {
    display: none !important;
}

/* =============================================================================
   RESPONSIVE POUR LAYOUT
   ============================================================================= */

/* Tablettes et inférieures */
@media (max-width: 992px) {
    .main-content.with-sidebar {
        flex-direction: column;
        width: 95%;
        padding: 15px;
        gap: 20px;
    }

    .left-content {
        width: 100%;
        padding-right: 0;
        margin-bottom: 20px;
    }

    .right-sidebar {
        width: 100%;
        max-height: none;
        min-width: auto;
    }

    .main-container {
        padding: 0 10px;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem 0;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    #body-content .content-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .main-container {
        padding: 0 8px;
        gap: 10px;
    }

    .container {
        padding: 0 8px;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .main-container {
        padding: 0 5px;
    }

    .container {
        padding: 0 5px;
    }

    #body-content .content-card {
        padding: 0.75rem;
    }
}

/* =============================================================================
   CLASSES UTILITAIRES DE LAYOUT
   ============================================================================= */

/* Espacement */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.ml-0 { margin-left: 0 !important; }
.mr-0 { margin-right: 0 !important; }
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; }
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }

/* Largeurs */
.w-100 { width: 100% !important; }
.max-w-100 { max-width: 100% !important; }

/* Flexbox utilitaires */
.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.flex-1 { flex: 1 !important; }


/* =============================================================================
   04. EN-TÊTE & NAVIGATION - Header banner, Menu public, Navigation
   ============================================================================= */

.header-banner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--header-bg);
    color: var(--header-text);
    border-bottom: var(--border-width) solid var(--border-color);
    position: relative;
    z-index: var(--header-z-index);
    min-height: 120px;
}

.header-banner .logo-container {
    flex-shrink: 0;
}

.header-banner .logo-container img {
    height: 60px;
    width: auto;
}

.header-banner .parcours-logo-container {
    flex-shrink: 0;
    padding: var(--spacing-xs);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-all);
}

.header-banner .parcours-logo-container:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.header-banner .parcours-logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.header-banner h1 {
    flex: 1;
    text-align: center;
    margin: 0;
    font-family: var(--font-moretype-medium);
    font-weight: 500;
    font-size: 2.5rem;
    color: var(--header-text);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Media queries pour responsive */
@media (max-width: 768px) {
    .header-banner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        text-align: center;
        min-height: auto;
        padding: var(--spacing-sm) var(--spacing-md);
        justify-content: flex-start;
        align-items: center;
    }

    .header-banner .logo-container {
        order: 1;
        flex: 0 1 auto;
        flex: 0 1 auto; /* autorise le shrink si nécessaire */
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding-right: 0;
        margin-right: 0; /* aucun espace entre les deux logos */
        margin-left: 6px; /* léger retrait du bord gauche */
    }

    .header-banner .parcours-logo-container {
        order: 2;
        flex: 0 1 auto; /* autorise le shrink si nécessaire */
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-left: 8px; /* espace un peu plus grand entre les logos */
        padding: 0; /* supprime le padding du style de base */
        box-shadow: none; /* supprime l'ombre qui crée un espace visuel */
    }

    .header-banner h1 {
        order: 3;
        flex: 0 0 100%; /* force le titre à passer sur la ligne suivante */
        font-size: 2rem;
        margin-top: var(--spacing-xs);
    }

    /* Tailles de logos plus compactes sur mobile */
    .header-banner .logo-container img {
        height: 42px;
    }
    .header-banner .parcours-logo-img {
        height: 42px;
    }

    /* Désactive l'effet hover qui pourrait déplacer l'élément sur mobile */
    .header-banner .parcours-logo-container:hover {
        box-shadow: none;
        transform: none;
    }
}

/* Boutons de navigation */
.navigation-buttons {
    gap: var(--nav-gap);
    z-index: var(--nav-z-index);
    top: var(--nav-offset);
    right: var(--nav-offset);
    position: fixed;
    display: flex;
}

.nav-button {
    width: var(--nav-button-size);
    height: var(--nav-button-size);
    background-color: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition-all);

    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    border: none;
    padding: 0;
}

.nav-button:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.nav-button img {
    width: var(--nav-button-icon-size);
    height: var(--nav-button-icon-size);
    display: block;
}

.navbar-separator {
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0 10px;
    align-self: center;
}

.contact-highlight {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.contact-highlight:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* EN-TÊTE ASSURANCE MALADIE */
.assurance-maladie-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
    z-index: 1000;
    position: relative;
}

.assurance-maladie-logo img {
    max-width: 300px;
    height: auto;
    display: block;
}

/* Menu public */
.public-menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-grow: 1;
    padding: 0 20px 0 40px;
    font-family: 'cabin-regular', sans-serif;
    background-color: #fff;
    height: 50px;
    overflow: visible;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.public-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    height: 100%;
    align-items: center;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

.public-menu-item {
    margin: 0;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

/* Décalage de 2px pour les éléments dropdown (deux premiers) */
.public-menu-item.dropdown {
    transform: translateY(2px);
}

/* Alignement pour les deux derniers éléments (non-dropdown) */
.public-menu-item:not(.dropdown) {
    transform: translateY(-9px);
    align-items: center;
}

/* Séparateur pointillé entre les éléments du menu - couleur #3b4a6b */
.public-menu-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: repeating-linear-gradient(
            0deg,
            #3b4a6b,
            #3b4a6b 2px,
            transparent 2px,
            transparent 4px
    );
}

/* Correction pour le dernier élément du menu qui n'a pas besoin de séparateur */
.public-menu-item:last-child {
    position: relative;
    padding-right: 0;
    margin-right: 0;
}

.public-menu-link {
    color: #3b4a6b;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: 'cabin-regular', sans-serif;
    padding: 0 20px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    position: relative;
    height: 100%;
    white-space: nowrap;
    justify-content: center;
}

.public-menu-link:hover,
.public-menu-link.active,
.public-menu-link.show {
    color: #0066cc;
    text-decoration: none;
}

/* Ligne bleue en dessous de l'élément actif */
.public-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.public-menu-link.active::after,
.public-menu-link.show::after {
    background-color: #3b4a6b;
}

.public-menu .dropdown-menu {
    margin-top: 3px;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
    min-width: 200px;
}

/* Flèche du menu déroulant */
.public-menu .dropdown-toggle {
    position: relative;
    padding-bottom: 24px;
}

/* Chevron - couleur #3b4a6b */
.public-menu .dropdown-toggle::after {
    content: '';
    border: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b4a6b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 24px;
    height: 24px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.2s ease;
}

/* Chevron blanc quand le menu est ouvert */
.public-menu .dropdown-toggle.show::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    transform: translateX(-50%) rotate(180deg) !important;
}

/* Éléments du menu déroulant */
.public-menu .dropdown-item {
    padding: 10px 20px;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.public-menu .dropdown-item:hover {
    background-color: #f5f9ff;
    color: #3b4a6b;
}

.public-menu .dropdown-divider {
    margin: 0;
    border-top: 1px solid #e9ecef;
}

/* Style pour le menu déroulant ouvert */
.public-menu .dropdown-toggle.show {
    color: #0066cc;
}

/* Suppression des icônes dans le menu */
.public-menu-link i {
    display: none;
}

/* Styles pour la navbar Bootstrap responsive */
.public-navbar {
    background-color: white !important;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 1rem;
    min-height: 60px;
    align-items: center;
}

/* Logo intégré dans la navbar */
.public-navbar .assurance-maladie-logo {
    margin-right: 1.5rem;
    margin-left: 0; /* Pas de marge à gauche */
    padding: 0;
    text-decoration: none !important; /* Supprime le trait horizontal */
    border-bottom: none !important;
    display: flex;
    align-items: center;
    width: auto; /* Largeur automatique */
    flex-shrink: 0; /* Empêche la compression */
}

.public-navbar .assurance-maladie-logo:hover,
.public-navbar .assurance-maladie-logo:focus {
    text-decoration: none !important;
    border-bottom: none !important;
}

.public-navbar .assurance-maladie-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.public-navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Éléments groupés à gauche */
    gap: 1rem; /* Espacement entre logo et bouton hamburger */
}

.public-navbar .navbar-nav {
    flex-grow: 1;
    justify-content: center;
    margin-left: 1rem; /* Compense l'espace du logo */
}

.public-navbar .nav-link {
    color: #3b4a6b !important;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: 'cabin-regular', sans-serif;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Bordures en pointillés entre les éléments du menu */
.public-navbar .nav-item:not(:last-child) {
    border-right: 1px dotted #ccc;
}

.public-navbar .nav-item:not(:last-child) .nav-link {
    margin-right: 0.5rem;
}

.public-navbar .nav-item:not(:first-child) .nav-link {
    margin-left: 0.5rem;
}

/* Personnalisation des chevrons dropdown */
.public-navbar .dropdown-toggle::after {
    display: none; /* Cache le chevron Bootstrap par défaut */
}

.public-navbar .dropdown-toggle {
    position: relative;
    padding-bottom: 1rem; /* Espace pour le chevron en dessous */
}

.public-navbar .dropdown-toggle::before {
    content: '';
    position: absolute;
    bottom: 0.2rem;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #3b4a6b;
    border-bottom: 2.5px solid #3b4a6b;
    border-radius: 1px;
    transition: border-color 0.2s ease;
}

.public-navbar .dropdown-toggle:hover::before,
.public-navbar .dropdown-toggle.show::before {
    border-right-color: #0066cc;
    border-bottom-color: #0066cc;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active,
.public-navbar .nav-link.show {
    color: #0066cc !important;
}

.public-navbar .dropdown-menu {
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    min-width: 200px;
    display: none; /* Caché par défaut */
}

.public-navbar .dropdown-menu.show {
    display: block; /* Visible quand activé par Bootstrap */
}

.public-navbar .dropdown-item {
    color: #212529;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.public-navbar .dropdown-item:hover,
.public-navbar .dropdown-item:focus {
    background-color: #f5f9ff;
    color: #3b4a6b;
}

.public-navbar .navbar-toggler {
    border: 1px solid #3b4a6b;
    padding: 0.25rem 0.5rem;
    margin-right: 0; /* Supprime la marge par défaut */
}

.public-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 74, 107, 0.25);
}

/* Styles spécifiques pour les résolutions desktop (1200px+) */
@media (min-width: 1200px) {
    .public-navbar .dropdown-menu {
        display: none !important; /* Force le masquage par défaut */
    }

    .public-navbar .dropdown-menu.show {
        display: block !important; /* Visible seulement avec la classe .show */
    }
}

/* Responsive adjustments */
@media (max-width: 1199.98px) {
    .public-navbar .assurance-maladie-logo {
        margin-right: 0.5rem; /* Réduit la marge sur mobile */
    }

    .public-navbar .assurance-maladie-logo img {
        height: 35px; /* Légèrement plus petit sur mobile */
    }

    .public-navbar .navbar-nav {
        text-align: center;
        margin-left: 0; /* Supprime la compensation sur mobile */
        width: 100%;
    }

    .public-navbar .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f8f9fa;
    }

    /* Suppression des bordures verticales sur mobile */
    .public-navbar .nav-item:not(:last-child) {
        border-right: none;
    }

    .public-navbar .nav-item:not(:last-child) .nav-link,
    .public-navbar .nav-item:not(:first-child) .nav-link {
        margin-left: 0;
        margin-right: 0;
    }

    .public-navbar .dropdown-toggle {
        padding-bottom: 0.75rem; /* Ajustement pour mobile */
    }

    .public-navbar .dropdown-toggle::before {
        bottom: 0.1rem; /* Position ajustée pour mobile */
        width: 8px;
        height: 8px;
        border-right: 2px solid #3b4a6b;
        border-bottom: 2px solid #3b4a6b;
        border-radius: 0.5px; /* Chevron symétrique pour mobile */
    }

    .public-navbar .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        border: none;
        background-color: #f8f9fa;
        margin-top: 0;
    }

    .public-navbar .dropdown-item {
        padding: 0.5rem 2rem;
        font-size: 0.95rem;
    }
}

/* Bannières et logos */
.assurance-maladie-banner {
    background-color: white;
    width: 100%;
    padding: 6px 0;
    margin-bottom: 0;
}

.assurance-maladie-banner .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.logo-container svg,
.logo-container img {
    height: 60px;
    width: auto;
}

/* =============================================================================
   05. COMPOSANTS UI - Boutons, Formulaires, Cartes
   ============================================================================= */

/* ===== BOUTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--btn-padding-y, 0.5rem) var(--btn-padding-x, 1rem);
    font-size: var(--btn-font-size, 1rem);
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid var(--border-color);
    border-radius: var(--btn-border-radius, var(--border-radius));
    background-color: transparent;
    color: var(--dark-color);
    transition: var(--btn-transition, all 0.2s ease);
    cursor: pointer;
    text-decoration: none;
    gap: 0.5rem;
}

.btn:not(:disabled):not(.disabled):hover {
    background-color: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.btn:disabled, .btn.disabled {
    opacity: var(--btn-disabled-opacity, 0.65);
    pointer-events: none;
}

/* Variantes de boutons */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:not(:disabled):not(.disabled):hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-secondary:not(:disabled):not(.disabled):hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: var(--white);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:not(:disabled):not(.disabled):hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Tailles de boutons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.btn-lg {
    padding: 0.5rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ===== FORMULAIRES ===== */
.form-group {
    margin-bottom: var(--form-group-margin);
}

.form-label {
    display: block;
    margin-bottom: var(--form-label-margin);
    font-weight: var(--form-label-font-weight);
    color: var(--text-color);
}

.form-control {
    display: block;
    width: 100%;
    padding: var(--form-control-padding);
    font-size: var(--form-control-font-size);
    line-height: var(--form-control-line-height);
    color: var(--text-color);
    background-color: var(--form-control-bg);
    border: var(--form-control-border);
    border-radius: var(--form-control-border-radius);
    transition: var(--form-control-transition);
}

/* États des champs de formulaire */
.form-control:focus {
    color: var(--form-control-color);
    background-color: var(--form-control-bg);
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--light-color);
    opacity: 1;
}

.form-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-header {
    margin-bottom: 2rem;
}

#pratique_description {
    height: 100px;
}

/* ===== CARTES ===== */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0b5ed7 100%);
    color: white;
    font-weight: 500;
    /* Force heading color via variable instead of !important overrides */
    --heading-color: #fff;
}

/* (Removed explicit heading color overrides in favor of --heading-color) */

/* Make outline buttons readable within dark card headers (no !important, higher specificity) */
.card-header .btn.btn-outline-primary,
.card-header .btn.btn-outline-secondary,
.card-header .btn.btn-outline-success,
.card-header .btn.btn-outline-danger,
.card-header .btn.btn-outline-warning,
.card-header .btn.btn-outline-info,
.card-header .btn.btn-outline-dark,
.card-header .btn.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.85);
}

.card-header .btn.btn-outline-primary:hover,
.card-header .btn.btn-outline-secondary:hover,
.card-header .btn.btn-outline-success:hover,
.card-header .btn.btn-outline-danger:hover,
.card-header .btn.btn-outline-warning:hover,
.card-header .btn.btn-outline-info:hover,
.card-header .btn.btn-outline-dark:hover,
.card-header .btn.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/* Ensure icons inside buttons follow the text color */
.card-header .btn i { color: inherit; }

.card-body {
    padding: var(--card-padding);
}

.card-footer {
    padding: var(--card-padding);
    background-color: var(--card-footer-bg);
    border-top: var(--card-footer-border);
}

/* =============================================================================
   06. TIMELINE - Système timeline complet, Étapes
   ============================================================================= */

/* Container principal de la timeline */
.etape-timeline-container {
    position: relative;
    padding: 140px 20px;
    margin: 40px 0 70px 0;  /* ← MODIFICATION : plus d'espace en bas */
    background-color: transparent;
}

/* Ligne horizontale principale */
.etape-timeline-line {
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 4px;
    background-color: #4a5568;
    transform: translateY(-50%);
    z-index: 1;
}

/* Container des étapes */
.etape-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    padding: 0 40px;
    overflow: visible;
    max-width: 100%;
}

/* Item d'étape */
.etape-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
    cursor: pointer;
    margin: 0 10px;
}

/* Petit cercle à la base (sur la ligne horizontale) */
.etape-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background-color: #4a5568;
    border-radius: 50%;
    z-index: 3;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* Trait vertical créé avec ::after */
.etape-item::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-color: #4a5568;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Traits vers le haut (étapes impaires) */
.etape-item:nth-child(odd)::after {
    bottom: 50%;
    height: 100px;
}

/* Traits vers le bas (étapes paires) */
.etape-item:nth-child(even)::after {
    top: 50%;
    height: 100px;
}

/* Grand cercle avec icône - Repositionné au bout du trait */
.etape-icon {
    width: 70px;
    height: 70px;
    background-color: #4a5568;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    margin-left: -35px;
    z-index: 4;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.3);
    /* Le liseré blanc est réservé à l'étape active */
    border: 4px solid transparent;
}

/* Positionnement du grand cercle vers le haut */
.etape-item:nth-child(odd) .etape-icon {
    bottom: 50%;
    margin-bottom: 100px;
}

/* Positionnement du grand cercle vers le bas */
.etape-item:nth-child(even) .etape-icon {
    top: 50%;
    margin-top: 100px;
}

.etape-icon i {
    color: white;
    font-size: 1.8rem;
}

.etape-icon img,
.etape-icon .etape-icon-image {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

/* Numéro - À GAUCHE du trait vertical, aligné avec le grand cercle */
.etape-number {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c5aa0;
    line-height: 1;
    font-family: var(--font-family-heading, 'cabin-semibold', sans-serif);
    right: 50%;
    margin-right: 15px;
    z-index: 5;
}

/* Titre - À DROITE du trait vertical, aligné avec le grand cercle */
.etape-title {
    position: absolute;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4a5568;
    line-height: 1.4;
    max-width: 200px;
    width: 200px;
    font-family: var(--font-family, 'cabin-regular', sans-serif);
    word-wrap: break-word;
    hyphens: auto;
    left: 50%;
    margin-left: 15px;
    z-index: 5;
    text-align: left;
}

/* Positionnement pour les étapes impaires (vers le haut) */
.etape-item:nth-child(odd) .etape-number {
    bottom: 50%;
    margin-bottom: 35px;
    top: auto;
}

.etape-item:nth-child(odd) .etape-title {
    bottom: 50%;
    margin-bottom: 40px;
    top: auto;
}

/* Positionnement pour les étapes paires (vers le bas) */
.etape-item:nth-child(even) .etape-number {
    top: 50%;
    margin-top: 35px;
}

.etape-item:nth-child(even) .etape-title {
    top: 50%;
    margin-top: 40px;
}

/* États actifs */
.etape-item.active::before {
    background-color: #3182ce;
}

.etape-item.active::after {
    background-color: #3182ce;
}

.etape-item.active .etape-icon {
    background-color: #3182ce;
    transform: scale(1.1);
    /* Affiche un cercle blanc uniquement pour l'étape sélectionnée */
    border: 4px solid #ffffff;
    /* Anneau bleu subtil en plus de l'ombre pour une meilleure lisibilité */
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.25), 0 6px 20px rgba(49, 130, 206, 0.4);
}

.etape-item.active .etape-number {
    color: #3182ce;
    font-weight: 800;
}

.etape-item.active .etape-title {
    color: #3182ce;
    font-weight: 600;
}

/* Effets de hover */
.etape-item:hover::before {
    background-color: #3182ce;
}

.etape-item:hover::after {
    background-color: #3182ce;
}

.etape-item:hover .etape-icon {
    background-color: #3182ce;
    transform: scale(1.05);
}

.etape-item:hover .etape-number {
    color: #3182ce;
}

.etape-item:hover .etape-title {
    color: #2d3748;
}

/* Containers étapes et pratiques */
.etape-container {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: #f0f9ff;
    border-left: 4px solid var(--color-etape);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.pratique-container {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: #fdf7ff;
    border-left: 4px solid var(--color-pratique);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

/* === SÉPARATEUR TIMELINE/CONTENU === */
.etape-separator {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #3b4a6b 50%, transparent 100%);
    margin: 2.5rem 0 0.1rem 0;  /* ← Espacement optimal : 40px dessus, 32px dessous */
}

/* =============================================================================
   07. FICHES-OUTILS - Système fiches-outils consolidé
   ============================================================================= */

/* === STYLES DE BASE FICHE-OUTIL === */
.fiche-outil-item,
.fiche-outil-niv2-item {
    display: flex;
    align-items: center;
    padding: var(--fiche-padding);
    margin-bottom: var(--fiche-margin);
    background: var(--fiche-bg);
    border: 1px solid var(--fiche-border-base);
    border-radius: var(--fiche-border-radius);
    cursor: grab;
    transition: var(--fiche-transition);
    user-select: none;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    color: var(--fiche-text-color);
    font-weight: 500;
}

/* === VARIANTES SPÉCIFIQUES === */
.fiche-outil-item {
    border-left: 4px solid var(--fiche-niv1-border);
}

.fiche-outil-niv2-item {
    border-left: 4px solid var(--fiche-niv2-border);
}

/* === CONTENU DES FICHES === */
.fiche-outil-item span,
.fiche-outil-niv2-item span {
    color: var(--fiche-text-color);
}

/* === ICÔNES === */
.fiche-outil-item .fa-grip-vertical,
.fiche-outil-niv2-item .fa-grip-vertical {
    color: var(--fiche-icon-color);
    font-size: 1rem;
    margin-right: 0.75rem;
    opacity: 0.8;
    transition: var(--fiche-transition);
    display: inline-block;
}

.fiche-outil-item .fas,
.fiche-outil-item i:not(.fa-grip-vertical),
.fiche-outil-niv2-item .fas,
.fiche-outil-niv2-item i:not(.fa-grip-vertical) {
    color: var(--fiche-icon-color);
    margin-right: 8px;
    font-size: 1em;
    transition: color 0.2s;
}

/* === ÉTATS INTERACTIFS === */
.fiche-outil-item:hover {
    background-color: var(--fiche-niv1-bg-hover);
    border-color: var(--fiche-niv1-border-hover);
    transform: translateY(-1px);
    box-shadow: var(--fiche-shadow-hover);
}

.fiche-outil-item:hover .fa-grip-vertical {
    opacity: 1;
    color: var(--fiche-niv1-border) !important;
}

.fiche-outil-item:hover .fas,
.fiche-outil-item:hover i:not(.fa-grip-vertical) {
    color: var(--fiche-niv1-border);
}

.fiche-outil-niv2-item:hover {
    background-color: var(--fiche-niv2-bg-hover);
    border-color: var(--fiche-niv2-border-hover);
    transform: translateY(-1px);
    box-shadow: var(--fiche-shadow-hover);
}

.fiche-outil-niv2-item:hover .fa-grip-vertical {
    opacity: 1;
    color: var(--fiche-niv2-border) !important;
}

.fiche-outil-niv2-item:hover .fas,
.fiche-outil-niv2-item:hover i:not(.fa-grip-vertical) {
    color: var(--fiche-niv2-border);
}

/* === ÉTATS FOCUS ET ACTIVE === */
.fiche-outil-item:focus,
.fiche-outil-niv2-item:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
    z-index: 1;
}

.fiche-outil-item:active,
.fiche-outil-niv2-item:active {
    cursor: grabbing;
    transform: scale(0.99);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === ÉTAT SÉLECTIONNÉ === */
.fiche-outil-item.selected,
.fiche-outil-niv2-item.selected {
    background: #e7f5ff;
    border-left-color: #0a58ca;
    color: #0a58ca;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.fiche-outil-item.selected::after,
.fiche-outil-niv2-item.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #0a58ca;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.fiche-outil-item.selected .fas,
.fiche-outil-item.selected i,
.fiche-outil-niv2-item.selected .fas,
.fiche-outil-niv2-item.selected i {
    color: currentColor;
}

/* === ÉTAT DRAGGING === */
.fiche-outil-item.dragging,
.fiche-outil-niv2-item.dragging {
    opacity: 0.7;
    background: #e7f5ff;
    border: 2px dashed var(--fiche-niv1-border);
    transform: scale(1.01) rotate(-1deg);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
    z-index: 10;
}

.fiche-outil-item.dragging i,
.fiche-outil-niv2-item.dragging i {
    color: currentColor;
}

/* === LISTES ET CONTAINERS === */
.fiche-outil-list,
.fiche-outil-niv2-list {
    background: var(--fiche-bg);
    border: 1px solid var(--fiche-border-base);
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05);
}

.fiche-outil-list h6,
.fiche-outil-niv2-list h6 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.fiche-outil-list .small,
.fiche-outil-niv2-list .small {
    color: #495057;
    margin-bottom: 1rem;
    display: block;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Headers améliorés */
.fiche-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.fiche-list-header h6 {
    margin: 0;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fiche-list-header .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* === SCROLLBARS PERSONNALISÉES === */
.fiche-outil-list::-webkit-scrollbar,
.fiche-outil-niv2-list::-webkit-scrollbar {
    width: 8px;
}

.fiche-outil-list::-webkit-scrollbar-track,
.fiche-outil-niv2-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.fiche-outil-list::-webkit-scrollbar-thumb,
.fiche-outil-niv2-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.fiche-outil-list::-webkit-scrollbar-thumb:hover,
.fiche-outil-niv2-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* === CONTEXTES SPÉCIFIQUES === */
#pratique-fiche-outil-container .fiche-outil-item,
#pratique-fiche-outil-niv2-container .fiche-outil-niv2-item {
    padding: 10px 12px;
    margin: 5px 0;
}

#pratique-fiche-outil-container .fiche-outil-item::before,
#pratique-fiche-outil-niv2-container .fiche-outil-niv2-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #007bff;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
}

#pratique-fiche-outil-container .fiche-outil-item:hover::before,
#pratique-fiche-outil-niv2-container .fiche-outil-niv2-item:hover::before {
    transform: translateX(0);
}

#pratique-fiche-outil-container .fiche-outil-item.dragging,
#pratique-fiche-outil-niv2-container .fiche-outil-niv2-item.dragging {
    opacity: 0.5;
    background-color: #e9ecef;
}

#pratique-fiche-outil-container .fiche-outil-item.dragging i,
#pratique-fiche-outil-niv2-container .fiche-outil-niv2-item.dragging i {
    color: white;
}

/* === FICHES SÉLECTIONNÉES / BADGES === */
.selected-fiches-list {
    background-color: #495057;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.selected-fiches-list p {
    color: white;
    margin-bottom: 10px;
    font-weight: 500;
}

.selected-fiches-list .badge {
    font-size: 0.875rem;
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease-in-out;
}

.selected-fiches-list .badge.bg-primary {
    background-color: #0d6efd !important;
    color: white;
}

.selected-fiches-list .badge .fa-times,
.selected-fiches-list .badge .remove-badge {
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.selected-fiches-list .badge .fa-times:hover,
.selected-fiches-list .badge .remove-badge:hover {
    opacity: 1;
}

.selected-fiches-list .badge .badge-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-fiches-list .text-muted {
    font-style: italic;
    color: #6c757d !important;
}

/* Animation d'apparition */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Style d'affichage final */
.fiche-outil {
    padding: var(--spacing-sm, 0.5rem);
    margin-bottom: var(--spacing-sm, 0.5rem);
    background: var(--light-color, #f8f9fa);
    border-left: 3px solid var(--color-fiche, #be185d);
    border-radius: 0 var(--border-radius, 0.5rem) var(--border-radius, 0.5rem) 0;
}

#selected-fiches-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

/* =============================================================================
   07B. FICHES-OUTILS VISUALISATION FRONT - Affichage public des fiches
   ============================================================================= */

/* === PAGE HEADER === */
.fiche-outil-show .page-header {
    margin-bottom: 2rem;
}

.fiche-outil-show .page-header img {
    max-height: 50px;
    margin-bottom: 1rem;
}

.fiche-outil-show .page-header .date {
    text-align: right;
    color: #666;
    font-size: 0.9rem;
}

/* === TITRE PRINCIPAL === */
.fiche-outil-show .page-title {
    color: #0051A4;
    text-transform: uppercase;
    font-size: 2rem;
}

/* === Fond blanc pour fiche standard (niveau 1) — contenu uniquement === */
.fiche-outil-show .fiche-standard-panel {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
}

/* Réduire l'espace entre le breadcrumb et le panneau sur les pages fiche-outil */
.fiche-outil-show nav[aria-label="breadcrumb"] {
    margin-bottom: 0 !important;
}

/* === CONTENEUR QUESTION/RÉPONSE === */
.fiche-outil-show .question-answer-container {
    margin-bottom: 2rem;
}

/* === SECTION QUESTION === */
.fiche-outil-show .question-box {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    position: relative;
}

.fiche-outil-show .question-icon {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    margin-right: -50px;
}

.fiche-outil-show .question-content {
    flex-grow: 1;
    font-size: 1.1rem;
    color: #333;
    padding: 1rem;
    border: 2px solid #dc3545;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

/* === SECTION RÉPONSE === */
.fiche-outil-show .answer-box {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    position: relative;
}

.fiche-outil-show .answer-content {
    flex-grow: 1;
    font-size: 1.1rem;
    color: #333;
    padding: 1rem;
    border: 2px solid #dc3545;
    border-radius: 8px;
    position: relative;
    z-index: 2;
}

.fiche-outil-show .answer-icon {
    width: 120px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    margin-left: -50px;
}

/* === SECTIONS INFORMATIONS === */
.fiche-outil-show .info-section {
    margin-top: 2rem;
}

.fiche-outil-show .info-title {
    color: #333;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.fiche-outil-show .info-content {
    color: #333;
    font-size: 1rem;
}

.fiche-outil-show .info-link {
    color: #0051A4;
    text-decoration: underline;
    word-break: break-all;
}

/* === FICHES NIVEAU 2 - STYLES SPÉCIFIQUES === */
.fiche-content {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #333;
}

.fiche-description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #555;
    font-style: italic;
}

.associated-fiches {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.associated-fiches-title {
    color: #0051A4;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.fiche-link {
    display: block;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    color: #333;
    border-left: 4px solid #0051A4;
    transition: all 0.2s ease;
}

.fiche-link:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.fiche-link i {
    color: #0051A4;
    margin-right: 0.5rem;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #0051A4;
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* =============================================================================
   08. ÉDITEURS - TinyMCE ET ÉDITEURS SPÉCIALISÉS CONSOLIDÉS
   Tous les styles d'éditeurs dans une section unifiée et optimisée
   ============================================================================= */

/* =============================================================================
   VARIABLES SPÉCIFIQUES ÉDITEURS (à ajouter dans :root si pas déjà présent)
   ============================================================================= */


/* =============================================================================
   CONTENEURS D'ÉDITEURS
   ============================================================================= */

/* Conteneur principal d'édition avec sidebar */
.editor-container {
    /* Par défaut: flex pour compat globale; les pages qui veulent une grille ajoutent un modificateur */
    display: flex;
    gap: 20px;
    height: 85vh;
    min-height: 750px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Wrapper d'éditeur flexible */
.editor-wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 550px !important;
    box-sizing: border-box;
}

/* Container TinyMCE générique */
.tinymce-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: var(--editor-min-height-large);
    box-sizing: border-box;
}

/* Conteneurs spécialisés */
.editor-wrapper .tinymce-container,
.editor-container .tinymce-container {
    flex: 1 1 0%;
    min-height: 0; /* autorise la contraction pour égaler la hauteur de la sidebar */
    overflow: hidden; /* évite les débordements internes */
}

/* Conteneur fiches associées */
.fiches-container {
    display: flex;
    flex-direction: column;
    min-width: 300px;
    max-width: 400px;
}

/* =============================================================================
   ÉDITEURS TINYMCE - STYLES DE BASE
   ============================================================================= */

/* Éditeurs TinyMCE principaux */
.tox.tox-tinymce,
.tox-tinymce,
#tinymce-content-editor {
    display: block;
    width: 100% !important;
    min-height: var(--editor-min-height);
    border: var(--editor-border);
    border-radius: var(--editor-border-radius) !important;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    transition: var(--editor-transition);
    box-sizing: border-box;
}

/* Éditeurs dans conteneurs spécialisés */
.editor-container .tox.tox-tinymce,
.editor-wrapper .tox.tox-tinymce {
    min-height: var(--editor-min-height-large);
    flex-grow: 1;
    height: 100%;
    margin-bottom: 0;
}

/* Éditeurs dans formulaires */
.form-section .tox.tox-tinymce,
.card-body .tox.tox-tinymce {
    min-height: var(--editor-min-height-large);
}

/* Zone d'édition */
.tox-edit-area {
    flex: 1;
    min-height: inherit;
    box-sizing: border-box;
}

.tox-edit-area__iframe {
    height: 100% !important;
    position: relative !important;
    border: none;
    box-sizing: border-box;
}

/* Classe utilitaire pour éditeurs */
.tinymce-editor {
    min-height: var(--editor-min-height-large) !important;
    box-sizing: border-box;
}

.editor-container .tinymce-editor,
.editor-wrapper .tinymce-editor {
    min-height: var(--editor-min-height-xl) !important;
    flex-grow: 1 !important;
}

/* =============================================================================
   ÉTATS INTERACTIFS - DRAG & DROP
   ============================================================================= */

/* État de drag & drop sur éditeurs */
.tox-tinymce.drag-over,
#tinymce-content-editor.drag-over {
    background: var(--editor-drag-bg) !important;
    border: var(--editor-drag-border) !important;
    box-shadow: var(--editor-drag-shadow);
    transform: translateY(2px);
}

/* Animation de transition */
.tox-tinymce,
#tinymce-content-editor {
    transition: var(--editor-transition);
}

.tox-tinymce:hover {
    box-shadow: var(--shadow-sm);
}

/* =============================================================================
   CONTENU ÉDITEUR - ÉLÉMENTS SPÉCIALISÉS
   ============================================================================= */

/* Placeholders de fiches dans le contenu */
.mce-content-body .mceNonEditable.pratique-fiche-placeholder {
    background: #e3f2fd;
    border: 1px dashed #2196f3;
    border-radius: 3px;
    padding: 2px 6px;
    margin: 0 2px;
    display: inline-block;
    color: #1976d2;
    font-family: var(--font-family);
    font-size: 0.9em;
    cursor: default;
    user-select: none;
    transition: var(--transition-colors);
}

.mce-content-body .mceNonEditable.pratique-fiche-placeholder:hover {
    background: #bbdefb;
    border-color: #1976d2;
}

/* =============================================================================
   HEADERS ET SECTIONS D'ÉDITEUR
   ============================================================================= */

/* Header d'éditeur */
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    box-sizing: border-box;
}

.editor-header h6 {
    color: #495057;
    margin: 0;
    font-weight: 600;
}

/* Section fiches associées */
.fiches-associees-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
}

.fiches-associees-section h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

/* =============================================================================
   FALLBACK - TEXTAREA DE SECOURS
   ============================================================================= */

/* TextArea de fallback quand TinyMCE n'est pas disponible */
.tinymce-container textarea,
.editor-container textarea,
.editor-wrapper textarea {
    min-height: var(--editor-min-height-large) !important;
    border: var(--editor-border) !important;
    border-radius: var(--editor-border-radius) !important;
    padding: var(--editor-padding);
    font-family: var(--font-family);
    font-size: var(--editor-font-size);
    line-height: var(--editor-line-height);
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
    transition: var(--editor-transition);
}

.editor-container textarea,
.editor-wrapper textarea {
    min-height: var(--editor-min-height-xl) !important;
    flex-grow: 1 !important;
}

/* États des textareas */
.tinymce-container textarea:focus,
.editor-container textarea:focus,
.editor-wrapper textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* =============================================================================
   INDICATEURS ET UTILITAIRES
   ============================================================================= */

/* Indicateur de sauvegarde */
.saving-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: var(--z-toast);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    transition: var(--transition-all);
}

.saving-indicator.show {
    display: flex;
    animation: slideInUp 0.3s ease;
}

.saving-indicator i {
    animation: spin 1s linear infinite;
    font-size: 1.1rem;
}

/* Upload d'icônes */
.icon-upload-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-sizing: border-box;
}

#icon-preview img,
.current-icon img {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: var(--transition-transform);
}

#icon-preview img:hover,
.current-icon img:hover {
    transform: scale(1.05);
}

.current-icon {
    margin-bottom: 1rem;
}

.current-icon img {
    max-width: 100px;
    max-height: 100px;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.4;
    margin-top: 0.25rem;
}

.form-text i {
    color: var(--info-color);
    margin-right: 0.5rem;
}

/* =============================================================================
   RESPONSIVE - ÉDITEURS
   ============================================================================= */

/* Très grands écrans */
@media (max-width: 1400px) {
    .editor-container {
        height: 75vh;
        min-height: 600px;
    }

    .fiches-container {
        min-width: 280px;
        max-width: 320px;
    }
}

/* Grands écrans */
@media (max-width: 1200px) {
    .editor-container {
        flex-direction: column;
        height: auto;
        min-height: 500px;
    }

    .fiches-container {
        min-width: 100%;
        max-width: 100%;
        flex-direction: row;
        height: 250px;
        gap: 20px;
    }

    .fiches-associees-section {
        flex: 1;
        min-height: 200px;
    }

    .editor-wrapper {
        min-height: 400px;
    }
}

/* Tablettes */
@media (max-width: 768px) {
    .editor-container {
        padding: 10px;
        gap: 15px;
        min-height: 400px;
    }

    .editor-wrapper {
        min-height: 350px;
    }

    .fiches-container {
        height: 200px;
    }

    .tox.tox-tinymce,
    .tox-tinymce,
    tinymce-editor,
    #tinymce-content-editor {
        min-height: 300px;
    }

    .editor-header {
        padding: 8px 12px;
    }

    .fiches-associees-section {
        padding: 12px;
    }

    .etape-separator {
        display: none;  /* ← Masquer le séparateur sur mobile/tablette */
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .editor-container {
        padding: 5px;
        gap: 10px;
    }

    .editor-wrapper {
        min-height: 300px;
    }

    .fiches-container {
        flex-direction: column;
        height: auto;
    }

    .fiches-associees-section {
        height: 150px;
    }

    .saving-indicator {
        bottom: 10px;
        right: 10px;
        padding: 12px 16px;
    }
}

/* =============================================================================
   ANIMATIONS SPÉCIFIQUES
   ============================================================================= */

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================================================
   NOTES POUR DÉVELOPPEURS
   ============================================================================= */

/*
MIGRATION ET OPTIMISATIONS :

CONSOLIDÉ DEPUIS :
- Section 02 (styles d'éditeur dispersés)
- Section 08 (styles TinyMCE existants)
- Variables éditeur dans :root

AMÉLIORATIONS :
- Variables unifiées pour tous les éditeurs
- Responsive design optimisé
- États interactifs améliorés
- Fallback textarea robuste
- Animations fluides
- Box-sizing uniforme

UTILISATION :
- Remplacer la section 08 par ce code
- Supprimer les styles d'éditeur dispersés en section 02
- Vérifier que les variables sont présentes dans :root
- Tester sur toutes les tailles d'écran
*/




/* =============================================================================
   09. PAGES SPÉCIFIQUES - Page accueil, Pages parcours, Accordéons
   ============================================================================= */

/* ===== PAGE D'ACCUEIL ===== */
.hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>') repeat;
    opacity: 0.1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.2);
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 300;
}

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #3498db;
}

.parcours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.parcours-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}

.parcours-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.parcours-card:hover .parcours-logo i {
    transform: scale(1.1);
}

.parcours-logo {
    height: 200px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: visible;
    width: auto;
    max-width: 100%;
    max-height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.parcours-logo:hover {
    transform: scale(1.05);
}

.parcours-logo i {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.parcours-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: scale-down;
    transition: transform 0.3s ease;
}

.parcours-logo-placeholder {
    width: 150px;
    height: 150px;
    background-color: #e9ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}

.parcours-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.parcours-title {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
}

.parcours-description {
    color: #666;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    flex-grow: 1;
}

.parcours-footer {
    padding: 1rem 1.75rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.parcours-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.parcours-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parcours-stat i {
    color: #3498db;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
}

.status-badge.online {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.offline {
    background: rgba(149, 165, 166, 0.15);
    color: #7f8c8d;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
}

.section-header h2 {
    margin: 0;
    font-size: 2rem;
    color: #2c3e50;
}

/* ===== PAGES PARCOURS ===== */
.parcours-content {
    margin-top: 2rem;
    padding: 2rem;
}

.parcours-illustration {
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.illustration-left,
.illustration-right {
    flex: 0 0 auto;
}

.illustration-title {
    flex: 1;
    padding: 0 2rem;
}

.parcours-illustration img {
    max-width: 100%;
    height: auto;
}

.illustration-left img,
.illustration-right img {
    max-height: 400px;
}

.guide-subtitle {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
    color: #3b4a6b;
    line-height: 1.3;
}

.guide-subtitle br + span {
    font-size: 1.5rem;
}

/* Images spécifiques */
.doctor-patient-image {
    width: 100%;
    /* Utiliser un ratio pour éviter une image trop étroite ou trop tronquée */
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 16px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: url("../images/medecin_homme_patiente_femme.jpeg");
    background-size: cover; /* conserve un rendu plein cadre */
    background-position: center; /* centre l'image pour limiter la sensation de rognage */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Liste des pathologies */
.pathology-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-family: 'cabin-semibold', sans-serif;
}

.pathology-list h3 {
    color: #3b4b6b;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-family: 'cabin-semibold', sans-serif;
    border-bottom: 2px solid #3b4b6b;
    padding-bottom: 10px;
    font-weight: bold;
}

.pathology-item {
    margin-bottom: 10px;
    padding: 12px 0;
    position: relative;
}

.pathology-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: repeating-linear-gradient(
            to right,
            #0670B8,
            #0670B8 2px,
            transparent 2px,
            transparent 4px
    );
}

.pathology-item:last-child {
    border-bottom: none;
}

.pathology-item a {
    color: #0060A1;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    padding: 8px 0;
}

.pathology-item a:hover {
    color: #003366;
    transform: translateX(5px);
}

.pathology-item i {
    margin-right: 10px;
    color: #0060A1;
    transition: all 0.2s ease;
}

.pathology-item a:hover i {
    color: #003366;
}

.parcours-connect-text {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
    margin-top: 20px;
    text-align: center;
}

/* ===== ACCORDÉONS ET INTERACTIONS ===== */
.accordion-item {
    margin-bottom: 0.75rem;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#rubriquesAccordion > .accordion-item {
    border-left: 4px solid var(--primary-color)
}

.accordion-button {
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color)
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    z-index: 3;
}

.accordion .accordion {
    margin-top: 0.75rem;
    margin-left: 1.5rem;
}

.accordion-collapse {
    transition: all 0.3s ease-in-out;
}

[id^="accordionPratique"] > .accordion-item {
    border-left: 4px solid #4e73df;
}

[id^="accordionEtape"] > .accordion-item {
    border-left: 4px solid #36b9cc;
}

.accordion .accordion .accordion {
    margin-left: 2rem;
    margin-top: 0.5rem;
}

[id^="accordionFicheNiv2"] > .accordion-item {
    border-left: 4px solid #1cc88a;
}

.accordion .accordion .accordion .accordion {
    margin-left: 2.5rem;
    margin-top: 0.5rem;
}

[id^="accordionFicheOutil"] > .accordion-item {
    border-left: 4px solid #f6c23e;
}

/* Utilitaires spécialisés */
.moretype-medium-font {
    font-family: 'moretype-medium';
    font-size: 2.5rem;
    font-weight: 600;
}

.moretype-regular-font {
    font-family: 'moretype-regular';
    font-size: 1.5rem;
    font-weight: 400;
}

.status-toggle {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border-width: 2px;
}

.status-toggle:hover {
    transform: translateY(-1px);
}

.status-pill {
    border-radius: 30px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.status-online {
    background-color: #1cc88a;
    color: white;
}

.status-offline {
    background-color: #858796;
    color: white;
}

.page-actions {
    display: flex;
    gap: 0.5rem;
}

.niveau-1 { background-color: #4e73df; }
.niveau-2 { background-color: #36b9cc; }
.niveau-3 { background-color: #1cc88a; }
.niveau-4 { background-color: #f6c23e; }

.selected-fiches-list .badge i:hover {
    opacity: 1;
    color: #ffc107;
}

#selected-fiches-niv2-display .badge {
    background-color: #28a745 !important;
}

/* Footer - Réduction de la taille du bandeau */
footer {
    margin-bottom: 0;
}

/* Optimisation du contenu du footer */
footer .text-muted {
    margin-bottom: 0 !important;
    font-size: 0.875rem;
    line-height: 1.3;
}

/* =============================================================================
   10. RESPONSIVE - Media queries consolidées
   ============================================================================= */

/* Très grands écrans (jusqu'à 1400px) */
@media (max-width: 1400px) {
    .editor-container {
        height: 75vh;
        min-height: 600px;
    }

    .fiches-container {
        width: 320px;
    }
}

/* Grands écrans (jusqu'à 1200px) */
@media (max-width: 1200px) {
    .etape-item {
        max-width: 180px;
        margin: 0 8px;
    }

    .etape-title {
        max-width: 160px;
        width: 160px;
        font-size: 0.9rem;
    }

    .etape-number {
        font-size: 2.2rem;
    }

    .editor-container {
        flex-direction: column;
        height: auto;
    }

    .fiches-container {
        width: 100%;
        flex-direction: row;
        height: 250px;
    }
}

/* ===== FORMULAIRE DE CONTACT ===== */
.contact-container {
    max-width: 100%;
    padding: 2rem;
}

.contact-header h2 {
    color: var(--color-primary, #3b4a6b);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.contact-description {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1.1rem;
}

.contact-form .form-group label {
    font-weight: 600;
    color: var(--color-primary, #3b4a6b);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 1rem;
}

.contact-form .form-control {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    font-family: inherit;
}

.contact-form .form-control:focus {
    border-color: var(--color-secondary, #0066cc);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    outline: none;
}

.contact-form textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.contact-form .btn-primary {
    background-color: var(--color-secondary, #0066cc);
    border-color: var(--color-secondary, #0066cc);
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.contact-form .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.form-submit {
    text-align: center;
    margin-top: 1.5rem;
}

.contact-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e1e5e9;
}

.contact-info h3 {
    color: var(--color-primary, #3b4a6b);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-details {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-secondary, #0066cc);
}

.contact-item {
    margin-bottom: 1rem;
    color: #666;
    font-size: 1rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item strong {
    color: var(--color-primary, #3b4a6b);
    font-weight: 600;
}

.contact-item a {
    color: var(--color-secondary, #0066cc);
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Styles pour les messages flash */
.alert {
    border-radius: 8px;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: none;
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
    border-left: 4px solid #0066cc;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Styles pour les erreurs de validation */
.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.contact-form .form-control.is-invalid {
    border-color: #dc3545;
}

.contact-form .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Champ honeypot caché */
.contact-form input[name="contact[website]"] {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .contact-container {
        padding: 1rem;
    }

    .contact-header h2 {
        font-size: 1.5rem;
    }

    .contact-form .btn-primary {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .contact-details {
        padding: 1rem;
    }

    .contact-form .form-control {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

/* ===== BOUTON CONTACT PAGE D'ACCUEIL ===== */
.contact-button-container {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
}


.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--color-secondary, #0066cc) 0%, #0056b3 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.contact-button:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    text-decoration: none;
}

.contact-button i {
    font-size: 1.2rem;
}

.contact-subtitle {
    margin-top: 0.75rem;
    color: #666;
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 0;
}

/* Responsive pour le bouton contact */
@media (max-width: 768px) {
    .contact-button-container {
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .contact-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        gap: 0.5rem;
    }

    .contact-button i {
        font-size: 1.1rem;
    }

    .contact-subtitle {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .contact-button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
}

/* Tablettes (jusqu'à 992px) */
/* Écrans moyens-larges avec textes longs (jusqu'à 1300px) */
@media (max-width: 1300px) {
    .public-menu {
        padding: 0 10px;
        height: auto;
        min-height: 60px;
    }
}

/* Styles pour le contenu principal conservés */
@media (max-width: 480px) {

    .doctor-patient-image {
        height: 350px;
    }

    .etape-timeline-container {
        padding: 120px 15px;
    }

    .etape-timeline {
        padding: 0 20px;
    }

    .etape-timeline-line {
        left: 20px;
        right: 20px;
    }

    .etape-item {
        margin: 0 5px;
        max-width: 150px;
    }

    .etape-item::after {
        height: 80px;
    }

    .etape-item:nth-child(odd) .etape-icon {
        margin-bottom: 80px;
    }

    .etape-item:nth-child(even) .etape-icon {
        margin-top: 80px;
    }

    .etape-item:nth-child(odd) .etape-number {
        margin-bottom: 25px;
    }

    .etape-item:nth-child(odd) .etape-title {
        margin-bottom: 30px;
    }

    .etape-item:nth-child(even) .etape-number {
        margin-top: 25px;
    }

    .etape-item:nth-child(even) .etape-title {
        margin-top: 30px;
    }

    .etape-number {
        font-size: 2rem;
        margin-right: 12px;
    }

    .etape-title {
        font-size: 0.85rem;
        max-width: 180px;
        width: 180px;
        margin-left: 12px;
    }

    .etape-icon {
        width: 60px;
        height: 60px;
        margin-left: -30px;
    }

    .etape-icon i {
        font-size: 1.5rem;
    }

    .etape-icon img,
    .etape-icon .etape-icon-image {
        width: 30px;
        height: 30px;
    }
}

/* Ancienne limite tablettes (jusqu'à 991px) */
@media (max-width: 991px) {
    .header-banner {
        padding: var(--spacing-sm) var(--spacing-sm);
    }
}

/* Mobiles (jusqu'à 768px) */
@media (max-width: 768px) {
    .navigation-buttons {
        top: 10px;
        right: 10px;
        gap: 10px;
    }

    .nav-button {
        width: 35px;
        height: 35px;
    }

    .nav-button img {
        width: 18px;
        height: 18px;
    }

    .header-banner .logo-container {
        position: relative;
        left: 0;
        text-align: left;
        margin-bottom: 0;
    }

    .header-banner h1 {
        font-size: 1.5rem;
    }

    /* Styles du menu mobile déjà définis dans la section @media (max-width: 768px) précédente */

    .doctor-patient-image {
        height: 250px;
    }

    .pathology-list h3 {
        font-size: 1.2rem;
    }

    .pathology-item a {
        font-size: 1rem;
    }

    /* TIMELINE MOBILE - Version verticale */
    .container {
        display: flex;
        flex-direction: column;
    }

    .etape-timeline-container {
        order: 2;
        padding: 40px 10px;
    }

    .etape-content-container {
        order: 1;
    }

    .etape-timeline {
        flex-direction: column;
        gap: 100px;
        padding: 0;
        align-items: stretch;
        justify-content: flex-start;
    }

    .etape-timeline-line {
        width: 4px;
        height: 100%;
        left: 35px;
        right: auto;
        top: 0;
        bottom: 0;
        transform: none;
    }

    .etape-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        max-width: 100%;
        padding-left: 0px;
        padding-right: 15px;
        margin: 0;
        position: relative;
        width: 100%;
        min-height: 80px;
    }

    .etape-item::before {
        left: 35px;
        top: 50%;
        transform: translate(-50%, -50%);
        position: absolute;
    }

    .etape-item::after {
        display: none !important;
    }

    .etape-icon {
        position: absolute !important;
        left: 0px;
        top: 50%;
        margin-top: -35px !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
        width: 70px;
        height: 70px;
        z-index: 10;
    }

    .etape-item a {
        text-decoration: none;
        position: relative;
        width: 100%;
        display: block;
        padding-left: 90px;
    }

    .etape-item .etape-number,
    .etape-item .etape-title {
        position: static !important;
        transform: none !important;
        margin: 0 !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        display: inline-block;
        vertical-align: middle;
    }

    .etape-number {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-right: 15px !important;
    }

    .etape-title {
        font-size: 0.9rem;
        line-height: 1.3;
        display: inline-block;
        vertical-align: middle;
    }

    /* Admin - Fiche Outil Niv2 Edit: Éditeur et liste (mobile adaptations below) */
    .editor-container.editor-two-cols {
        display: grid;
        grid-template-columns: minmax(280px, 1fr) 3fr; /* ~25% liste / 75% éditeur */
        gap: 1.25rem;
        align-items: start;
        overflow: visible;
    }
    .fiche-outil-list { overflow: visible; }
    #fiche-outil-container {
        max-height: 70vh; /* évite l'effet tronqué */
        overflow: auto;
    }
    .editor-wrapper { width: 100%; min-width: 0; }
    .editor-wrapper .tox { width: 100% !important; max-width: 100% !important; }
    .editor-wrapper .tox .tox-edit-area__iframe { width: 100% !important; }

    /* Tablet large */
    @media (max-width: 1200px) {
        .editor-container.editor-two-cols { grid-template-columns: minmax(260px, 1fr) 3fr; }
    }

    /* Tablet portrait and below: stack columns, remove max-height constraint */
    @media (max-width: 992px) {
        .editor-container.editor-two-cols { grid-template-columns: 1fr; }
        #fiche-outil-container { max-height: none; }
    }

    .etape-icon i {
        font-size: 1.8rem;
    }

    .etape-icon img,
    .etape-icon .etape-icon-image {
        width: 55px;
        height: 55px;
    }

    /* Grille responsive */
    .grid {
        grid-template-columns: repeat(var(--grid-columns, 12), 1fr);
    }

    .grid-col-1 { grid-column: span 1; }
    .grid-col-2 { grid-column: span 2; }
    .grid-col-3 { grid-column: span 3; }
    .grid-col-4 { grid-column: span 4; }
    .grid-col-5 { grid-column: span 5; }
    .grid-col-6 { grid-column: span 6; }
    .grid-col-7 { grid-column: span 7; }
    .grid-col-8 { grid-column: span 8; }
    .grid-col-9 { grid-column: span 9; }
    .grid-col-10 { grid-column: span 10; }
    .grid-col-11 { grid-column: span 11; }
    .grid-col-12 { grid-column: span 12; }

    .btn {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .btn-lg {
        font-size: 1.1rem;
        padding: 0.6rem 1.2rem;
    }

    .btn-group > .btn:not(:first-child) {
        margin-left: 0;
        margin-top: -1px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: var(--border-radius);
    }

    .btn-group > .btn:not(:last-child) {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        border-top-right-radius: var(--border-radius);
    }
}

/* Très petits écrans (jusqu'à 480px) */
@media (max-width: 480px) {
    .etape-timeline {
        gap: 90px;
    }

    .etape-item {
        min-height: 70px;
        padding-left: 80px;
    }

    .etape-timeline-line {
        left: 30px;
    }

    .etape-item::before {
        left: 30px;
    }

    .etape-icon {
        left: -5px;
        margin-top: -30px;
        width: 60px;
        height: 60px;
    }

    .etape-icon i {
        font-size: 1.5rem;
    }

    .etape-icon img,
    .etape-icon .etape-icon-image {
        width: 48px;
        height: 48px;
    }

    .etape-number {
        font-size: 1.6rem;
    }

    .etape-title {
        font-size: 0.85rem;
    }

    .parcours-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .fiche-outil-list, .fiche-outil-niv2-list {
        max-height: 200px;
    }
}

/* Grands écrans (à partir de 992px) */
@media (min-width: 992px) {
    /* Home: ajuster les hauteurs pour éviter la scrollbar globale */
    .doctor-patient-image { aspect-ratio: 16 / 8; }
    .main-content.home-layout > .right-sidebar { max-height: 72vh; overflow: auto; }
    .main-content.home-layout > .contact-button-container { margin-top: 0.75rem; }

    /* Home: largeur contenue du conteneur principal sur desktop */
    .main-content.home-layout {
        width: 90%;
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Grille responsive (à partir de 768px) */
@media (min-width: 768px) {
    .grid {
        grid-template-columns: repeat(var(--grid-columns, 12), 1fr);
    }
}

/* Animation globale */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

/* ===============================================================================
   FORMULAIRES D'ADMINISTRATION - UPLOAD D'IMAGES
   Styles pour l'upload d'images d'icônes dans les fiches outil
   =============================================================================== */

/* === CONTENEUR D'UPLOAD === */
.image-upload-container {
    position: relative;
}

/* === CHAMP D'UPLOAD === */
.image-upload {
    transition: border-color 0.3s ease;
}

.image-upload:hover {
    border-color: #0d6efd;
}

.image-upload:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* === ZONE DE PRÉVISUALISATION === */
.image-preview {
    position: relative;
    min-height: 120px;
}

.image-preview img {
    border-radius: 8px;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* === PLACEHOLDER DE PRÉVISUALISATION === */
.preview-placeholder {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.preview-placeholder:hover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

.preview-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.image-upload-container:hover .preview-placeholder {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

/* === ANIMATIONS === */
.image-preview img:not(.d-none) {
    animation: fadeInImage 0.3s ease-in;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .image-preview {
        min-height: 100px;
    }

    .preview-placeholder {
        padding: 1rem !important;
    }

    .preview-placeholder i {
        font-size: 1.5rem;
    }
}

/* ===============================================================================
   FIN DU FICHIER CSS RÉORGANISÉ
   =============================================================================== */
