/* =========================================
   RÉTROPLANNING INTERACTIF - STYLES
   =========================================
   Bulles interactives avec actions contextuelles
   Créé : 17 novembre 2025
   ========================================= */

/* === TIMELINE VERTICALE === */
.retroplanning-timeline {
    position: relative;
    padding-left: 40px;
}

.retroplanning-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom,
        rgba(6, 182, 212, 0.3) 0%,
        rgba(20, 184, 166, 0.3) 50%,
        rgba(14, 165, 233, 0.3) 100%);
}

/* === MOIS (MONTH CARDS) === */
.retroplanning-month {
    position: relative;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.retroplanning-month::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 8px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
}

.retroplanning-month:hover::before {
    transform: scale(1.3);
    box-shadow: 0 0 0 6px rgba(6, 182, 212, 0.3);
}

/* Wrapper pour positionner la bulle sous le header */
.retroplanning-month-wrapper {
    position: relative;
}

.retroplanning-month-header {
    position: relative;
    cursor: pointer;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(236, 254, 255, 0.4), rgba(204, 251, 241, 0.3));
    border: 2px solid rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.retroplanning-month-header:hover {
    background: linear-gradient(135deg, rgba(236, 254, 255, 0.6), rgba(204, 251, 241, 0.5));
    border-color: rgba(6, 182, 212, 0.5);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.retroplanning-month-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0e7490;
    display: flex;
    align-items: center;
    gap: 10px;
}

.retroplanning-month-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(6, 182, 212, 0.15);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0e7490;
}

/* === BULLE INTERACTIVE === */
.retroplanning-bubble {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px) scale(0.95);
    margin-top: 0;
    padding: 24px;
    background: white;
    border: 2px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
    width: 90%;
    max-width: 600px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.retroplanning-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(6, 182, 212, 0.3);
}

.retroplanning-bubble::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* DESKTOP : Ouverture au clic uniquement (via classe .expanded) */
.retroplanning-month.expanded .retroplanning-bubble {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(8px) scale(1);
}

/* Indicateur visuel : chevron pour montrer que c'est cliquable */
.retroplanning-month-header::after {
    content: '›';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    font-size: 1.5rem;
    color: #0e7490;
    transition: transform 0.3s ease;
}

.retroplanning-month.expanded .retroplanning-month-header::after {
    transform: translateY(-50%) rotate(-90deg);
}

/* === SECTIONS DE LA BULLE === */
.bubble-section {
    margin-bottom: 20px;
}

.bubble-section:last-child {
    margin-bottom: 0;
}

.bubble-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0e7490;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bubble-section-content {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.5;
}

/* === SCORE DE PRÉPARATION === */
.preparation-score {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(20, 184, 166, 0.05));
    border-radius: 10px;
}

.preparation-score-circle {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.preparation-score-svg {
    transform: rotate(-90deg);
}

.preparation-score-bg {
    fill: none;
    stroke: rgba(6, 182, 212, 0.1);
    stroke-width: 6;
}

.preparation-score-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.preparation-score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.125rem;
    font-weight: 900;
    color: #0e7490;
}

.preparation-score-label {
    flex: 1;
}

.preparation-score-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 2px;
}

.preparation-score-desc {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
}

/* === LISTES D'ACTIONS === */
.action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(6, 182, 212, 0.1);
}

.action-item:last-child {
    border-bottom: none;
}

.action-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.action-text {
    flex: 1;
    font-size: 0.8125rem;
    color: #475569;
}

.action-status-done {
    color: #10b981;
}

.action-status-pending {
    color: #f59e0b;
}

/* === BOUTONS D'ACTION === */
.bubble-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.bubble-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bubble-btn-primary {
    background: linear-gradient(135deg, #06b6d4 0%, #14b8a6 100%);
    color: white;
}

.bubble-btn-primary:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.bubble-btn-secondary {
    background: rgba(6, 182, 212, 0.1);
    color: #0e7490;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.bubble-btn-secondary:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: rgba(6, 182, 212, 0.5);
}

.bubble-btn-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.4);
    font-weight: 700;
}

.bubble-btn-critical:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.15));
    border-color: rgba(239, 68, 68, 0.6);
}

.bubble-btn-icon {
    font-size: 1rem;
}

/* === HINTS === */
.bubble-hints {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(6, 182, 212, 0.1);
}

.bubble-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    background: rgba(6, 182, 212, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
}

.bubble-hint:last-child {
    margin-bottom: 0;
}

.bubble-hint-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.bubble-hint-text {
    flex: 1;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

/* === QUICK WINS === */
.quick-wins-grid {
    display: grid;
    gap: 10px;
}

.quick-win-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08), rgba(251, 146, 60, 0.05));
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quick-win-card:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(251, 146, 60, 0.08));
    border-color: rgba(234, 179, 8, 0.4);
    transform: translateX(4px);
}

.quick-win-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.quick-win-content {
    flex: 1;
}

.quick-win-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.quick-win-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.6875rem;
    color: #64748b;
}

.quick-win-duration,
.quick-win-xp {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* === DARK MODE === */
.dark .retroplanning-month-header {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(6, 78, 59, 0.1));
    border-color: rgba(34, 211, 238, 0.3);
}

.dark .retroplanning-month-header:hover {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.25), rgba(6, 78, 59, 0.15));
    border-color: rgba(34, 211, 238, 0.5);
}

.dark .retroplanning-month-title {
    color: #22d3ee;
}

.dark .retroplanning-month-badge {
    background: rgba(34, 211, 238, 0.2);
    color: #22d3ee;
}

.dark .retroplanning-bubble {
    background: #1e293b;
    border-color: rgba(34, 211, 238, 0.3);
}

.dark .retroplanning-bubble::after {
    border-bottom-color: #1e293b;
}

.dark .bubble-section-title {
    color: #22d3ee;
}

.dark .bubble-section-content,
.dark .action-text {
    color: #cbd5e1;
}

.dark .preparation-score {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(6, 78, 59, 0.1));
}

.dark .preparation-score-text {
    color: #22d3ee;
}

.dark .preparation-score-desc {
    color: #f1f5f9;
}

.dark .action-item {
    border-bottom-color: rgba(34, 211, 238, 0.1);
}

.dark .bubble-btn-secondary {
    background: rgba(34, 211, 238, 0.15);
    color: #22d3ee;
    border-color: rgba(34, 211, 238, 0.3);
}

.dark .bubble-btn-secondary:hover {
    background: rgba(34, 211, 238, 0.25);
    border-color: rgba(34, 211, 238, 0.5);
}

.dark .quick-win-card {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(251, 146, 60, 0.08));
    border-color: rgba(234, 179, 8, 0.3);
}

.dark .quick-win-card:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(251, 146, 60, 0.12));
    border-color: rgba(234, 179, 8, 0.5);
}

.dark .quick-win-title {
    color: #f1f5f9;
}

.dark .quick-win-meta {
    color: #94a3b8;
}

.dark .bubble-btn-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.15));
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.5);
}

.dark .bubble-btn-critical:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(220, 38, 38, 0.25));
    border-color: rgba(239, 68, 68, 0.7);
}

.dark .bubble-hints {
    border-top-color: rgba(34, 211, 238, 0.15);
}

.dark .bubble-hint {
    background: rgba(8, 145, 178, 0.1);
}

.dark .bubble-hint-text {
    color: #94a3b8;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .retroplanning-timeline {
        padding-left: 30px;
    }

    .retroplanning-timeline::before {
        left: 15px;
    }

    .retroplanning-month::before {
        left: -22px;
        width: 14px;
        height: 14px;
    }

    /* MOBILE : Accordéon simple - pas de modale flottante */
    .retroplanning-bubble {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin-top: 12px;
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 1;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }

    /* Flèche vers le haut cachée sur mobile */
    .retroplanning-bubble::before,
    .retroplanning-bubble::after {
        display: none;
    }

    /* État ouvert - accordéon déplié */
    .retroplanning-month.expanded .retroplanning-bubble {
        max-height: 1000px;
        opacity: 1;
        padding: 12px;
        pointer-events: auto;
        transform: none !important;
        left: auto !important;
        position: static !important;
    }

    /* Simplification des actions pour mobile */
    .bubble-actions {
        flex-direction: column;
        gap: 8px;
    }

    .bubble-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    /* Quick wins plus compactes */
    .quick-wins-grid {
        gap: 8px;
    }

    .quick-win-card {
        padding: 10px;
    }

    /* Score plus compact */
    .preparation-score {
        padding: 8px;
    }

    .preparation-score-circle {
        width: 50px;
        height: 50px;
    }

    .preparation-score-svg {
        width: 50px;
        height: 50px;
    }
}

/* === ANIMATIONS === */
@keyframes bubbleFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(10px) scale(1);
    }
}

@keyframes scoreCircle {
    from {
        stroke-dashoffset: 377;
    }
}

/* === TOOLTIPS === */
.bubble-tooltip {
    position: relative;
    display: inline-block;
}

.bubble-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #0f172a;
    color: white;
    font-size: 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    margin-bottom: 6px;
    z-index: 1000;
}

.dark .bubble-tooltip:hover::after {
    background: #cbd5e1;
    color: #0f172a;
}

/* === LOADING STATE === */
.retroplanning-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #64748b;
    font-style: italic;
}

.retroplanning-loading::before {
    content: '⏳';
    display: inline-block;
    margin-right: 8px;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* === FOCUS STATES (ACCESSIBILITY) === */
.quick-win-card:focus,
.bubble-btn:focus {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

input[type="checkbox"]:focus {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* Améliorer le contraste pour l'accessibilité */
@media (prefers-contrast: high) {
    .retroplanning-month-header {
        border-width: 3px;
    }

    .retroplanning-bubble {
        border-width: 3px;
    }

    .bubble-btn-secondary {
        border-width: 2px;
    }
}
