/* ==========================================================================
   ADX CARDS - STYLES DES CARTES D'ACTION & SESSIONS
   ========================================================================== */

/* --- 1. AVATARS (Header Résultat) --- */
.adx-avatar-circle {
    width: 60px; height: 60px; min-width: 60px;
    border-radius: 50%;
    background: #2e1f45;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700;
    text-transform: uppercase;
    margin-right: 15px;
    border: 3px solid #f0f0f0;
}

/* --- 2. FRISE / TIMELINE (Dégradés Spécifiques) --- */
/* Ces styles sont utilisés par la Timeline pour colorer les barres */

/* Bleus (Standard) */
.timeline-col.filled.bg-blue, 
.timeline-col.filled.info {
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
}
/* Rouges (Alerte) */
.timeline-col.filled.bg-red, 
.timeline-col.filled.alert {
    background: linear-gradient(180deg, #ff0844 0%, #ffb199 100%);
}
/* Jaunes (Énergie / Audit) */
.timeline-col.filled.border-yellow {
    background: linear-gradient(180deg, #f6d365 0%, #fda085 100%);
}

.current-year-marker {
    position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
    color: #333; font-size: 8px; font-weight: bold;
}
.adx-print-btn { display: none !important; }

/* ==========================================================================
   3. CARTES D'ACTIONS (C'est la partie qui manquait)
   ========================================================================== */

/* Conteneur Grille */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* La Carte Principale */
.action-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    border-color: #ccc;
}

/* Bordure colorée en haut selon le domaine (optionnel, basé sur les classes JS) */
/* Bordure colorée en haut selon le domaine (Mise à jour complète) */

/* DPE (Sans et Avec Mention) - Vert */
.action-card.c-dpe,
.action-card.c-dpe-mention { 
    border-top: 4px solid #27ae60; 
}

/* AUDIT - Vert Sarcelle */
.action-card.c-audit { 
    border-top: 4px solid #16a085; 
}

/* AMIANTE (Sans et Avec Mention) - Rouge */
.action-card.c-amiante,
.action-card.c-amiante-mention { 
    border-top: 4px solid #c0392b; 
}

/* GAZ - Orange Foncé */
.action-card.c-gaz { 
    border-top: 4px solid #d35400; 
}

/* ÉLECTRICITÉ - Orange Jaune */
.action-card.c-elec { 
    border-top: 4px solid #f39c12; 
}

/* PLOMB - Violet */
.action-card.c-plomb { 
    border-top: 4px solid #8e44ad; 
}

/* TERMITES - Marron */
.action-card.c-termites { 
    border-top: 4px solid #8d6e63; 
}

.action-card h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2e1f45;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-card .instruction {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #2e1f45;
}

/* --- LES SESSIONS (Petits calendriers) --- */
.mini-sessions-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.mini-session-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mini-session-card {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
    cursor: pointer;
    flex: 1;
    min-width: 60px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mini-session-card:hover {
    border-color: #2e1f45;
    background-color: #fcfcfc;
}

/* État sélectionné (Clic JS) */
.mini-session-card.selected {
    background-color: #2e1f45;
    border-color: #2e1f45;
    color: #fff;
}
.mini-session-card.selected .ms-badge { background: rgba(255,255,255,0.2); color: #fff; }
.mini-session-card.selected .ms-month { color: #ddd; }

/* Contenu de la petite carte session */
.ms-badge {
    font-size: 9px;
    font-weight: 700;
    background: #eee;
    color: #555;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 4px;
    display: block;
    width: 100%;
}
.ms-date {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    display: block;
    margin: 2px 0;
}
.ms-month {
    font-size: 10px;
    text-transform: uppercase;
    color: #888;
    display: block;
}

/* --- BOUTON D'ACTION (Bas de carte) --- */
.btn-card-select {
    width: 100%;
    background-color: transparent;
    color: #2e1f45;
    border: 2px solid #2e1f45;
    padding: 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto; /* Pousse le bouton vers le bas */
}

.btn-card-select:hover {
    background-color: #2e1f45;
    color: #fff;
}

/* État "Ajouté" (géré par JS) */
.btn-card-select.selected {
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
    color: #fff !important;
}

/* Message si pas de session */
.no-session-msg {
    font-style: italic;
    color: #999;
    font-size: 12px;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}


/* ==========================================================================
   ⚡ ADX MODERN FX - PACK D'ANIMATIONS & SURVOLS
   ========================================================================== */

/* 1. EFFET "LÉVITATION" (Cartes Accueil & Résultats) */
.adx-mode-card, 
.action-card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important; /* Mouvement fluide */
    will-change: transform, box-shadow;
}

.adx-mode-card:hover, 
.action-card:hover {
    transform: translateY(-8px) scale(1.01); /* Monte et grossit très légèrement */
    box-shadow: 0 15px 30px rgba(46, 31, 69, 0.15) !important; /* Ombre portée douce */
    border-color: #2e1f45 !important;
}

/* 2. BOUTONS : EFFET "PRESSION" & ÉCLAT */
button#adx-api-search-btn-v2, 
button#adx-calculate-btn,
.btn-card-select,
.btn-final-submit {
    transition: all 0.2s ease-out !important;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Petit effet de zoom au survol */
button#adx-api-search-btn-v2:hover, 
button#adx-calculate-btn:hover,
.btn-card-select:hover,
.btn-final-submit:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(46, 31, 69, 0.3);
    filter: brightness(1.1); /* Éclaircit légèrement la couleur */
}

/* Effet de clic (le bouton s'enfonce) */
button#adx-api-search-btn-v2:active, 
button#adx-calculate-btn:active,
.btn-card-select:active {
    transform: scale(0.97);
}

/* 3. INPUTS : FOCUS MODERNE */
input#adx-search-input-v2,
.final-input,
.adx-manual-box input,
.adx-manual-box select {
    transition: border 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    border-color: #2e1f45 !important;
    box-shadow: 0 0 0 4px rgba(46, 31, 69, 0.1) !important; /* Halo violet translucide */
    outline: none;
}

/* 4. MINI SESSIONS (Calendriers) : POP-UP */
.mini-session-card {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important; /* Effet rebond */
}

.mini-session-card:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    z-index: 10;
    border-color: #2e1f45;
}

/* 5. AVATAR : PULSATION DOUCE */
.adx-avatar-circle {
    transition: box-shadow 0.5s;
}
.adx-diag-header:hover .adx-avatar-circle {
    box-shadow: 0 0 0 6px rgba(46, 31, 69, 0.1); /* Double cercle */
    animation: adxPulse 2s infinite;
}

@keyframes adxPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 6. FRISE CHRONOLOGIQUE : EFFET BRILLANCE (SHIMMER) */
/* Ajoute un reflet qui passe sur les barres colorées */
.prog-bar-part {
    position: absolute;
    overflow: hidden; /* Important pour contenir le reflet */
}

.prog-bar-part::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    /*background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: adxShimmer 3s infinite;*/
}

@keyframes adxShimmer {
    0% { left: -100%; }
    20% { left: 200%; } /* Le reflet passe vite */
    100% { left: 200%; } /* Pause avant de recommencer */
}

/* 7. LISTE DÉROULANTE (Recherche) */
.adx-result-item {
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.adx-result-item:hover {
    background-color: #fcfcfc;
    border-left-color: #2e1f45;
    padding-left: 25px !important; /* Petit décalage vers la droite */
}