html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    div.dialog {
        width: 100%;
    }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

/* Masque les éléments Vue avant le montage de l'app (anti-FOUC).
   !important indispensable : les utilitaires Tailwind (.flex, .grid…) sont injectés
   après cette feuille et gagneraient la cascade à spécificité égale. */
[v-cloak] {
    display: none !important;
}


#altcha-fpwd .altcha {
    margin-top: 20px;
    max-width: 100%;
}

:root {
    --altcha-color-text: #023662;
}

.login-dialog {
    background-color: white;
    position: relative;
}

.login-dialog-back {
    position: absolute;
    top: 0px;
    left: 0px;
    padding: 20px;
    color: #FFF;
}

.close-dialog {
    cursor: pointer;
}

.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid grey;
    width: 50%;
    min-height: 175px;
    max-height: 400px;
    max-width: 600px;
    background-color: #fff;
    z-index: 100;
    box-sizing: border-box;
    overflow-y: scroll;
}

.dialog-overlay {
    display: block;
    position: fixed;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, .25);
    z-index: 50;
}

.table-grid th {
    cursor: default;
}

    .table-grid th.sortable::after {
        width: 20px;
        height: 20px;
        display: inline-block;
        content: "";
        background-size: 20px 20px;
        background-image: url(../assets/images/sort.svg);
        background-repeat: no-repeat;
        margin-left: 10px;
    }

    .table-grid th.sortable.asc::after {
        background-image: url(../assets/images/sort-up.svg);
    }

    .table-grid th.sortable.desc::after {
        background-image: url(../assets/images/sort-down.svg);
    }

    .table-grid th.sortable {
        cursor: pointer;
    }

.table-grid td span {
    cursor: pointer;
}

.tox .tox-promotion, .tox .tox-statusbar__right-container {
    display: none !important;
}

.container {
    max-width: none !important;
}

#lastSaveInfo {
    padding: 4px 10px;
}

.success {
    border: 2px solid #0C0;
    border-radius: 10px;
    background: #AFA;
}


.fade-out-success {
    transition: background 1s ease, border 1s ease;
    border: 2px solid #FFF;
    border-radius: 10px;
    background: transparent;
}

.custom-glow {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    background-color: rgba(255, 255, 255, 0.5);
    padding:4px 12px;
    border-radius:12px;
}


.appBg {
    background-image: url(../assets/bg4.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#abonnement {
    position: absolute;
    right: 0px;
    top: 0px;
    z-index: 10;
    font-size: 12px;
    padding: 2px 8px;
}

.mandatory{
    color:#C00;
}



#cgvContainer h1 {
    font-weight: bold;
    text-transform: uppercase;
}

#cgvContainer h2 {
    font-weight: bold;
    text-decoration: underline;
}

#cgvContainer h3 {
    text-decoration: underline;
}

/* BCP Plus - Dossier workspace */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prose h1 { font-size: 1.5rem; font-weight: bold; margin-bottom: 0.5rem; color: #023662; }
.prose h2 { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.5rem; color: #00749d; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.prose p { margin-bottom: 0.5rem; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.prose ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.5rem; text-align: left; }
.prose th { background-color: #023662; color: white; }

/* Upload drag zone animation */
.upload-zone-active {
    border-color: #0678B7 !important;
    background-color: rgba(6, 120, 183, 0.05) !important;
}

/* Drag & drop : le réordonnancement est géré 100% en JS (onMouseDown/mousemove + ghost cloné),
   PAS via le drag natif HTML5. On force donc -webkit-user-drag:none : sinon la carte devient un
   élément nativement "draggable" et un mousedown-glissé DANS un champ (édition du titre/résumé)
   déclenche le drag de la pièce au lieu de déplacer le caret / sélectionner le texte. */
.piece-draggable,
.piece-draggable * {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}

/* Input rang inline - masquer les spinners natifs */
.rank-input::-webkit-outer-spin-button,
.rank-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.rank-input[type=number] {
    -moz-appearance: textfield;
}

/* Highlight temporaire après split */
.piece-highlight {
    animation: splitHighlight 5s ease-out forwards;
}

@keyframes splitHighlight {
    0%   { background-color: #d1fae5; border-color: #10b981; box-shadow: 0 0 12px rgba(16, 185, 129, 0.3); }
    70%  { background-color: #d1fae5; border-color: #10b981; box-shadow: 0 0 12px rgba(16, 185, 129, 0.3); }
    100% { background-color: #ffffff; border-color: transparent; box-shadow: none; }
}

/* Piece card hover */
.piece-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Paulo loading spinner */
.paulo-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}