/* ========================================
   SYSTÈME DE TOOLTIPS INTERACTIFS
   ======================================== */

/* Tooltip Container */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Tooltip Icon */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285F4 0%, #1A73E8 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tooltip-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

/* Tooltip Content */
.tooltip-content {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border: 1px solid #e8eaed;
}

.tooltip-wrapper:hover .tooltip-content,
.tooltip-content.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    bottom: calc(100% + 8px);
}

/* Tooltip Arrow */
.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* Tooltip Header */
.tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f3f4;
}

.tooltip-header-icon {
    font-size: 20px;
}

.tooltip-title {
    font-size: 15px;
    font-weight: 700;
    color: #202124;
    margin: 0;
}

/* Tooltip Body */
.tooltip-body {
    font-size: 13px;
    line-height: 1.6;
    color: #5f6368;
}

.tooltip-section {
    margin-bottom: 12px;
}

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

.tooltip-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #202124;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.tooltip-section-content {
    font-size: 13px;
    line-height: 1.5;
    color: #5f6368;
}

/* Tooltip Priority Badge */
.tooltip-priority {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.tooltip-priority.critical {
    background: #FEE;
    color: #EA4335;
}

.tooltip-priority.high {
    background: #FFF3E0;
    color: #FF9800;
}

.tooltip-priority.medium {
    background: #FFF9E6;
    color: #FBBC04;
}

.tooltip-priority.low {
    background: #E8F5E9;
    color: #34A853;
}

/* Tooltip Learn More Link */
.tooltip-learn-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f1f3f4;
    border-radius: 8px;
    color: #1A73E8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tooltip-learn-more:hover {
    background: #e8eaed;
    color: #1557B0;
}

.tooltip-learn-more svg {
    width: 14px;
    height: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .tooltip-content {
        width: 280px;
        left: auto;
        right: 0;
        transform: none;
    }
    
    .tooltip-content::after {
        left: auto;
        right: 20px;
        transform: none;
    }
}

/* ========================================
   METRIC TOOLTIPS (Spécifique aux métriques)
   ======================================== */

.metric-label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 14px;
    font-weight: 600;
    color: #5f6368;
}

/* Benchmark Bar in Tooltip */
.tooltip-benchmark {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tooltip-benchmark-label {
    font-size: 11px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.tooltip-benchmark-bar {
    position: relative;
    height: 24px;
    background: #e8eaed;
    border-radius: 12px;
    overflow: hidden;
}

.tooltip-benchmark-fill {
    height: 100%;
    background: linear-gradient(90deg, #34A853 0%, #FBBC04 50%, #EA4335 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.tooltip-benchmark-marker {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 100%;
    background: #202124;
}

.tooltip-benchmark-marker::after {
    content: 'Optimal';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #202124;
    white-space: nowrap;
}

/* ========================================
   ISSUE TOOLTIPS (Pour les problèmes SEO)
   ======================================== */

.issue-with-tooltip {
    position: relative;
    cursor: help;
}

.issue-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    border: 1px solid #e8eaed;
}

.issue-with-tooltip:hover .issue-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    top: calc(100% + 4px);
}

.issue-tooltip-impact {
    margin-bottom: 16px;
}

.issue-tooltip-solution {
    padding: 12px;
    background: #E8F5E9;
    border-left: 4px solid #34A853;
    border-radius: 8px;
    margin-bottom: 16px;
}

.issue-tooltip-solution-title {
    font-size: 12px;
    font-weight: 700;
    color: #1E7E34;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.issue-tooltip-solution-content {
    font-size: 13px;
    line-height: 1.5;
    color: #2E7D32;
}

/* ========================================
   GLOSSARY LINK TOOLTIP
   ======================================== */

.glossary-term {
    position: relative;
    border-bottom: 1px dotted #4285F4;
    cursor: help;
    color: #1A73E8;
}

.glossary-term:hover {
    border-bottom-style: solid;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-content.animating {
    animation: tooltipFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


