/* Custom Properties */
:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --secondary: #3b82f6;
    --secondary-dark: #2563eb;
    --secondary-light: #60a5fa;
    --gray: #6b7280;
    --gray-dark: #374151;
    --gray-light: #9ca3af;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Éviter les décalages au chargement */
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    /* Éviter le flash au chargement */
    min-height: 100vh;
    position: relative;
}

/* ============================================
   MENU RESPONSIVE - BREAKPOINT 1025PX
   ============================================ */

/* Menu Desktop : visible uniquement au-dessus de 1025px */
.menu-desktop-1000 {
    display: none;
}

@media (min-width: 1025px) {
    .menu-desktop-1000 {
        display: flex;
    }
}

/* Menu Mobile/Hamburger : visible uniquement en dessous de 1025px */
.menu-mobile-1000 {
    display: flex;
}

@media (min-width: 1025px) {
    .menu-mobile-1000 {
        display: none;
    }
}

/* Tailwind Custom Classes */
.bg-primary {
    background-color: var(--primary) !important;
}

.bg-primary-dark {
    background-color: var(--primary-dark) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

/* Désactivé pour harmonisation hover - effet scale/shadow seulement, pas de changement couleur */
/* .hover\:bg-primary-dark:hover {
    background-color: var(--primary-dark) !important;
} */

.hover\:text-primary:hover {
    color: var(--primary) !important;
}

.hover\:border-primary:hover {
    border-color: var(--primary) !important;
}

.focus\:border-primary:focus {
    border-color: var(--primary) !important;
}

.focus\:ring-primary\/20:focus {
    --tw-ring-color: rgba(124, 58, 237, 0.2) !important;
}

/* Portfolio Filter Styles */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Cacher les filtres desktop sur mobile (surcharger display: flex) */
@media (max-width: 767px) {
    .portfolio-filters.hidden {
        display: none !important;
    }
}

.filter-btn {
    padding: 0.75rem 2rem;
    border: 2px solid var(--gray-light);
    background: white;
    color: var(--gray-dark);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

/* Garde le violet quand actif ET hover */
.filter-btn.active:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px) scale(1.02);
}

.project-card {
    transition: all 0.5s ease;
}

.project-card.hide {
    display: none;
}

.project-card.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Styles */
#header {
    background: transparent;
    backdrop-filter: blur(0px);
    transition: all 0.3s ease-in-out;
    /* Éviter le flash au chargement */
    will-change: background-color, backdrop-filter, box-shadow;
}

/* Header au scroll : dégradé violet très sombre avec opacité 70% */
#header.is-scrolled {
    background: linear-gradient(135deg, 
        rgba(55, 15, 100, 0.7) 0%, 
        rgba(70, 20, 120, 0.7) 50%, 
        rgba(85, 30, 140, 0.7) 100%
    );
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(55, 15, 100, 0.5);
}

/* Classe is-top pour état transparent (par défaut au chargement) */
#header.is-top {
    background: transparent;
    backdrop-filter: blur(0px);
    box-shadow: none;
}

/* Ancienne classe .scrolled conservée pour compatibilité */
#header.scrolled {
    background: linear-gradient(135deg, 
        rgba(55, 15, 100, 0.7) 0%, 
        rgba(70, 20, 120, 0.7) 50%, 
        rgba(85, 30, 140, 0.7) 100%
    );
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(55, 15, 100, 0.5);
}

#header.scrolled .nav-link {
    color: white;
}

/* Header TRANSPARENT (is-top) : Breizh' en blanc, menu blanc */
#header.is-top .brand-breizh {
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Header TRANSPARENT : liens navigation en blanc */
#header.is-top .menu-desktop-1000 a:not(.btn-primary),
#header.is-top nav a:not(.btn-primary) {
    color: white !important;
}

/* Header SCROLLED (is-scrolled) : Breizh' et It en blanc, menu blanc */
#header.is-scrolled .nav-link,
#header.is-scrolled a:not(.btn-primary) {
    color: white !important;
}

#header.is-scrolled .brand-breizh,
#header.is-scrolled .brand-it {
    background: white;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Bouton "Demande de devis" en header scrollé : fond blanc, texte violet */
#header.is-scrolled .btn-primary,
#header.scrolled .btn-primary {
    background-color: white !important;
    color: #7c3aed !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

#header.is-scrolled .btn-primary:hover,
#header.scrolled .btn-primary:hover {
    background-color: #f3f4f6 !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

#header.is-scrolled .btn-primary i,
#header.scrolled .btn-primary i {
    color: #7c3aed !important;
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.active {
    display: block;
    max-height: 500px;
    transition: max-height 0.3s ease-in;
}

/* Button Styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

/* Service Cards */
.service-card {
    transition: all 0.3s ease;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: transparent !important;
}

.service-card:hover::before {
    opacity: 0.05;
}

/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
    min-width: 280px;
    max-width: 360px;
    flex-shrink: 0;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(60% 60% at 50% 50%, rgba(159, 123, 255, 0.35) 0%, rgba(159, 123, 255, 0.15) 40%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; /* 🔧 CORRECTION : Permet les clics sur les liens en-dessous */
}

.project-card:hover::after {
    opacity: 0.45; /* Glow plus marqué en dark */
}

/* Effet glow renforcé en dark mode (parité HTML) */
.dark .project-card .group:hover img,
[data-theme="dark"] .project-card .group:hover img {
    filter: drop-shadow(0 10px 24px rgba(159, 123, 255, 0.45));
    transform: scale(1.06);
}

/* Filtres portfolio - états dark */
.dark .portfolio-filters .filter-btn,
[data-theme="dark"] .portfolio-filters .filter-btn {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.dark .portfolio-filters .filter-btn:hover,
[data-theme="dark"] .portfolio-filters .filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 8px 24px rgba(159, 123, 255, 0.25);
}

.dark .portfolio-filters .filter-btn.active,
[data-theme="dark"] .portfolio-filters .filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(159, 123, 255, 0.35);
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scroll to Top Button */
#scroll-top {
    transition: all 0.3s ease;
}

#scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-top:hover {
    transform: translateY(-3px);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Form Focus Effects */
input:focus,
textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
}

/* Hover Effects for Links */
a {
    transition: all 0.3s ease;
}

/* Image Hover Effects */
img {
    transition: transform 0.3s ease;
}

.hover-zoom:hover img {
    transform: scale(1.05);
}

/* Background Patterns */
.pattern-dots {
    background-image: radial-gradient(circle, var(--primary) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shadow Variations */
.shadow-primary {
    box-shadow: 0 10px 40px rgba(124, 58, 237, 0.2);
}

.shadow-primary-lg {
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
}

/* Text Shadow for Hero */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Underline Animation */
.underline-animate {
    position: relative;
    display: inline-block;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.underline-animate:hover::after {
    width: 100%;
}

/* Card Tilt Effect */
.card-tilt {
    transition: transform 0.3s ease;
}

.card-tilt:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
}

/* Blob Animation */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -20px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 20px) scale(1.05);
    }
}

.blob-animate {
    animation: blob 7s infinite ease-in-out;
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animate {
    animation: float 3s ease-in-out infinite;
}

/* Shine Effect */
@keyframes shine {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 100%;
    }
}

.shine {
    position: relative;
    overflow: hidden;
}

.shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

/* Secondary Color Support */
.bg-secondary {
    background-color: var(--secondary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.border-secondary {
    border-color: var(--secondary) !important;
}

.hover\:bg-secondary:hover {
    background-color: var(--secondary) !important;
}

.hover\:text-secondary:hover {
    color: var(--secondary) !important;
}

/* Testimonial Styles */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 100px;
    color: var(--primary);
    opacity: 0.1;
    font-family: Georgia, serif;
}

/* Stats Counter */
.stat-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(159, 123, 255, 0.15), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.stat-card:hover::before {
    top: -100%;
    left: -100%;
}

/* Stat numbers - Glow effect */
.stat-number {
    text-shadow: 0 0 20px rgba(159, 123, 255, 0.4),
                 0 0 40px rgba(159, 123, 255, 0.2);
}

/* Dark mode - Support section fond plus sombre */
.dark .support-section,
[data-theme="dark"] .support-section {
    background: var(--bg-primary) !important;
}

/* Dark mode - Stat cards fond encore plus profond */
.dark .stat-card,
[data-theme="dark"] .stat-card {
    background: linear-gradient(135deg, #0f172a 0%, #0a0e1f 100%);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
                0 0 30px rgba(159, 123, 255, 0.15);
}

/* Dark mode - Intensify glow on numbers */
.dark .stat-number,
[data-theme="dark"] .stat-number {
    text-shadow: 0 0 25px rgba(159, 123, 255, 0.6),
                 0 0 50px rgba(159, 123, 255, 0.3),
                 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Dark mode - Support features text */
.dark .support-feature,
[data-theme="dark"] .support-feature {
    color: var(--text-secondary) !important;
}

.dark .support-feature i,
[data-theme="dark"] .support-feature i {
    filter: drop-shadow(0 0 4px currentColor);
}

/* Footer Link Hover */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Smooth Page Transitions */
.page-transition {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Loading State */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Typography */
/* Note: line-height géré par Tailwind classes (leading-*) */
/* Ne pas définir line-height ici pour permettre leading-tight, leading-snug, etc. */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    /* line-height: 1.2; */ /* Désactivé - géré par Tailwind */
    color: var(--text-dark);
}

p {
    color: var(--text-light);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* ==========================
   Lightbox Alpine.js – Thème Breizh'IT (Nov 2025)
   ==========================
   - Remplace Fancybox pour une solution plus légère
   - Fond sombre avec blur
   - Animations fluides
   - Accessible et responsive
*/

/* Désactiver la sélection sur toutes les images */
img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ==========================
   Portfolio Carousel – Scroll horizontal fluide (Nov 2025)
   ==========================
   - Scrollbar VISIBLE et stylisée (violet)
   - Snap points pour alignement précis
   - Compatible tous navigateurs
*/

/* Scrollbar stylisée (Chrome, Safari, Edge) */
.portfolio-scrollbar::-webkit-scrollbar {
    height: 14px; /* Hauteur de la scrollbar horizontale augmentée */
}

.portfolio-scrollbar::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.1); /* violet-500 avec 10% opacité */
    border-radius: 7px;
}

.portfolio-scrollbar::-webkit-scrollbar-thumb {
    background: #7c3aed; /* violet-600 - couleur primaire du site */
    border-radius: 7px;
    transition: background 0.2s ease;
}

.portfolio-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6d28d9; /* violet-700 - plus foncé au hover */
}

/* Scrollbar stylisée (Firefox) */
.portfolio-scrollbar {
    scrollbar-width: auto; /* Changé de thin à auto pour plus d'épaisseur */
    scrollbar-color: #7c3aed rgba(139, 92, 246, 0.1);
}

/* Badge vidéo - pas de hover */
.video-badge {
    pointer-events: none; /* Empêche les interactions */
    user-select: none;
}

/* Smooth scroll natif */
.scroll-smooth {
    scroll-behavior: smooth;
}

/* ==========================
   Blog Filter Buttons (Nov 2025)
   ==========================
   - Boutons de filtrage pour catégories blog
   - Style cohérent avec le reste du site
   - États actif/hover/focus
*/

.blog-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.blog-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.blog-filter-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Dark mode for blog filters */
.dark .blog-filter-btn {
    background: #1f2937;
    color: #d1d5db;
    border-color: #374151;
}

.dark .blog-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dark .blog-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ==========================
   Hamburger Menu Icon Animation (Nov 2025)
   ==========================
   - SVG hamburger moderne avec 3 barres
   - Animation fluide vers croix (X) quand menu ouvert
   - Adaptation automatique light/dark mode
   - Accessible clavier et tactile
*/

/* Animation des lignes du hamburger */
#mobile-menu-toggle .hamburger-line-1,
#mobile-menu-toggle .hamburger-line-2,
#mobile-menu-toggle .hamburger-line-3 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* État menu ouvert : transformation en croix (X) */
#mobile-menu-toggle.menu-open .hamburger-line-1 {
    transform: rotate(45deg) translateY(6px) translateX(6px);
}

#mobile-menu-toggle.menu-open .hamburger-line-2 {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-toggle.menu-open .hamburger-line-3 {
    transform: rotate(-45deg) translateY(-6px) translateX(6px);
}

/* Rotation subtile du bouton au hover */
#mobile-menu-toggle:hover {
    transform: scale(1.05);
}

#mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Focus visible pour accessibilité */
#mobile-menu-toggle:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

