/* ========== VARIABLES & THEMES ========== */
:root {
    --bg-white: #e5e5e5;
    --bg-light: #f8f9fb;
    --bg-card: #ffffff;
    --accent-blue: #1e3467;
    --accent-blue-light: #3b82f6;
    --accent-blue-dark: #343849;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.2);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}


/* Cette regle forcait le texte en blanc sur les boutons pleins. Elle etait portee par
   [data-theme="light"], attribut que le site ne posait jamais de lui-meme : elle ne
   s'appliquait donc qu'apres un aller-retour par le theme sombre, et dormait le reste
   du temps. La retirer avec le theme aurait ete plus juste que de la generaliser :
   .btn-primary et .nav-cta declarent deja « color: white », et le !important ecrasait
   les boutons ajoures des cartes de tarifs — texte blanc sur fond blanc. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen reader only - 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;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    font-display: swap;
}

/* ========== PAGE LOADER ========== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== NAVIGATION ========== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

nav.scrolled {
    padding: 0.6rem 4rem;
    box-shadow: var(--shadow-md);
}

.logo {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-decoration: none;
    letter-spacing: -1px;
    transition: transform var(--transition-normal);
}

.logo img {
    display: block;
    height: auto;
    max-width: 100%;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width var(--transition-normal);
}

.nav-links a:hover {
    color: var(--accent-blue);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Toggle */





/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-selector select {
    appearance: none;
    background: var(--bg-light);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.lang-selector select:hover {
    border-color: var(--accent-blue);
}

.lang-selector::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.nav-cta {
    background: var(--accent-blue);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-cta:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30, 52, 103, 0.4);
}

/* ========== HAMBURGER MENU ========== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-card);
    z-index: 999;
    padding: 6rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu a:not(.btn-primary) {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.mobile-menu a:hover:not(.btn-primary) {
    color: var(--accent-blue);
    padding-left: 1rem;
}

.mobile-menu-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* Force white text on mobile menu button in light mode */
.mobile-menu-footer .btn-primary,
.mobile-menu .btn-primary {
    color: white !important;
}

/* Center text in mobile menu button */
.mobile-menu-footer .btn-primary {
    justify-content: center;
    width: 100%;
}

/* ========== HERO SECTION ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 8rem 4rem 4rem;
    position: relative;
    background: var(--bg-light);
    overflow: hidden;
}

/* Formes qui morphent */
.morph-shape {
    position: absolute;
    opacity: 0.06;
    filter: blur(1px);
    pointer-events: none;
    z-index: 0;
    will-change: border-radius;
    contain: layout style paint;
}

.morph-shape-1 {
    width: 400px;
    height: 400px;
    right: -100px;
    top: 10%;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-green));
    animation: morph 15s infinite ease-in-out;
}

.morph-shape-2 {
    width: 300px;
    height: 300px;
    left: -50px;
    bottom: 10%;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-blue-light));
    animation: morph 20s infinite ease-in-out reverse;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%; }
    75% { border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%; }
}

.hero-content {
    flex: 0 0 30%;
    max-width: 30%;
    z-index: 1;
    opacity: 0;
    transform: translateY(50px);
    /* Le titre est la premiere chose que le visiteur vient lire : 1,5 s avant qu'il
       soit en place (0,5 s d'attente puis 1 s d'animation), c'est une page qui parait
       vide au moment ou elle compte le plus. */
    animation: slideUp 0.55s ease forwards 0.1s;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    color: var(--text-primary);
}

h1 .highlight {
    color: var(--accent-blue);
    position: relative;
}

h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(30, 52, 103, 0.15);
    z-index: -1;
    transform: skewX(-5deg);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 480px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-primary:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.4);
}

.btn-pulse {
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(30, 52, 103, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(30, 52, 103, 0); }
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--border-medium);
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(30, 52, 103, 0.1), transparent);
    transition: left var(--transition-slow);
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-3px);
}

/* ========== HERO VISUAL ========== */
.hero-visual {
    flex: 0 0 70%;
    max-width: 70%;
    z-index: 1;
    opacity: 0;
    /* Arrive juste apres le texte : l'ordre de lecture est conserve, l'attente non. */
    animation: slideInRight 0.55s ease forwards 0.25s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.screenshot-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    transition: all var(--transition-slow);
}

.screenshot-container:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

.screenshot-mockup {
    width: 100%;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 0.75rem;
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 0.75rem;
    padding: 0.25rem;
}

.window-controls span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform var(--transition-normal);
}

.window-controls span:hover {
    transform: scale(1.3);
}

.window-controls span:nth-child(1) { background: #ff5f57; }
.window-controls span:nth-child(2) { background: #ffbd2e; }
.window-controls span:nth-child(3) { background: #28c840; }

/* ========== CARROUSEL 3D ========== */
.carousel {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    perspective: 1000px;
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 60vh;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    opacity: 0;
    transform: translateX(100%) rotateY(45deg);
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
    z-index: 2;
}

.carousel-slide.prev {
    opacity: 0.5;
    transform: translateX(-100%) rotateY(-45deg);
    z-index: 1;
}

.carousel-slide.next {
    opacity: 0.5;
    transform: translateX(100%) rotateY(45deg);
    z-index: 1;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-primary);
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 50%;
    transition: all var(--transition-normal);
    z-index: 10;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev { left: 1rem; }
.carousel-btn-next { right: 1rem; }

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.dot:hover {
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.8);
}

.dot.active {
    background: var(--accent-blue);
    border-color: white;
    transform: scale(1.3);
}

/* ========== FEATURES SECTION ========== */
.features {
    padding: 6rem 4rem;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    color: var(--accent-blue);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
}

.section-tag.visible {
    animation: fadeInUp 0.45s ease forwards;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(20px);
}

/* Le titre annonce la section : le retarder de 0,2 s le faisait arriver apres les
   cartes qu'il introduit. Il part maintenant en meme temps qu'elles. */
h2.visible {
    animation: fadeInUp 0.45s ease forwards;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(50px);
    position: relative;
    overflow: hidden;
    contain: layout style paint;
}

.feature-card:hover {
    will-change: transform;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 52, 103, 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-color: var(--accent-blue-light);
}

.feature-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(37, 99, 235, 0.05));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
}

/* Micro-interaction: Icon animation on hover 
.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.1));
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.feature-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    border: 2px solid var(--accent-blue);
    opacity: 0;
    transform: scale(1.3);
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon::after {
    opacity: 0.3;
    transform: scale(1.5);
}*/

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    position: relative;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
}

/* ========== PRICING SECTION ========== */
.pricing {
    padding: 6rem 4rem;
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.pricing::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(30, 52, 103, 0.05) 0%, transparent 70%);
    animation: floatBg 15s infinite ease-in-out;
    pointer-events: none;
    z-index: 0;
}

@keyframes floatBg {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, 50px) scale(1.1); }
}

/* Toggle Pricing View */
.pricing-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 10;
}

.pricing-toggle button {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-medium);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer !important;
    transition: all var(--transition-normal);
    opacity: 1;
    user-select: none;
    position: relative;
    z-index: 20;
}

.pricing-toggle button.active {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 52, 103, 0.3);
}

.pricing-toggle button:hover:not(.active) {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(30, 52, 103, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(30, 52, 103, 0.15);
}

.pricing-toggle button:active {
    transform: translateY(0);
}

/* Pricing Cards */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;

    /* Quatre rangees communes aux trois tuiles : nom, prix, liste, bouton. Les cartes
       s'y accrochent par subgrid, si bien que le prix, le debut de la liste et le
       bouton se retrouvent a la meme hauteur d'une tuile a l'autre — quelle que soit
       la longueur des textes. Aucune hauteur en dur a maintenir. */
    grid-template-rows: auto auto 1fr auto;
}

.pricing-cards.hidden {
    display: none;
}

.pricing-card {
    /* La carte occupe les quatre rangees de la grille parente et y aligne ses propres
       elements. Un navigateur sans subgrid ignore ces deux lignes : la tuile reste
       une grille ordinaire, seulement moins bien alignee. */
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;

    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-sm);
    position: relative;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
}

.pricing-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.pricing-card.featured.visible {
    transform: translateY(0) scale(1.05);
}

.pricing-card.featured {
    border: 2px solid var(--accent-blue);
    box-shadow: var(--shadow-md);
}

.pricing-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.pricing-card.featured:hover {
    transform: translateY(-15px) scale(1.08);
}

.plan-name {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: capitalize;
}

.plan-price {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);

    /* « Sur demande » passait sur deux lignes a cette taille et decalait toute la
       carte par rapport a « 0 € » et « 99 € ». L'alignement des trois tuiles se joue
       plus bas, par la grille : ici on se contente d'empecher le retour a la ligne. */
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

/* Un libelle en toutes lettres n'a pas besoin de la taille d'un chiffre : il tient
   ainsi sur une ligne sans reduire celle des prix, qui doivent rester lisibles de loin. */
.plan-price.plan-price-text {
    font-size: 1.9rem;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0 2rem;
}

.plan-features li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    opacity: 0;
    transform: translateX(-20px);
}

/* Les lignes de la carte defilent une a une. Le pas est reduit de moitie : au-dela de
   la quatrieme ligne, la liste se lisait plus vite qu'elle ne s'affichait. */
.pricing-card.visible .plan-features li {
    animation: slideInLeft 0.35s ease forwards;
}

.pricing-card.visible .plan-features li:nth-child(1) { animation-delay: 0.04s; }
.pricing-card.visible .plan-features li:nth-child(2) { animation-delay: 0.08s; }
.pricing-card.visible .plan-features li:nth-child(3) { animation-delay: 0.12s; }
.pricing-card.visible .plan-features li:nth-child(4) { animation-delay: 0.16s; }
.pricing-card.visible .plan-features li:nth-child(5) { animation-delay: 0.2s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.plan-features li::before {
    content: '✓';
    color: var(--accent-green);
    font-weight: 700;
    width: 22px;
    height: 22px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.pricing-card .btn-primary {
    width: 100%;
    justify-content: center;
}

.pricing-card:not(.featured) .btn-primary {
    background: transparent;
    border: 2px solid var(--accent-blue);
    color: var(--accent-blue);
}

.pricing-card:not(.featured) .btn-primary:hover {
    background: var(--accent-blue);
    color: white;
}

/* ========== COMPARISON TABLE ========== */
.comparison-table-container {
    max-width: 1000px;
    margin: 0 auto;
    overflow-x: auto;
    position: relative;
    z-index: 1;
}

.comparison-table-container.hidden {
    display: none;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table thead {
    background: var(--accent-blue);
    color: white;
}

.comparison-table th {
    padding: 1.25rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
}

.comparison-table th:first-child {
    text-align: left;
    padding-left: 1.5rem;
}

.comparison-table th.featured-col {
    background: var(--accent-blue-dark);
    position: relative;
}

/* La pastille « Populaire » a ete retiree : la colonne mise en avant se distingue deja
   par sa couleur, et une telle mention se defend mal sans chiffres derriere. */

.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background-color var(--transition-fast);
}

.comparison-table tbody tr:hover {
    background: var(--bg-light);
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table td {
    padding: 1rem;
    text-align: center;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.comparison-table td:first-child {
    text-align: left;
    padding-left: 1.5rem;
    font-weight: 500;
}

.comparison-table td.featured-col {
    background: rgba(30, 52, 103, 0.03);
}

.comparison-table .check {
    color: var(--accent-green);
    font-size: 1.2rem;
    font-weight: bold;
}

.comparison-table .cross {
    color: var(--accent-red);
    font-size: 1.2rem;
    font-weight: bold;
}

.comparison-table .price-row td {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-blue);
    padding: 1.25rem 1rem;
}

.comparison-table .price-row td:first-child {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.comparison-table .cta-row td {
    padding: 1.5rem 1rem;
}

.comparison-table .cta-row .btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

/* ========== DEMO SECTION ========== */
.demo {
    padding: 6rem 4rem;
    background: var(--bg-white);
}

.demo-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 3.5rem;
    text-align: center;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    position: relative;
    overflow: hidden;
}

.demo-container.visible {
    animation: scaleIn 0.6s ease forwards;
}

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

.demo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.demo-container h2 {
    margin-bottom: 0.75rem;
    opacity: 1;
    transform: none;
}

.demo-container p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.demo-form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.demo-form input {
    background: var(--bg-card);
    border: 2px solid var(--border-medium);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--text-primary);
    width: 280px;
    font-family: 'DM Sans', sans-serif;
    transition: all var(--transition-normal);
}

.demo-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(30, 52, 103, 0.1);
    transform: scale(1.02);
}

/* ========== SCROLL TO TOP ========== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all var(--transition-normal);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.scroll-top:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(30, 52, 103, 0.4);
}

/* ========== FOOTER ========== */
footer {
    padding: 3rem 4rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-card);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-blue);
    transition: width var(--transition-normal);
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-company {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .hero-visual {
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 3rem;
        animation: fadeInUp 0.55s ease forwards 0.25s;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    nav {
        padding: 1rem 1.5rem;
    }

    nav.scrolled {
        padding: 0.6rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero, .features, .pricing, .demo {
        padding: 4rem 1.5rem;
    }
    
    /* Ajuster le hero spécifiquement pour éviter le chevauchement avec la navbar */
    .hero {
        padding-top: 7rem;
        min-height: 100vh;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured.visible {
        transform: translateY(0) scale(1);
    }

    .pricing-card.featured:hover {
        transform: translateY(-15px) scale(1.03);
    }
    
    /* Améliorer le toggle en mobile */
    .pricing-toggle {
        flex-direction: row;
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .pricing-toggle button {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* Améliorer l'affichage du tableau comparatif en mobile */
    .comparison-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1.5rem;
        padding: 0 1.5rem;
        max-width: 100vw;
    }
    
    .comparison-table {
        min-width: 500px;
        width: 100%;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }
    
    .comparison-table th:first-child,
    .comparison-table td:first-child {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        position: sticky;
        left: 0;
        background: var(--bg-card);
        z-index: 2;
        min-width: 100px;
        max-width: 120px;
        white-space: normal;
        font-size: 0.7rem;
    }
    
    .comparison-table thead th:first-child {
        background: var(--accent-blue);
    }
    
    .demo-container {
        padding: 2rem 1.5rem;
    }

    .demo-form {
        flex-direction: column;
        align-items: center;
    }

    .demo-form input {
        width: 100%;
        max-width: 300px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .morph-shape {
        display: none;
    }

    .carousel-inner {
        height: 250px;
    }
    
    .screenshot-mockup {
        padding: 0.5rem;
    }
    
    .hero-visual {
        width: 100%;
        max-width: 100%;
    }
    
    .screenshot-container {
        margin: 0 -1.5rem;
        border-radius: 0;
    }

    .nav-right .lang-selector,
    .nav-right .nav-cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 6rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .screenshot-container {
        margin: 0 -1rem;
    }
    
    .screenshot-mockup {
        padding: 0.35rem;
    }
    
    .carousel-inner {
        height: 200px;
    }
    
    .comparison-table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .comparison-table {
        min-width: 450px;
        font-size: 0.7rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.4rem 0.2rem;
        font-size: 0.7rem;
    }
    
    .comparison-table th:first-child,
    .comparison-table td:first-child {
        min-width: 80px;
        max-width: 100px;
        font-size: 0.65rem;
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }

    .comparison-table .price-row td {
        font-size: 1rem;
    }
    
    .comparison-table th.featured-col::before {
        font-size: 0.55rem;
        padding: 0.1rem 0.4rem;
    }
}

/* ========================================================================
   PAGES SECONDAIRES ET CYCLE DE VIE
   Ajouts pour la refonte : parcours avant-projet -> vie serie, pages
   Fonctionnalites / Tarifs / Nouveautes / textes legaux.
   ======================================================================== */

/* Sans JavaScript, les titres et cartes restent a opacite nulle : la page
   paraitrait vide. On les force visibles. */
.no-js h2,
.no-js .section-tag,
.no-js .feature-card,
.no-js .phase-card { opacity: 1 !important; transform: none !important; }

/* ---------- En-tete des pages secondaires ---------- */
.page-hero {
    padding: 9rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.page-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Lien de navigation de la page courante. */
.nav-links a.current { color: var(--accent-blue); font-weight: 700; }
.nav-links a.current::after { width: 100%; }

/* ---------- Le parcours : avant-projet, etude, mise au point, vie serie ---------- */
.lifecycle { padding: 6rem 2rem; background: var(--bg-light); }

.lifecycle-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.phase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(40px);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.phase-card.visible { animation: fadeInUp 0.6s ease forwards; }
.phase-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* Le numero d'etape : c'est lui qui fait lire les cartes dans l'ordre. */
.phase-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.phase-card h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.phase-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

.phase-tools {
    list-style: none;
    border-top: 1px solid var(--border-light);
    padding-top: 0.9rem;
}

.phase-tools li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 0.22rem 0 0.22rem 1.1rem;
    position: relative;
}

.phase-tools li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-blue-light);
}

/* ---------- Fonctionnalites groupees par theme ---------- */
.feature-group { max-width: 1200px; margin: 0 auto 4.5rem; }

.feature-group-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
}

.feature-group-header h2 {
    font-size: 1.6rem;
    opacity: 1;
    transform: none;
}

.feature-group-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Marque des nouveautes : elle attire l'oeil sans crier. */
.badge-new {
    display: inline-block;
    background: var(--accent-green);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* ---------- Figures et captures ---------- */
.shot {
    max-width: 1000px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.shot img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.shot figcaption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.9rem;
    font-style: italic;
}

/* Emplacement d'image a remplacer. Volontairement visible : une capture
   provisoire qu'on oublie de changer coute plus cher qu'un cadre vide. */
.shot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    border: 2px dashed var(--border-medium);
    border-radius: 14px;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    padding: 2rem;
}

/* ---------- Nouveautes ---------- */
.release { max-width: 860px; margin: 0 auto 3rem; }

.release-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.release-version {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.release-date { color: var(--text-muted); font-size: 0.9rem; }

.release ul { list-style: none; }

.release li {
    padding: 0.55rem 0 0.55rem 1.6rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.65;
    border-bottom: 1px solid var(--border-light);
}

.release li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}

.release li strong { color: var(--text-primary); }

/* ---------- Textes legaux ---------- */
.legal {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

.legal h2 {
    font-size: 1.4rem;
    margin: 2.5rem 0 0.9rem;
    opacity: 1;
    transform: none;
}

.legal h2:first-of-type { margin-top: 0; }

.legal p, .legal li {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.9rem;
}

.legal ul { padding-left: 1.4rem; }
.legal li { margin-bottom: 0.4rem; }

/* Ce qui reste a completer : impossible de publier sans le voir. */
.to-complete {
    background: #fef3c7;
    border: 1px solid var(--accent-orange);
    border-radius: 8px;
    padding: 0.15rem 0.4rem;
    color: #92400e;
    font-weight: 600;
}

/* ---------- Appel a l'action de fin de page ---------- */
.cta-band {
    background: var(--accent-blue);
    color: #fff;
    text-align: center;
    padding: 4.5rem 2rem;
}

.cta-band h2 { color: #fff; opacity: 1; transform: none; }

.cta-band p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 620px;
    margin: 1rem auto 2rem;
    line-height: 1.7;
}

.cta-band .btn-primary {
    background: #fff;
    color: var(--accent-blue) !important;
}

/* ---------- Adaptation aux petits ecrans ---------- */
@media (max-width: 1024px) {
    .lifecycle-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .lifecycle-grid { grid-template-columns: 1fr; }
    .page-hero { padding: 7rem 1.25rem 3rem; }
    .page-hero h1 { font-size: 1.9rem; }
    .feature-group-header { flex-direction: column; gap: 0.3rem; }
}
