/* --- CORRECTIF POLICE "Alex Brush" (Signature) --- */
/* On déclare la police ici pour forcer dom-to-image à la voir */
@font-face {
    font-family: 'Alex Brush';
    font-style: normal;
    font-weight: 400;
    src: url(https://fonts.gstatic.com/s/alexbrush/v22/RZZlgtRCcnA8zwwyUqESKEABQA.woff2) format('woff2');
}

/* Classe utilitaire pour appliquer la police */
.font-signature {
    font-family: 'Alex Brush', cursive;
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.timeline-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    z-index: 0;
}

/* --- SYSTÈME DE THÈMES --- */

/* 1. Base (Variables par défaut pour éviter les erreurs) */
:root {
    --theme-50: #f1f5f9;
    --theme-100: #dbeafe;
    --theme-600: #2563eb;
    --theme-700: #1d4ed8;
}

/* 2. Thème LSMD (Bleu - Explicite) */
body.theme-lsmd {
    --theme-50: #f1f5f9;
    --theme-100: #dbeafe;
    --theme-600: #2563eb;
    /* Bleu Royal */
    --theme-700: #1d4ed8;
}

/* 3. Thème BCMD (Rouge) */
body.theme-bcmd {
    --theme-50: #fef2f2;
    /* Rouge très pâle */
    --theme-100: #fee2e2;
    --theme-600: #dc2626;
    /* Rouge Vif */
    --theme-700: #b91c1c;
}

/* 4. Thème Patient (Neutre / Mix) */
body.theme-patient {
    --theme-50: #f8fafc;
    --theme-100: #f1f5f9;
    /* Les couleurs 600/700 sont gérées par les overrides plus bas */
}

/* 5. Thème STAFF (Violet - À ajouter) */
body.theme-staff {
    --theme-50: #faf5ff;
    /* Violet très pâle */
    --theme-100: #f3e8ff;
    --theme-600: #7e22ce;
    /* Violet */
    --theme-700: #6b21a8;
}

/* --- OVERRIDES SPÉCIFIQUES POUR LE MIX PATIENT --- */

/* Fond Dégradé pour les boutons et headers */
body.theme-patient .bg-theme-600 {
    background: linear-gradient(135deg, #3b82f6 0%, #ef4444 100%) !important;
    border: none;
}

/* Texte Dégradé pour les titres et icônes */
body.theme-patient .text-theme-600,
body.theme-patient .group-hover\:text-theme-600:hover {
    background: -webkit-linear-gradient(135deg, #3b82f6, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Bordures : On utilise un bleu neutre ou un dégradé simulé par border-image */
body.theme-patient .border-theme-600 {
    border-color: #64748b !important;
    /* Slate-500 neutre */
}

/* Focus ring pour les formulaires */
body.theme-patient input:focus,
body.theme-patient select:focus,
body.theme-patient textarea:focus {
    --tw-ring-color: #94a3b8;
    /* Gris neutre */
    border-color: #94a3b8;
}

/* Ajustements BCMD (Rouge) pour les bordures et textes */
body.theme-bcmd .border-theme-600 {
    border-color: #dc2626 !important;
}

body.theme-bcmd .text-theme-600 {
    color: #dc2626 !important;
    background: none;
    -webkit-text-fill-color: initial;
}

body.theme-bcmd .bg-theme-600 {
    background-color: #dc2626 !important;
    background: none;
}

/* Kanban */
.kanban-col {
    min-height: 500px;
    transition: background-color 0.2s;
    padding-bottom: 40px;
}

.kanban-col.drag-over {
    background-color: #e2e8f0;
    border: 2px dashed #94a3b8;
}

.vehicle-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    cursor: grab;
    display: flex;
    flex-direction: column;
}

.vehicle-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.service-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.svc-lsmd {
    background-color: #2563eb;
}

.svc-bcmd {
    background-color: #dc2626;
}

.clean-plate {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #1e293b;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 800;
    font-size: 16px;
    text-align: center;
    padding: 6px 0;
    letter-spacing: 2px;
    margin: 8px 0;
}

/* A4 Preview */
.preview-container {
    background-color: #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    overflow-y: auto;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

#paper-preview {
    width: 100%;
    max-width: 210mm;
    aspect-ratio: 210/297;
    background: white;
    padding: 5% 8%;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', serif;
    color: #000;
    position: relative;
    font-size: clamp(10px, 1.2vw, 14px);
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4%;
    padding-bottom: 2%;
    border-bottom: 3px solid #333;
}

.doc-logo {
    font-size: 2.5em;
}

.doc-lsmd .doc-header {
    border-color: #2563eb;
    color: #2563eb;
}

.doc-bcmd .doc-header {
    border-color: #dc2626;
    color: #dc2626;
}

.doc-title {
    text-align: center;
    font-weight: bold;
    font-size: 1.8em;
    margin: 6% 0;
    text-transform: uppercase;
    text-decoration: underline;
}

.doc-signature {
    margin-top: 10%;
    text-align: right;
    position: relative;
    height: 100px;
}

.sig-font {
    font-family: 'Alex Brush', cursive;
    font-size: 2.5em;
    transform: rotate(-5deg);
    display: inline-block;
    margin-right: 20px;
}

.doc-stamp {
    position: absolute;
    bottom: 0;
    right: 10px;
    border: 3px solid #333;
    color: #333;
    opacity: 0.3;
    padding: 0.3em 0.6em;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(-15deg);
    font-family: sans-serif;
    font-size: 1.2em;
}

.doc-lsmd .doc-stamp {
    border-color: #2563eb;
    color: #2563eb;
}

.doc-bcmd .doc-stamp {
    border-color: #dc2626;
    color: #dc2626;
}

/* STYLE SPÉCIFIQUE GÉNÉRATEUR DOCUMENT */
.paper-preview {
    background: white;
    width: 100%;
    max-width: 210mm;
    aspect-ratio: 210/297;
    /* Ratio A4 */
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', serif;
    color: #000;
    position: relative;
    font-size: 14px;
    overflow: hidden;
}

.doc-logo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.doc-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.doc-info-header {
    text-align: right;
    font-size: 0.9em;
    line-height: 1.4;
}

.doc-title-main {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin: 30px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.doc-body-text {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
}

.doc-med-list {
    list-style-type: disc;
    padding-left: 40px;
    margin-top: 10px;
    font-weight: 500;
}

.doc-med-list li {
    margin-bottom: 5px;
}

.doc-signature-zone {
    position: absolute;
    bottom: 50px;
    right: 50px;
    text-align: right;
    width: 300px;
}

.doc-signature-font {
    font-family: 'Alex Brush', cursive;
    font-size: 2.5em;
    transform: rotate(-10deg);
    display: block;
    margin-top: 10px;
    color: #000;
}

.doc-tampon {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 120px;
    opacity: 0.8;
    transform: rotate(-15deg);
    mix-blend-mode: multiply;
}

/* Conteneur de la miniature (Plus petit et sans fond gris) */
/* Conteneur plus petit (240px de haut au lieu de 300px) */
.doc-thumbnail-container {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
}

.doc-thumbnail-container:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.15));
    /* Ombre plus marquée au survol */
}

/* Feuille encore plus réduite (Zoom 0.22) pour tenir dans des petites colonnes */
.doc-thumbnail-paper {
    width: 210mm;
    height: 297mm;
    background: white;
    padding: 40px;
    position: absolute;
    top: 0;
    left: 50%;
    transform-origin: top center;
    transform: translateX(-50%) scale(0.22);
    /* <--- C'est ici qu'on réduit la taille */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* Overlay au survol (Bouton Voir) */
.doc-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 41, 59, 0.0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.doc-thumbnail-container:hover .doc-overlay {
    background: rgba(30, 41, 59, 0.3);
}

.doc-btn-view {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
}

.doc-thumbnail-container:hover .doc-btn-view {
    opacity: 1;
    transform: translateY(0);
}



/* --- NOUVEAUX STYLES BOUTONS RDV --- */
.btn-slot {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    /* Dégradé Émeraude */
    color: white;
    font-size: 0.75rem;
    /* 12px */
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Espace entre date et icône */
    gap: 8px;
    width: fit-content;
    /* S'adapte au texte au lieu de prendre 100% */
    min-width: 150px;
    /* Largeur minimale pour garder une uniformité */
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(16, 185, 129, 0.4);
    filter: brightness(1.05);
}

.btn-slot:active {
    transform: translateY(0);
}

.btn-refuse-modern {
    background: white;
    border: 1px solid #fee2e2;
    color: #ef4444;
    font-size: 0.70rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 100%;
}

.btn-refuse-modern:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

/* Ajoutez ceci dans la balise <style> de index.php */
.slot-card {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.slot-card:hover {
    border-color: var(--theme-600);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.slot-number {
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.group:hover .slot-number {
    background: var(--theme-100);
    color: var(--theme-600);
}

/* Badges */
.badge-base {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    /* gap-1.5 */
    padding: 0.25rem 0.625rem;
    /* py-1 px-2.5 */
    border-radius: 9999px;
    /* rounded-full */
    font-size: 0.75rem;
    /* text-xs */
    font-weight: 700;
    /* font-bold */
    border-width: 1px;
}

.badge-pending {
    /* Hérite des styles de base ci-dessus si tu ajoutes la classe .badge-base en HTML, 
            sinon copie les propriétés ici */
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border-width: 1px;

    background-color: #fffbeb;
    /* bg-amber-50 */
    color: #d97706;
    /* text-amber-600 */
    border-color: #fef3c7;
    /* border-amber-100 */
}

.badge-confirmed {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border-width: 1px;

    background-color: #ecfdf5;
    /* bg-emerald-50 */
    color: #059669;
    /* text-emerald-600 */
    border-color: #d1fae5;
    /* border-emerald-100 */
}

.badge-info {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border-width: 1px;

    background-color: #eff6ff;
    /* bg-blue-50 */
    color: #2563eb;
    /* text-blue-600 */
    border-color: #dbeafe;
    /* border-blue-100 */
}

.badge-refused {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border-width: 1px;

    background-color: #fff1f2;
    /* bg-rose-50 */
    color: #e11d48;
    /* text-rose-600 */
    border-color: #ffe4e6;
    /* border-rose-100 */
}


/* --- DESIGN MENU DÉROULANT PERSONNALISÉ (Custom Select) --- */

/* On cache le vrai select natif (mais on le garde pour le formulaire) */
.modern-select {
    display: none;
}

/* Le conteneur global */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

/* La boîte visible (Le bouton) */
.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

/* Flèche personnalisée */
.custom-select-trigger:after {
    content: '';
    width: 0.8em;
    height: 0.8em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.3s;
}

/* Quand le menu est ouvert */
.custom-select.open .custom-select-trigger {
    border-color: var(--theme-600);
    /* Rouge ou Bleu */
    box-shadow: 0 0 0 3px var(--theme-100);
}

.custom-select.open .custom-select-trigger:after {
    transform: rotate(180deg);
}

/* La liste déroulante (Popup) */
.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: 0;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 250px;
    overflow-y: auto;
}

/* Animation d'ouverture */
.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(5px);
    /* Petit décalage esthétique */
    border-top: 1px solid var(--theme-600);
    /* Petite ligne de couleur */
}

/* Les options individuelles */
.custom-option {
    padding: 10px 16px;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.1s;
}

/* --- C'EST ICI QUE LA MAGIE OPÈRE : LE SURVOL --- */
.custom-option:hover {
    background-color: var(--theme-600);
    /* Rouge BCMD ou Bleu LSMD */
    color: white;
    padding-left: 20px;
    /* Petit effet de glissement */
}

.custom-option.selected {
    background-color: var(--theme-50);
    font-weight: bold;
    color: var(--theme-700);
}

#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-height: 80vh;
    /* Limite la hauteur à 80% de l'écran */
    overflow-y: auto;
    /* Permet de scroller dans les notifs si trop nombreuses */
    display: flex;
    flex-direction: column-reverse;
    /* Les plus récentes en bas */
    z-index: 9999;
}

#notification-container div {
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Animation de pulsation lors de la validation */
@keyframes successPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    }

    100% {
        transform: scale(1);
    }
}

.training-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.training-card:hover:not(.validated) {
    transform: translateY(-2px);
    border-color: var(--theme-600);
}

.training-card.validated {
    animation: successPulse 0.4s ease-out;
    background-color: #f0fdf4;
    /* emerald-50 */
    border-color: #10b981;
    /* emerald-500 */
}

/* Style personnalisé pour les checkboxes */
.training-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.validated .training-checkbox {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}


aside {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer/Edge */
}

aside::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

/* S'assurer que le contenu peut scroller verticalement */
.aside-content {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.aside-content::-webkit-scrollbar {
    display: none;
}

.submenu-icon {
    transition: transform 0.3s ease;
}

    /* --- THÈME BCMD & VARIABLES --- */
:root {
    --primary-color: #e11d48; /* Rouge BCMD */
    --primary-hover: #be123c;
    --bg-dark: #14090b;       /* Fond très sombre */
    --bg-medium: #1c0e11;     /* Fond des cartes */
    --input-bg: #2a1216;      /* Fond des inputs */
    --text-light: #ffecef;
    --border-color: #5c1e24;
}

/* --- STRUCTURE GLOBALE (Mode Générateur) --- */
.doc-generator-container {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* --- COLONNE GAUCHE : FORMULAIRE --- */
.form-container {
    background-color: var(--bg-medium);
    border-radius: 16px;
    padding: 2rem;
    flex: 1 1 450px; /* Largeur min */
    max-width: 600px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    height: fit-content;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
    width: 100%;
}

/* Inputs BCMD Style */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    color: #eca7a7; /* Texte rose pâle */
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

/* --- COLONNE DROITE : APERÇU PAPIER --- */
.preview-container {
    flex: 1 1 600px;
    max-width: 800px; /* Largeur A4 approx */
    display: flex;
    justify-content: center;
}

#doc-preview {
    background-color: #ffffff !important; /* Papier blanc */
    color: #000000 !important;            /* Encre noire */
    border-radius: 2px;
    padding: 3rem;
    width: 100%;
    min-height: 900px; /* Hauteur A4 approx */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    position: relative;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
}

/* --- ÉLÉMENTS INTERNES DU DOCUMENT --- */
/* En-tête avec Logo et Infos */
.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.doc-header img.logo {
    width: 120px;
    height: auto;
}

.doc-header .infos {
    text-align: right;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

/* Titres du document */
.doc-title {
    text-align: center;
    font-weight: 800;
    font-size: 1.8rem;
    margin: 1.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Séparateur rouge dégradé */
.separator {
    border: none;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 1.5rem 0;
    opacity: 0.8;
}

/* Bloc Signature */
.signature-block {
    position: relative;
    margin-top: 4rem;
    height: 150px;
    page-break-inside: avoid;
}

.signature-info {
    text-align: right;
    font-size: 1.1rem;
    margin-right: 20px;
}

.signature-script {
    font-family: 'Alex Brush', cursive; /* Police signature */
    font-size: 2.5rem;
    position: absolute;
    bottom: 40px;
    right: 60px;
    transform: rotate(-10deg);
    color: #000;
    z-index: 2;
}

.tampon-img {
    position: absolute;
    bottom: 0;
    right: 20px;
    width: 160px;
    opacity: 0.8; /* Effet tampon encreur */
    z-index: 1;
    mix-blend-mode: multiply;
}

/* Tableaux internes aux documents */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.doc-table th, .doc-table td {
    border: 1px solid #444;
    padding: 8px 12px;
}

.doc-table th {
    background-color: #f3f3f3;
    font-weight: bold;
    text-align: center;
}

/* Boutons d'action */
.btn-action {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    margin-top: 1rem;
    transition: background 0.2s;
}

.btn-action:hover {
    background-color: var(--primary-hover);
}

/* Thèmes dynamiques pour le papier */
.theme-bcmd .doc-header {
    border-color: #e11d48;
}

.theme-bcmd .doc-header-logo {
    color: #e11d48;
}

.theme-lsmd .doc-header {
    border-color: #2563eb;
}

.theme-lsmd .doc-header-logo {
    color: #2563eb;
}