@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1b10df;
    --primary-dark: #150da3;
    --hero-bg: #f8fafc;
    --hero-grid: rgba(27, 16, 223, 0.05);
}

.dark :root {
    --hero-bg: #020617;
    --hero-grid: rgba(255, 255, 255, 0.03);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

[class*="transition-all"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Typography */
.hero-title {
    font-size: clamp(3.5rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Hero Background Grid */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--hero-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    z-index: 0;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: max-content;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    opacity: 0.6;
    transition: opacity 0.3s;
    cursor: pointer;
    z-index: 10;
}

@media (min-width: 768px) {
    .scroll-indicator {
        display: flex;
    }
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: scroll-ping 2s infinite;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, currentColor, transparent);
}

@keyframes scroll-ping {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Glass effect adaptive */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .glass {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.05);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark .glass-strong {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Spotlight Effect adaptive */
.highlight-on-hover {
    position: relative;
}

.highlight-on-hover::before {
    content: "";
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(27, 16, 223, 0.04),
        transparent 40%
    );
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 1;
}

.dark .highlight-on-hover::before {
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.05),
        transparent 40%
    );
}

.highlight-on-hover:hover::before {
    opacity: 1;
}

/* Navigation Dropdown (Mega Menu) */
.nav-dropdown {
    position: absolute;
    top: calc(100% - 10px); /* Slightly overlap or bridge the gap */
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 50;
}

/* For full-width centering */
.mega-menu-container {
    max-width: 80rem; /* max-w-7xl */
    margin: 0 auto;
    padding: 0 1.5rem;
}

.group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-content {
    background: white;
    border-bottom: 1px solid rgba(226, 232, 240, 1);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    padding: 3rem 0;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.15);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    max-width: 80rem; /* Inner content centered */
    margin: 0 auto;
}

.dark .dropdown-content {
    background: #020617; /* Same as body bg */
    border-color: rgba(255, 255, 255, 0.05);
}

.dropdown-column-title {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: 1.5rem;
    transition: all 0.3s;
    text-align: left;
}

.dropdown-item:hover {
    background: #f8fafc; /* slate-50 */
    transform: translateX(4px);
}

.dark .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Info-bulle "En option" (couleurs du site) */
.opt-hint {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted rgba(27, 16, 223, 0.45);
}
.opt-hint::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 280px;
    max-width: 78vw;
    background: linear-gradient(135deg, #1b10df 0%, #150da3 100%);
    color: #fff;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    padding: 14px 18px;
    border-radius: 18px;
    box-shadow: 0 22px 45px -12px rgba(27, 16, 223, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 60;
}
.opt-hint::before {
    content: "";
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    border: 13px solid transparent;
    border-top-color: #150da3;
    margin-bottom: -16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 71;
}
.opt-hint::after { z-index: 70; }
.opt-hint:hover::after,
.opt-hint:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Élève la carte survolée au-dessus des voisines pour que l'info-bulle ne passe pas derrière */
.highlight-on-hover:has(.opt-hint:hover) {
    position: relative;
    z-index: 50;
    overflow: visible;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* CTA & Footer Styles */
.cta-section {
    background: linear-gradient(135deg, #1b10df 0%, #150da3 100%) !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 40px 100px -20px rgba(27, 16, 223, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    transform: rotate(15deg);
    filter: blur(40px);
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 0%, transparent 60%);
    filter: blur(60px);
}

/* Footer links and title helpers (moved to header.php style block) */
/* Custom Scrollbar for tables */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.dark .custom-scrollbar::-webkit-scrollbar-track {
    background: #1e293b;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Global overrides for primary opacity */
.bg-primary\/10 {
    background-color: rgb(27 16 223 / 0.03) !important;
}

.bg-\[\#eeefff\] {
    background-color: rgb(27 16 223 / 0.03) !important;
}

/* Supprime le fond bleu/jaune de l'autocomplétion (autofill) du navigateur
   sur tous les champs de saisie (Chrome / Edge / Safari) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill,
input:autofill {
    -webkit-text-fill-color: currentColor !important;
    caret-color: currentColor;
    transition: background-color 9999s ease-in-out 0s !important;
}

.bg-primary-500\/10 {
    background-color: rgb(99 102 241 / 0.03) !important;
}

/* Sidebar panier : texte agrandi de 25 % */
#cart-items-list .text-\[9px\]  { font-size: 11.25px; }
#cart-items-list .text-\[10px\] { font-size: 12.5px; }
#cart-items-list .text-\[11px\] { font-size: 13.75px; }
#cart-items-list .text-xs       { font-size: 0.9375rem; line-height: 1.25rem; }
#cart-items-list .text-sm       { font-size: 1.09375rem; line-height: 1.5625rem; }
#cart-items-list p.font-black   { font-size: 1.25rem; }

/* Plans (mode 2 offres) : carte mise en avant sombre — texte clair lisible */
.plan-featured-dark h3,
.plan-featured-dark .plan-price   { color: #ffffff !important; }
.plan-featured-dark .plan-period  { color: rgb(148 163 184) !important; }
.plan-featured-dark ul li         { color: rgb(203 213 225) !important; }
.plan-featured-dark ul li strong  { color: #ffffff !important; }
.plan-featured-dark .qty-val      { color: #ffffff !important; }
