/**
 * WEBFUL - Feuille de style principale
 * Couleur de référence : #1d4e8a (bleu corporate)
 * Camaïeu dérivé pour tous les tons de bleu
 */

/* ============================================
   PALETTE COULEURS PERSONNALISÉE
   ============================================ */

:root {
    --webful-blue-50: #e8eef6;
    --webful-blue-100: #d1dde9;
    --webful-blue-200: #a3bbdb;
    --webful-blue-300: #7599cd;
    --webful-blue-400: #4777bf;
    --webful-blue-500: #2a5fa3;
    --webful-blue-600: #1d4e8a;
    /* Couleur principale */
    --webful-blue-700: #163d6e;
    --webful-blue-800: #0f2c52;
    --webful-blue-900: #0a1f3d;

    /* Couleurs Indigo (Tailwind defaults) */
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;
    --indigo-800: #3730a3;
}

/* ============================================
   OVERRIDE TAILWIND BLUE -> WEBFUL BLUE
   ============================================ */

/* Backgrounds */
.bg-blue-50 {
    background-color: var(--webful-blue-50) !important;
}

.bg-blue-100 {
    background-color: var(--webful-blue-100) !important;
}

.bg-blue-600 {
    background-color: var(--webful-blue-600) !important;
}

.bg-blue-700 {
    background-color: var(--webful-blue-700) !important;
}

.bg-blue-800 {
    background-color: var(--webful-blue-800) !important;
}

/* Hover backgrounds */
.hover\:bg-blue-50:hover {
    background-color: var(--webful-blue-50) !important;
}

.hover\:bg-blue-700:hover {
    background-color: var(--webful-blue-700) !important;
}

.hover\:bg-blue-800:hover {
    background-color: var(--webful-blue-800) !important;
}

/* Textes */
.text-blue-50 {
    color: var(--webful-blue-50) !important;
}

.text-blue-100 {
    color: var(--webful-blue-100) !important;
}

.text-blue-600 {
    color: var(--webful-blue-600) !important;
}

.text-blue-700 {
    color: var(--webful-blue-700) !important;
}

.text-blue-800 {
    color: var(--webful-blue-800) !important;
}

.text-blue-900 {
    color: var(--webful-blue-900) !important;
}

/* Hover textes */
.hover\:text-blue-600:hover {
    color: var(--webful-blue-600) !important;
}

.hover\:text-blue-700:hover {
    color: var(--webful-blue-700) !important;
}

.hover\:text-blue-800:hover {
    color: var(--webful-blue-800) !important;
}

/* Bordures */
.border-blue-100 {
    border-color: var(--webful-blue-100) !important;
}

.border-blue-200 {
    border-color: var(--webful-blue-200) !important;
}

.border-blue-500 {
    border-color: var(--webful-blue-500) !important;
}

.border-blue-600 {
    border-color: var(--webful-blue-600) !important;
}

/* Focus borders */
.focus\:border-blue-500:focus {
    border-color: var(--webful-blue-500) !important;
}

/* Ring (focus outlines) */
.focus\:ring-blue-500:focus {
    --tw-ring-color: var(--webful-blue-500) !important;
}

.ring-blue-500 {
    --tw-ring-color: var(--webful-blue-500) !important;
}

/* Dégradés */
.from-blue-600 {
    --tw-gradient-from: var(--webful-blue-600) !important;
}

.from-blue-700 {
    --tw-gradient-from: var(--webful-blue-700) !important;
}

.to-blue-700 {
    --tw-gradient-to: var(--webful-blue-700) !important;
}

.to-blue-800 {
    --tw-gradient-to: var(--webful-blue-800) !important;
}

.to-indigo-600 {
    --tw-gradient-to: var(--indigo-600) !important;
}

.to-indigo-700 {
    --tw-gradient-to: var(--indigo-700) !important;
}

.to-indigo-800 {
    --tw-gradient-to: var(--indigo-800) !important;
}

/* Hover gradients */
.hover\:from-blue-700:hover {
    --tw-gradient-from: var(--webful-blue-700) !important;
}

.hover\:to-indigo-700:hover {
    --tw-gradient-to: var(--indigo-700) !important;
}

/* Strokes (SVG) */
.stroke-blue-600 {
    stroke: var(--webful-blue-600) !important;
}

/* Fill (SVG) */
.fill-blue-600 {
    fill: var(--webful-blue-600) !important;
}

/* ============================================
   LOGO WEBFUL
   ============================================ */

.webful-logo {
    height: 50px;
    width: auto;
    display: inline-block;
}

.webful-logo-small {
    height: 32px;
    width: auto;
    display: inline-block;
}

/* ============================================
   CANVAS GRAPHIQUE
   ============================================ */

/* Les couleurs du graphique sont gérées en JavaScript,
   on peut ajouter des variables CSS si besoin */
canvas {
    --chart-stroke: var(--webful-blue-600);
    --chart-fill-start: var(--webful-blue-200);
    --chart-fill-end: var(--webful-blue-50);
}

/* ============================================
   BOUTONS PERSONNALISÉS
   ============================================ */

.btn-webful-primary {
    background-color: var(--webful-blue-600);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-webful-primary:hover {
    background-color: var(--webful-blue-700);
}

.btn-webful-outline {
    background-color: white;
    color: var(--webful-blue-600);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid var(--webful-blue-600);
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn-webful-outline:hover {
    background-color: var(--webful-blue-50);
}

/* ============================================
   CERCLES SCORE ÉVOLUTION
   ============================================ */

circle[stroke="#3b82f6"] {
    stroke: var(--webful-blue-600) !important;
}

/* ============================================
   LIENS
   ============================================ */

a.text-blue-600 {
    color: var(--webful-blue-600) !important;
}

a.text-blue-600:hover {
    color: var(--webful-blue-700) !important;
}

/* ============================================
   BADGES & PILLS
   ============================================ */

.badge-blue {
    background-color: var(--webful-blue-100);
    color: var(--webful-blue-800);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .webful-logo {
        height: 32px;
    }
}

/* ============================================
   UTILITAIRES
   ============================================ */

.webful-shadow {
    box-shadow: 0 4px 6px -1px rgba(29, 78, 138, 0.1),
        0 2px 4px -1px rgba(29, 78, 138, 0.06);
}

.webful-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(29, 78, 138, 0.1),
        0 4px 6px -2px rgba(29, 78, 138, 0.05);
}

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

/* Animations d'apparition - fade in up */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délais d'animation */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* ============================================
   NAVIGATION STICKY
   ============================================ */

/* Navigation sticky avec scroll progress */
.sticky-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.sticky-nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Scroll progress bar */
.scroll-progress {
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s ease-out;
}

/* ============================================
   CARTES & HOVER EFFECTS
   ============================================ */

/* Cards hover effect pour blog */
.blog-card {
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Feature cards hover */
.feature-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #3b82f6;
}

/* ============================================
   PERFORMANCE - TOGGLE DEVICE
   ============================================ */

.device-toggle-btn {
    color: #6b7280;
    background: transparent;
}

.device-toggle-btn.active {
    color: #1d4e8a;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.device-toggle-btn:hover:not(.active) {
    color: #374151;
}

/* ============================================
   RESPONSIVE - MOBILE OVERRIDES
   ============================================ */

@media (max-width: 768px) {
    /* Grilles passent en colonne unique sur mobile */
    .comparison-grid,
    .features-grid {
        grid-template-columns: 1fr !important;
    }
}
/* ============================================
   MODAL D'UPGRADE (RESTRICTIONS PLAN GRATUIT)
   ============================================ */

.webful-upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.webful-upgrade-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.webful-upgrade-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.webful-upgrade-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    border-bottom: 2px solid #f3f4f6;
}

.webful-upgrade-modal-header h3 {
    font-size: 24px;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.webful-upgrade-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.webful-upgrade-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.webful-upgrade-modal-body {
    padding: 24px;
}

.webful-upgrade-message {
    font-size: 16px;
    color: #374151;
    margin-bottom: 16px;
    line-height: 1.6;
}

.webful-upgrade-cta {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
}

.webful-upgrade-cta strong {
    color: #ea580c;
}

.webful-upgrade-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
}

.webful-btn-secondary {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.webful-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.webful-btn-primary {
    flex: 1;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.webful-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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