/* 
 * style.css - Fichier CSS principal pour Devolim
 * Contient tous les styles communs à toutes les pages
 */

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

/* ========== Variables CSS ========== */
:root {
    /* Couleurs principales */
    --primary: #5B6CFF;
    --primary-dark: #4A5BF0;
    --secondary: #1A1A2E;
    --accent: #00D9FF;
    --bg-light: #F8F9FA;
    --bg-dark: #0F0F1E;
    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-light: #B2BEC3;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --gradient-hover: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    
    /* Typographie */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-primary);
    background-color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ========== Layout ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== Buttons ========== */
.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(91, 108, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(91, 108, 255, 0.4);
}

.btn-secondary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* ========== Header Styles ========== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(91, 108, 255, 0.05) 0%, 
        rgba(0, 217, 255, 0.05) 50%, 
        rgba(91, 108, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.header.scrolled::before {
    opacity: 1;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Logo */
.logo-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    z-index: 10;
    padding: 0.5rem;
    border-radius: 12px;
    transition: background 0.3s ease;
}

.logo-wrapper:hover {
    background: rgba(91, 108, 255, 0.05);
}

.logo-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 2px 8px rgba(91, 108, 255, 0.2));
}

.logo-wrapper:hover .logo-img {
    transform: rotate(360deg) scale(1.1);
    filter: drop-shadow(0 4px 16px rgba(91, 108, 255, 0.4));
}

/* Navigation */
.nav-links {
    display: flex;
    list-style: none;
    gap: 0.8rem;
    align-items: center;
}

.nav-link-wrapper {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
    display: block;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    opacity: 0.08;
}

.nav-link.active {
    color: var(--primary);
    background: rgba(91, 108, 255, 0.08);
}

/* CTA Button */
.cta-button {
    background: var(--gradient);
    color: var(--white) !important;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(91, 108, 255, 0.25);
    margin-left: 1rem;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.5s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(91, 108, 255, 0.35);
}

.cta-button:hover::before {
    left: 100%;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    width: 30px;
    height: 24px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.burger-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    left: 0;
}

.burger-line:nth-child(1) {
    top: 0;
}

.burger-line:nth-child(2) {
    top: 10px;
    width: 80%;
}

.burger-line:nth-child(3) {
    top: 20px;
    width: 60%;
}

.mobile-menu-toggle:hover .burger-line:nth-child(2) {
    width: 100%;
}

.mobile-menu-toggle:hover .burger-line:nth-child(3) {
    width: 100%;
}

.mobile-menu-toggle.active .burger-line:nth-child(1) {
    transform: rotate(45deg);
    top: 10px;
}

.mobile-menu-toggle.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active .burger-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 10px;
    width: 100%;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 249, 250, 0.95) 100%);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999;
    padding-top: 6rem;
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-links {
    list-style: none;
    padding: 0 2rem;
}

.mobile-nav-links li {
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateX(20px);
    animation: slideIn 0.4s ease forwards;
}

.mobile-nav.active .mobile-nav-links li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav-links li:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav-links li:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav-links li:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav-links li:nth-child(4) { animation-delay: 0.25s; }
.mobile-nav-links li:nth-child(5) { animation-delay: 0.3s; }
.mobile-nav-links li:nth-child(6) { animation-delay: 0.35s; }
.mobile-nav-links li:nth-child(7) { animation-delay: 0.4s; }

.mobile-nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    display: block;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mobile-nav-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 0;
    background: var(--gradient);
    transition: height 0.3s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: rgba(91, 108, 255, 0.08);
    padding-left: 2rem;
}

.mobile-nav-links a:hover::before,
.mobile-nav-links a.active::before {
    height: 100%;
}

.mobile-nav-links .cta-button {
    display: inline-block;
    text-align: center;
    margin: 2rem 1.5rem;
    width: calc(100% - 3rem);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 26, 46, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    backdrop-filter: blur(5px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== Footer Styles ========== */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--white);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient);
}

/* About Section */
.footer-about {
    grid-column: span 2;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

.footer-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.4rem;
    font-weight: bold;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.footer-about p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.footer-about .badges {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Links Lists */
.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* Contact Section */
.footer-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.footer-contact-item h4 {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.footer-contact-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.footer-contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-item a:hover {
    color: var(--primary);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--gradient);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(91, 108, 255, 0.3);
}

/* Newsletter Section */
.newsletter {
    background: rgba(91, 108, 255, 0.05);
    border: 1px solid rgba(91, 108, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.newsletter h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.newsletter p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    color: var(--white);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: var(--text-light);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-button {
    padding: 0.8rem 2rem;
    background: var(--gradient);
    border: none;
    border-radius: 50px;
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(91, 108, 255, 0.3);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
    margin: 0;
}

.footer-bottom-links li::after {
    content: '•';
    color: var(--text-light);
    margin-left: 1.5rem;
    opacity: 0.5;
}

.footer-bottom-links li:last-child::after {
    display: none;
}

.footer-bottom-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-bottom-links a:hover {
    color: var(--primary);
}

.copyright {
    color: var(--text-light);
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* Loading animation for logo */
@keyframes logoLoad {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

.logo-img {
    animation: logoLoad 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* ========== Responsive Design ========== */
@media (max-width: 968px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-container {
        padding: 1rem 4%;
    }
    
    .container {
        padding: 0 4%;
    }
    
    .footer-about {
        grid-column: span 1;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }
    
    .footer-bottom-links li::after {
        margin-left: 1rem;
    }
    
    .copyright {
        white-space: normal;
    }
}

@media (max-width: 568px) {
    .nav-container {
        padding: 0.8rem 3%;
    }
    
    .logo-img {
        width: 42px;
        height: 42px;
    }
    
    .container {
        padding: 0 3%;
    }
    
    h1 { font-size: clamp(2rem, 6vw, 3rem); }
    h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
    h3 { font-size: clamp(1.2rem, 4vw, 1.8rem); }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        padding-top: 3rem;
    }
    
    .badges {
        flex-wrap: wrap;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .footer-bottom-links li::after {
        display: none;
    }
}

@media (max-width: 375px) {
    .logo-img {
        width: 38px;
        height: 38px;
    }
    
    .mobile-menu-toggle {
        width: 26px;
        height: 20px;
    }
    
    .mobile-menu-toggle .burger-line:nth-child(2) {
        top: 8px;
    }
    
    .mobile-menu-toggle .burger-line:nth-child(3) {
        top: 16px;
    }
}

/* ========== Utilities ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

/* ========== Loading States ========== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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