/**
 * Styles globaux de l'application Extranet V2.
 *
 * Ce fichier centralise les styles CSS fondamentaux appliqués à l'ensemble de l'application.
 * Il inclut la typographie de base, les styles des éléments HTML génériques (body, a, li),
 * les classes utilitaires (hidden, center, spinner), les styles des boutons,
 * les styles pour les modales et dialogues, les notifications, les barres de progression,
 * les surcharges pour CKEditor, les styles des barres de défilement,
 * et les styles globaux pour la bibliothèque FullCalendar.
 */

/* ==========================================================================
   1. Styles globaux de base
   ========================================================================== */

@import url("https://fonts.googleapis.com/css?family=Raleway:400,700");

html,
body {
    height: 100%;
}

body {
    font-family: Raleway, sans-serif;
    color: #333;
    /* Police de caractères principale */
    background:
        linear-gradient(
            45deg,
            #bebdc708 10%,
            transparent 10%,
            transparent 90%,
            #bebdc708 90%
        ),
        linear-gradient(
            135deg,
            transparent 40%,
            #bebdc706 40%,
            #bebdc706 60%,
            transparent 0
        ),
        linear-gradient(
            45deg,
            transparent 40%,
            #bebdc704 40%,
            #bebdc704 60%,
            transparent 0
        );
    background-size: 3em 3em;
    opacity: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    max-width: 100vw;
}

@media (max-width: 50rem) {

    /* 800px */
    body {
        font-size: 0.8em;
    }
}

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

li,
ol {
    /* ol ajouté pour la cohérence */
    list-style: none;
}

a {
    text-decoration: none;
    color: rgba(25, 143, 130, 0.68);
}

.hidden {
    display: none !important;
}

main {
    /* Ajouté depuis header.css */
    flex-basis: 80%;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

[class^="main"] h1 {
    /* Ajouté depuis header.css */
    text-align: center;
    margin: 0.25em 0 0.5em 0;
}

/* ==========================================================================
   2. Styles des boutons
   ========================================================================== */

.btn {
    width: fit-content;
    cursor: pointer;
    border: none;
    background-color: #00000000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 0.3125rem;
    padding: 0.5em 1em;
    gap: 0.5em;
    font-size: 80%;
}

a.btn {
    font-size: 80%;
}

.btn-primary {
    background-color: #0b70b6 !important;
    color: #ffffff !important;
    border-radius: 0.3125rem;
}

.btn-primary:hover {
    background-color: #0056b3 !important;
}

.btn-primary svg,
.btn-primary i,
.btn-primary span {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.btn-success {
    background-color: #2aaf52 !important;
    color: #ffffff !important;
    border-radius: 0.3125rem;
}

.btn-success:hover {
    background-color: #218838 !important;
}

.btn-success svg,
.btn-success i,
.btn-success span {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.btn-secondary {
    background-color: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.btn-secondary:hover {
    background-color: #f9fafb !important;
    border-color: #9ca3af !important;
    color: var(--vente-primary, #0b70b6) !important;
}

.btn-danger {
    background-color: #e22b37 !important;
    color: #ffffff !important;
    border-radius: 0.3125rem;
}

.btn-danger:hover {
    background-color: #b31a26 !important;
}

.btn-danger svg,
.btn-danger i,
.btn-danger span {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.btn-info {
    background-color: #0ea5e9 !important;
    color: #ffffff !important;
    border-radius: 0.3125rem;
}

.btn-info:hover {
    background-color: #0284c7 !important;
}

.btn-info svg,
.btn-info i,
.btn-info span {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.btn-warning {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border: 1px solid #d97706 !important;
}

.btn-warning:hover {
    background-color: #d97706 !important;
    color: #ffffff !important;
    border-color: #b45309 !important;
}

.btn-warning svg,
.btn-warning i {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    border: none !important;
    padding: 0.4rem !important;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s ease;
    width: 38px;
    height: 38px;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: var(--vente-primary, #107c10);
}

.btn-icon-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    border: none !important;
    padding: 0.4rem !important;
    border-radius: 6px;
    cursor: pointer;
    color: #e22b37;
    transition: all 0.15s ease;
    width: 38px;
    height: 38px;
}

.btn-icon-danger:hover {
    background-color: rgba(226, 43, 55, 0.1) !important;
    transform: scale(1.05);
}

.btn-icon svg {
    width: 1.25em;
    height: 1.25em;
}

.btn-toggle {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    /* 10px 20px */
    margin-right: 0.625rem;
    /* 10px */
    text-decoration: none;
    color: #333;
    background-color: #f0f0f000;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
    /* 4px */
    transition: background-color 0.3s ease;
}

.btnSupprimer {
    background-color: red !important;
    border: 1px solid #333;
    height: min-content;
    color: #efefef !important;
    font-weight: bold;
    padding: 1vw;
    border-radius: 0.3125rem;
    /* 5px */
    cursor: pointer;
    transition: 0.3s;
}

.btnAjouter {
    background-color: #2aaf52 !important;
    border: 1px solid #333;
    color: #efefef !important;
    border-radius: 0.3125rem;
    /* 5px */
    cursor: pointer;
    transition: 0.3s;
}

/* ==========================================================================
   3. Styles spécifiques à Fancybox
   ========================================================================== */

.fancybox__container * {
    color: var(--f-button-color);
}

a[data-fancybox] iframe {
    pointer-events: none;
}

/* ==========================================================================
   4. Styles des modales et dialogues universels (utilisés par modal_controller)
   ========================================================================== */

/* Verrouillage du scroll quand une modale est ouverte */
body.modal-open {
    overflow: hidden !important;
}

/* Backdrop / Fond sombre avec flou */
.modal-backdrop-custom,
.renaming-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.modal-backdrop-custom.is-active,
.renaming-modal-backdrop.is-active {
    display: block;
    opacity: 1;
}

/* Boîte de dialogue centrée et moderne */
.modal-dialog-custom,
.renaming-modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow: hidden;
    display: none;
    flex-direction: column;
    transition: transform 0.2s ease-in-out;
}

.modal-dialog-custom.modal-dialog-large,
.renaming-modal-dialog.modal-dialog-large {
    max-width: 860px;
}

.modal-dialog-custom.is-active,
.renaming-modal-dialog.is-active {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
}

/* En-tête */
.modal-header-custom,
.renaming-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header-custom h4,
.renaming-modal-header h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Bouton de fermeture d'en-tête */
.modal-close-btn,
.renaming-modal-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s;
}

.modal-close-btn:hover,
.renaming-modal-close-btn:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

/* Corps */
.modal-body-custom,
.renaming-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
}

/* Pied de page */
.modal-footer-custom,
.renaming-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

/* Modale de confirmation unifiée */
.confirmation-modal {
    max-width: 520px;
    z-index: 10001;
}

.confirmation-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.confirmation-icon-danger {
    background: #fee2e2;
    color: #ef4444;
}

.confirmation-icon-info {
    background: #e0f2fe;
    color: #0284c7;
}

.confirmation-icon-success {
    background: #dcfce7;
    color: #16a34a;
}

.confirmation-message {
    font-size: 1rem;
    color: #1e293b;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.confirmation-warning-box {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 0.5rem;
}

.confirmation-warning-box.warning-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.confirmation-warning-box.warning-info {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}

.confirmation-warning-box.warning-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.confirmation-warning-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Rétrocompatibilité avec les anciennes modales flottantes */
.modal {
    position: fixed;
    z-index: 1040;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-visible {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    position: absolute;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    width: auto;
    max-width: fit-content;
    display: flex;
    flex-direction: column;
    z-index: 50;
    pointer-events: auto;
    border: 1px solid #e2e8f0;
}

.modal-header {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0.3125rem;
    color: #64748b;
    cursor: pointer;
    background: none;
    border: none;
}

.modal-close:hover {
    color: #0f172a;
}

.modal-content {
    position: relative;
    flex-grow: 1;
    max-height: 90dvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-error {
    flex-shrink: 0;
    color: #ef4444;
    font-size: 0.9em;
}

/* Styles pour l'élément <dialog> HTML5 */
body:has(dialog[data-dialog-target="dialog"][open]) {
    overflow: hidden;
}

dialog {
    position: fixed;
    border-radius: 0.625rem;
    border: none;
    width: fit-content;
    max-width: 90dvw;
    height: fit-content;
    max-height: 85dvh;
    z-index: 1000;
    padding: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Dialogue en arrière-plan lorsqu'un dialogue supérieur est ouvert */
dialog.dialog-behind {
    filter: brightness(0.8) blur(1px);
    pointer-events: none;
    transition: filter 0.2s ease-in-out;
}

/* Media queries pour les tailles de dialogue sur petits écrans */
@media (max-width: 80rem) and (pointer: coarse) {

    /* 1280px */
    .dialog-size--small {
        min-height: 25dvh;
    }

    .dialog-size--medium {
        min-height: 40dvh;
    }

    .dialog-size--large {
        min-height: 60dvh;
    }

    .dialog-size--xlarge {
        min-height: 75dvh;
    }
}

/* Réinitialisation des transitions et animations pour les inputs dans les dialogues */
dialog input,
dialog textarea {
    transition: none !important;
    animation: none !important;
}

/* Styles pour le contenu interne des dialogues */
dialog turbo-frame,
.dialog {
    display: flex;
    flex-direction: column;
    gap: 1em;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 1.25em;
}

.dialog h2 {
    text-align: center;
}

/* Styles pour les dialogues ouverts */
dialog[data-dialog-target="dialog"][open] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
}

dialog[data-dialog-target="dialog"][open] .confirmation {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1em;
}

dialog[data-dialog-target="dialog"][open] p {
    text-align: center;
    line-height: 2em;
    color: #333333;
}

/* Animations d'entrée et de sortie pour les dialogues */
@keyframes fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

dialog[data-dialog-target="dialog"][open],
dialog[open] {
    animation: fade-in 200ms forwards;
}

dialog[data-dialog-target="dialog"][closing],
dialog[closing] {
    animation: fade-out 200ms forwards;
}

/* En-tête spécifique pour les dialogues */
.dialog_header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   Boîte de dialogue de confirmation universelle (HTML5 dialog)
   ========================================================================== */
dialog.confirmation-dialog,
dialog.confirmation-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

dialog.confirmation-dialog[open],
dialog.confirmation-modal[open] {
    display: flex;
}

.confirmation-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    gap: 0.85rem;
}

.confirmation-dialog-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.confirmation-dialog-title-group span[data-dialog-target="confirmationIcon"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.confirmation-dialog-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}

.confirmation-dialog-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.confirmation-dialog-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.confirmation-dialog-body {
    padding: 1.25rem;
    color: #334155;
    line-height: 1.5;
    max-height: 70vh;
    overflow-y: auto;
}

.confirmation-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.confirmation-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}

.confirmation-icon-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.confirmation-icon-info {
    background-color: #e0f2fe;
    color: #0284c7;
}

.confirmation-icon-success {
    background-color: #dcfce7;
    color: #16a34a;
}

.confirmation-icon-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.confirmation-message {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.confirmation-warning-box {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.45;
    margin-top: 0.75rem;
}

.confirmation-warning-box.warning-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.confirmation-warning-box.warning-info {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}

.confirmation-warning-box.warning-success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.confirmation-warning-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Styles pour les listes dans les dialogues */
.dialog ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
}

.dialog ul li {
    display: flex;
    width: calc(100% / 3);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dialog ul li a {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
}

.dialog h4 {
    text-align: center;
    overflow: hidden;
}

/* ==========================================================================
   5. Classes utilitaires générales (Flexbox, Gaps, Margins)
   ==========================================================================/* Spacing & Flex Helpers */
.flex {
    display: flex;
    align-items: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* Compatibilité utilitaires d'affichage et d'alignement (CSS Pur) */
.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.d-block {
    display: block;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

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

.align-items-center {
    align-items: center;
}

.align-items-start {
    align-items: flex-start;
}

.align-items-end {
    align-items: flex-end;
}

.justify-content-between {
    justify-content: space-between;
}

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

.justify-content-end {
    justify-content: flex-end;
}

.justify-content-start {
    justify-content: flex-start;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 1rem;
}

.w-full {
    width: 100%;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-wrap {
    display: flex;
    flex-wrap: wrap;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.p-0 {
    padding: 0 !important;
}

.p-1 {
    padding: 0.25rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.text-bold {
    font-weight: bold !important;
}

.text-muted {
    color: #6c757d !important;
}

.center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 75%;
}

/* ==========================================================================
   6. Badge de notification
   ========================================================================== */

.position-relative {
    position: relative !important;
}

.notification-badge {
    position: absolute;
    top: -0.3125rem;
    /* -5px */
    right: -0.3125rem;
    /* -5px */
    background-color: #d9534f;
    color: white;
    border-radius: 50%;
    padding: 0.125rem 0.3125rem;
    /* 2px 5px */
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 1.2em;
    text-align: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* --- Astérisque rouge visible pour tous les champs obligatoires --- */
label.required:not(input + label):not(.form-check-label)::after {
    content: " *";
    color: #dc2626 !important;
    font-weight: 900;
    font-size: 1.15em;
    margin-left: 0.2rem;
    display: inline-block;
}

/* ==========================================================================
   6.5. Notifications globales (utilisées par notification_controller)
   ========================================================================== */

#notifications-wrapper {
    position: fixed;
    top: 1.25rem;
    /* 20px */
    right: 1.25rem;
    /* 20px */
    width: 100%;
    max-width: 18.75rem;
    /* 300px */
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.625rem;
    /* 10px */
}

.notification-container {
    width: 100%;
    color: #ffffff;
    border-radius: 0.375rem;
    /* 6px */
    padding: 1rem 1.25rem;
    /* 16px 20px */
    box-shadow: 0 0.3125rem 0.9375rem rgba(0, 0, 0, 0.2);
    /* 5px 15px */
    display: flex;
    align-items: flex-start;
    opacity: 1;
    transition:
        opacity 0.4s ease-in-out,
        transform 0.4s ease-in-out;
}

.notification-container.notification-success {
    background-color: #28a745;
}

.notification-container.notification-danger {
    background-color: #dc3545;
}

.notification-container.notification-warning {
    background-color: #ffc107;
    color: #333;
}

.notification-container.notification-warning .notification-close-button {
    color: rgba(0, 0, 0, 0.5);
}

.notification-container.notification-warning .notification-close-button:hover {
    color: rgba(0, 0, 0, 0.8);
}

.notification-container.notification-info {
    background-color: #17a2b8;
}

.notification-content {
    flex-grow: 1;
    margin-right: 0.9375rem;
    /* 15px */
}

.notification-message {
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    color: #ffffff;
}

.notification-container.notification-warning .notification-message {
    color: #333;
}

.notification-close-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.8rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    margin-top: -0.1875rem;
    /* -3px */
    transition: color 0.2s ease-in-out;
}

.notification-close-button:hover {
    color: #ffffff;
}

.notification-container.notification-warning .notification-close-button:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Animations pour les notifications */
.notification-enter-from,
.notification-leave-to {
    opacity: 0;
    transform: translateY(-1.25rem);
    /* -20px */
}

.notification-enter-to,
.notification-leave-from {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   7. Messages flash basiques
   ========================================================================== */

.alert {
    padding: 0.625rem;
    /* 10px */
    color: white;
    margin-bottom: 0.9375rem;
    /* 15px */
    border-radius: 0.625rem;
    /* 10px */
}

.alert-danger {
    background-color: #f44336;
}

.alert-success {
    background-color: #4caf50;
}

/* ==========================================================================
   8. Barres de progression
   ========================================================================== */

.progress-container {
    width: 100%;
    background-color: #f3f3f3;
    border-radius: 1.5625rem;
    /* 25px */
    margin-top: 0.625rem;
    /* 10px */
    height: 1.25rem !important;
    /* 20px */
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #4caf50;
    border-radius: 1.5625rem;
    /* 25px */
    text-align: center;
    line-height: 1.25rem;
    /* 20px */
    color: white;
}

/* ==========================================================================
   9. Styles des inputs et focus
   ========================================================================== */

/* Suppression de l'effet de focus par défaut */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
    box-shadow: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #0b70b6;
}

/* ==========================================================================
   10. Styles pour CKEditor
   ========================================================================== */

.ckeditor-content * {
    display: revert;
    color: revert;
    letter-spacing: revert;
    margin: revert;
    padding: revert;
    box-sizing: revert;
}

.ckeditor-content p,
.ckeditor-content ol,
.ckeditor-content ul,
.ckeditor-content li,
.ckeditor-content h1,
.ckeditor-content h2,
.ckeditor-content h3,
.ckeditor-content h4,
.ckeditor-content h5,
.ckeditor-content h6 {
    padding: 0;
    margin-bottom: 0;
}

.ckeditor-content img {
    max-width: 100%;
}

.ckeditor-content ol {
    padding-left: 2.5em;
    list-style-type: decimal;
}

.ckeditor-content ul {
    padding-left: 2.5em;
    list-style-type: disc;
}

.ckeditor-content ol li,
.ckeditor-content ul li {
    margin-bottom: 0.5em;
    list-style-type: inherit;
}

/* ==========================================================================
   11. Styles des barres de défilement (scrollbars)
   ========================================================================== */

::-webkit-scrollbar {
    width: 0.375rem;
    /* 6px */
    height: 0.75rem;
    /* 6px */
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.1875rem;
    /* 3px */
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Pour Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Pour IE et Edge */
body {
    -ms-overflow-style: -ms-autohiding-scrollbar;
}

/* ==========================================================================
   12. Styles globaux pour FullCalendar
   ========================================================================== */

/* Style de base pour la vue active du calendrier, largeur par défaut de planningPointages */

.fc-icon-chevron-left::before,
.fc-icon-chevron-right::before {
    color: #efefef !important;
}

.fc-button-primary {
    background-color: #0b70b6 !important;
}

.fc-button-primary:hover {
    background-color: #0056b3 !important;
}

.fc-event-title {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fc-daygrid-day-events:before,
.fc-daygrid-day-events:after {
    content: none !important;
}

.fc-event-main {
    color: #333 !important;
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media screen and (max-width: 31.25rem) {

    /* 500px */
    .fc-datagrid-cell {
        width: fit-content;
    }

    .fc-daygrid-week-number {
        display: none;
    }

    .fc-button {
        font-size: 0.8em !important;
    }

    .fc-scrollgrid-sync-inner {
        font-size: 80% !important;
    }

    .fc-scrollgrid-sync-inner .fc-icon,
    .fc-scrollgrid-sync-inner .fc-datagrid-expander-placeholder {
        display: none;
    }

    .fc-toolbar-title {
        font-size: 1.3em !important;
    }

    .fc-event-title {
        font-size: 1.1em;
    }
}

/* ==========================================================================
   13. Styles pour les aperçus de fichiers
   ========================================================================== */

.file-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin-top: 1em;
}

.file-preview-item {
    position: relative;
    border: 1px solid #eee;
    border-radius: 0.3125rem;
    /* 5px */
    overflow: hidden;
}

/* Taille par défaut pour les vidéos (grande) */
.file-preview-item.file-type-video {
    width: calc(50% - 0.25em);
    height: 9.375rem;
}

.file-preview-item.file-type-video img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Taille réduite pour les images et PDF */
.file-preview-item.file-type-image,
.file-preview-item.file-type-pdf {
    width: 9.375rem;
    /* Équivalent à 150px avec une base de 16px */
    height: 9.375rem;
    /* Équivalent à 150px avec une base de 16px */
}

.file-preview-item.file-type-image img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.file-preview-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.file-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Assure que le contenu remplit l'espace */
    display: block;
}

/* Styles pour les cartes d'aperçu PDF dans les commentaires */
.pdf-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.pdf-card-box {
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.pdf-card-link:hover .pdf-card-box {
    background: #ffffff;
    border-color: #0b70b6;
    box-shadow: inset 0 0 0 1px #0b70b6, 0 2px 8px rgba(11, 112, 182, 0.15);
}

.pdf-card-icon {
    width: 36px;
    height: 36px;
    color: #e22b37;
    margin-bottom: 4px;
}

.pdf-card-name {
    font-size: 0.72rem;
    color: #333;
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    margin-bottom: 2px;
}

.pdf-card-action {
    font-size: 0.68rem;
    color: #0b70b6;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Layout Responsive Height Management
   ========================================================================== */
main.layout-with-bandeau.layout-mobile [class^="main"] {
    height: calc(75dvh - 60px);
}
main.layout-with-bandeau.layout-mobile .index_container {
    height: calc(100dvh - 15dvh - 60px) !important;
}
main.layout-with-bandeau.layout-desktop [class^="main"] {
    height: calc(77dvh);
}

main.layout-without-bandeau.layout-mobile [class^="main"] {
    width: 100%;
    height: calc(100dvh - 62px);
    overflow: auto;
}
main.layout-without-bandeau.layout-mobile .index_container {
    width: 100%;
    height: calc(100dvh - 62px);
    overflow: auto;
}
main.layout-without-bandeau.layout-desktop [class^="main"] {
    height: 100dvh;
}
main.layout-without-bandeau.layout-desktop .index_container {
    height: 100dvh;
}

/* Role Assignment Manager (Admin) */
.role-manager-container {
    display: flex;
    flex-direction: column;
    height: 70vh;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.role-manager-header,
.role-manager-footer {
    padding: 1rem;
    flex-shrink: 0;
    background-color: #f8f9fa;
}

.role-manager-footer {
    text-align: right;
    border-top: 1px solid #ddd;
}

.user-list-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.user-row {
    display: block;
    padding: 0 0.75rem;
    margin-bottom: 5px;
    border-radius: 4px;
    border: 1px solid #eee;
    transition: background-color 0.2s;
}

.user-row:hover {
    background-color: #f1f1f1;
}

.user-row-checked {
    background-color: #e0f2f1 !important;
    border-color: #b2dfdb;
}

.user-row div {
    display: flex;
}

.user-row label {
    width: 100%;
    cursor: pointer;
    padding: 0.5rem;
}