.adv-label-with-tip {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.adv-tip {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--process-color);
    color: #1f2d3d;
    font-size: .75rem;
    font-weight: bold;
    text-align: center;
    line-height: 18px;
    cursor: pointer;
    position: relative;
}

.adv-tip:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 24px;
    min-width: 240px;
    background: #1f2d3d;
    color: white;
    padding: .5rem .7rem;
    border-radius: 6px;
    font-size: .75rem;
    z-index: 30;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    white-space: normal;
}
/* Mise côte à côte des deux premières cartes */
.adv-two-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    align-items: stretch;
}

/* Réduction hauteur cartes */
.adv-two-cards-row .process-card-hp {
    padding: 0.8rem 1rem;
}

/* Réduction taille inputs dans ces deux cartes */
.adv-two-cards-row .adv-input {
    padding: 0.28rem 0.45rem;
    font-size: 0.80rem;
    min-height: 30px;
}

/* Textarea réduits */
.adv-two-cards-row .adv-textarea {
    min-height: 60px;
}

/* Responsive = repasse en colonne sur petits écrans */
@media (max-width: 1100px) {
    .adv-two-cards-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   CARTES DE RECLAMATIONS - STYLE ADV MODERNE
   ========================================================== */

/* ---- Carte principale ---- */
.adv-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
    border-left: 6px solid var(--card-color, #8DE1D1);
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    position: relative;
}

.adv-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px rgba(0,0,0,0.18);
}

/* ---- En-tête de la carte ---- */
.adv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Numéro et client */
.adv-card-id {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2d3d;
}

.adv-card-client {
    font-size: .85rem;
    color: #5b6975;
}

/* ---- BADGES ---- */
.adv-badge {
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .70rem;
    font-weight: 600;
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
}

/* Processus (couleur = bordure gauche) */
.adv-badge-process {
    background: rgba(0,0,0,0.05);
    color: #1f2d3d;
    border: 1px solid var(--card-color, #8DE1D1);
}

/* En cours */
.adv-badge-status-open {
    background: #8DE1D140;
    color: #18675d;
    border: 1px solid #8DE1D1;
}

/* Clôturée */
.adv-badge-status-closed {
    background: #cccccc40;
    color: #444;
    border: 1px solid #999;
}

/* ---- Groupe de badges ---- */
..adv-card-badges {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;      /* Permet le retour à la ligne */
    justify-content: flex-end; /* Alignement propre à droite */
    max-width: 100%; 
}


/* ---- Description (extrat limité à 2 lignes) ---- */
.adv-card-desc {
    font-size: .82rem;
    color: #2b2f3a;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;     
    -webkit-box-orient: vertical;
}

/* ---- Meta (dates, pilote, origine) ---- */
.adv-card-meta {
    font-size: .75rem;
    color: #5b6975;
    line-height: 1.35;
}

/* ---- Bouton Ouvrir ---- */
.adv-card-btn-modif {
    margin-top: auto;
    background: var(--card-color, #8DE1D1);
    color: #1f2d3d;
    padding: .45rem .8rem;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: .15s ease;
}

.adv-card-btn-modif:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* ---- GRID ---- */
.adv-cards-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* ---- RWD ---- */
@media (max-width: 600px) {
    .adv-card {
        padding: 1rem;
    }
}

/* Badge Processus — couleur dynamique via --card-color */
.adv-badge-process {
    background: var(--card-color, #D3D3D3);
    color: #1f2d3d;
    border: 1px solid var(--card-color, #D3D3D3);
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .70rem;
    font-weight: 600;
}


/* Hover léger pour les cartes EN COURS */
.adv-card[data-status="EN COURS"]:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    transition: 0.15s ease-out;
}



/* Grille 2 colonnes fixes */
.adv-form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr ; /* 2 colonnes égales */
    gap: 1rem;
}
/* Grille 3 colonnes fixes */
.adv-form-grid-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 colonnes égales */
    gap: 1rem;
}


/* Sécurise l’affichage du textarea */
.adv-textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}



/*tous les champs commencent au même endroit*/
/* Alignement label / champ */
.adv-field {
    display: grid;
    grid-template-columns: 220px 350px;
    gap: 10px;
    margin-bottom: 12px;
    align-items: start;
}

/* Labels */
.adv-field label {
    text-align: right;
    font-weight: 500;
    white-space: nowrap;
    padding-top: 6px;
}

/* Champs */
.adv-field input,
.adv-field select,
.adv-field textarea {
    width: 100%;

}

/* Textarea */
.adv-field textarea {
    resize: vertical;
}

/* Champ pleine largeur */
.adv-field--full {
    grid-template-columns: 1fr; /* une seule colonne */
}

.adv-field--full label {
    text-align: left;
    padding-top: 0;
}

.adv-field--full textarea {
    text-align: left;
    max-width: 100%;
    width: 100%;
}



.adv-attachments {
    margin-top: 10px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
    color: gray;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

/* Header */
.adv-attachments-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    border-top: solid;
    border-color: grey;
    justify-content: space-between;

}


.adv-attachments-header .toggle {
    margin-left: auto;
}

/* Contenu */
.adv-attachments-content {
    margin-top: 15px;
}

/* Un document */
.attachment-item {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fafafa;
}

.attachment-current {
    margin-bottom: 10px;
}

/* Actions */
.attachment-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.attachment-actions label {
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
}

/* Dissocier */
.attachment-actions .danger {
    color: #a00;
}

/* utilitaire */
.hidden {
    display: none;
}

.adv-attachments-content.hidden {
    display: none;
}

.adv-attachments {
    min-height: auto;
}

.adv-attachments .adv-attachments-content.hidden {
    display: none;
}

.adv-attachments-header {
    cursor: pointer;
}



.adv-field--full {
    grid-column: 1 / -1;
}

textarea {
    line-height: 1.4;
    font-family: inherit;
}




.adv-attachments-header .left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attachments-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
}


.doc-empty {
    font-size: 1.1em;
    opacity: 0.5;
}

/* Header layout */
.adv-attachments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

/* Partie gauche */
.adv-attachments-header .left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Aperçu */
.attachments-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;   /* centrage horizontal */
    align-items: center;     /* centrage vertical */
    gap: 8px;
    min-width: 70px;
}

/* Icône document */
.doc-chip {
    background: #f1f1f1;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 1em;
}

/* Aucun document */
.doc-empty {
    opacity: 0.5;
    font-size: 1em;
}

/* Quand section ouverte → on masque l’aperçu */
.adv-attachments.open .attachments-preview {
    display: none;
}



/* Icônes document */
.doc-icon,
.doc-empty {
    font-size: 1.4rem;       /* taille contrôlée */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}


.doc-icon {
    position: relative;
    font-size: 1.4rem;
    transition: transform 0.15s ease;
}

.doc-icon {

}

/* Icône au repos */
.doc-icon::after {
    content: attr(data-hover);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

/* Survol */
.doc-icon:hover {
    transform: scale(1.1);
}

.doc-icon:hover::after {
    opacity: 1;
}

.doc-icon:hover {
    color: transparent;
}

