/**
 * Styles pour le système de visite guidée
 */

/* Variables CSS */
:root {
    --gt-primary: #3b82f6;
    --gt-primary-dark: #2563eb;
    --gt-secondary: #6b7280;
    --gt-success: #10b981;
    --gt-overlay-bg: rgba(0, 0, 0, 0.5);
    --gt-modal-bg: white;
    --gt-border-radius: 12px;
    --gt-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Modal de proposition */
.gt-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--gt-overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.gt-modal-overlay.gt-show {
    opacity: 1;
}

.gt-modal {
    background: var(--gt-modal-bg);
    border-radius: var(--gt-border-radius);
    box-shadow: var(--gt-shadow);
    max-width: 480px;
    width: 100%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.gt-modal-header {
    background: linear-gradient(135deg, var(--gt-primary) 0%, #8b5cf6 100%);
    color: white;
    padding: 30px;
    border-radius: var(--gt-border-radius) var(--gt-border-radius) 0 0;
    text-align: center;
}

.gt-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 15px;
}

.gt-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.gt-modal-header p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

.gt-modal-body {
    padding: 30px;
}

.gt-modal-body > p {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 20px;
}

.gt-features {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 20px;
}

.gt-features h4 {
    color: #1e40af;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gt-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gt-features li {
    color: #2563eb;
    font-size: 14px;
    line-height: 1.8;
    padding-left: 8px;
}

.gt-modal-footer {
    padding: 0 30px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gt-btn svg {
    width: 20px;
    height: 20px;
}

.gt-btn-primary {
    background: var(--gt-primary);
    color: white;
}

.gt-btn-primary:hover {
    background: var(--gt-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.gt-btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.gt-btn-secondary:hover {
    background: #d1d5db;
}

.gt-modal-note {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    margin: 10px 0 0 0;
}

.gt-lightbulb-icon {
    display: inline-block;
    font-size: 16px;
    vertical-align: middle;
}

/* Overlay de la visite */
.gt-overlay {
    position: fixed;
    z-index: 9998;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 2px solid var(--gt-primary);
    border-radius: 8px;
}

.gt-overlay.gt-fade-out {
    opacity: 0;
}

/* Overlay parts pour le highlight */
.gt-overlay-part {
    transition: opacity 0.3s ease;
}

.gt-overlay-part.gt-fade-out {
    opacity: 0;
}

/* Border de highlight */
.gt-highlight-border {
    animation: borderPulse 2s infinite;
}

@keyframes borderPulse {
    0%, 100% {
        border-color: rgba(59, 130, 246, 0.8);
    }
    50% {
        border-color: rgba(59, 130, 246, 1);
    }
}

/* Tooltip */
.gt-tooltip {
    position: fixed;
    z-index: 1002;
    background: white;
    border-radius: var(--gt-border-radius);
    box-shadow: var(--gt-shadow);
    max-width: 400px;
    min-width: 320px;
    animation: fadeIn 0.3s ease;
}

.gt-tooltip.gt-fade-out {
    opacity: 0;
    transform: scale(0.95);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gt-tooltip-header {
    background: linear-gradient(135deg, var(--gt-primary) 0%, #8b5cf6 100%);
    color: white;
    padding: 12px 16px;
    border-radius: var(--gt-border-radius) var(--gt-border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gt-step-counter {
    font-size: 12px;
    opacity: 0.9;
}

.gt-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.gt-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gt-tooltip-content {
    padding: 20px;
}

.gt-tooltip-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #111827;
}

.gt-tooltip-content p {
    margin: 0;
    color: #4b5563;
    line-height: 1.5;
    font-size: 14px;
}

.gt-note {
    margin-top: 12px !important;
    padding: 8px 12px;
    background: #fef3c7;
    border-radius: 6px;
    color: #92400e;
    font-size: 13px;
}

.gt-tooltip-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
}

.gt-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
}

.gt-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    transition: all 0.3s ease;
}

.gt-progress-dot.active {
    background: var(--gt-primary);
    transform: scale(1.3);
}

.gt-progress-dot.completed {
    background: var(--gt-success);
}

.gt-tooltip-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.gt-btn-nav,
.gt-btn-skip,
.gt-btn-next {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gt-btn-nav {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.gt-btn-nav:hover {
    background: #f9fafb;
}

.gt-btn-skip {
    background: none;
    color: #6b7280;
    font-size: 13px;
}

.gt-btn-skip:hover {
    color: #374151;
}

.gt-btn-next {
    background: var(--gt-primary);
    color: white;
}

.gt-btn-next:hover {
    background: var(--gt-primary-dark);
}

/* Bouton Lightbulb */
.gt-lightbulb {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    z-index: 9997;
    animation: bounceIn 0.5s ease, pulse 2s infinite;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.gt-lightbulb:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 10px 15px -3px rgba(251, 191, 36, 0.4);
}

/* Animation de highlight */
.gt-highlight-pulse {
    animation: highlightPulse 2s infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0.1);
    }
}

/* Message de fin */
.gt-end-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--gt-border-radius);
    box-shadow: var(--gt-shadow);
    padding: 30px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    text-align: center;
}

.gt-end-message.gt-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gt-end-content svg {
    color: var(--gt-success);
    margin-bottom: 15px;
}

.gt-end-content h3 {
    margin: 0 0 10px 0;
    color: #111827;
    font-size: 20px;
}

.gt-end-content p {
    margin: 5px 0;
    color: #4b5563;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 640px) {
    .gt-modal {
        margin: 10px;
    }
    
    .gt-tooltip {
        max-width: calc(100vw - 20px);
        min-width: calc(100vw - 20px);
    }
    
    .gt-lightbulb {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .gt-tooltip-actions {
        flex-wrap: wrap;
    }
}