/* ========================================
   ZIRI.FR - Style Moderne Spatial
   Design inspiré effet nébuleuse
   ======================================== */

/* Variables CSS */
:root {
    --color-primary: #ffffff;
    --color-secondary: #b8c5d6;
    --color-accent: #4d7cfe;
    --color-accent-light: #6b9aff;
    --bg-dark: #0a1628;
    --bg-darker: #000000;
    --border-glow: rgba(77, 124, 254, 0.4);
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-primary);
    background: var(--bg-darker);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* Canvas Starfield en arrière-plan */
#starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Background effet nébuleuse spatiale réaliste */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Nuages de gaz bleus - opacité très réduite */
        radial-gradient(ellipse 1800px 600px at 15% 20%, rgba(47, 116, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 1400px 800px at 5% 60%, rgba(77, 124, 254, 0.06) 0%, transparent 55%),

        /* Nuages violets/pourpres - opacité très réduite */
        radial-gradient(ellipse 1200px 900px at 85% 30%, rgba(138, 91, 229, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 1000px 700px at 90% 70%, rgba(154, 82, 224, 0.05) 0%, transparent 55%),

        /* Nuages turquoise/cyan - opacité très réduite */
        radial-gradient(ellipse 900px 1100px at 50% 80%, rgba(64, 224, 208, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 1100px 500px at 60% 10%, rgba(100, 200, 255, 0.05) 0%, transparent 55%),

        /* Zones lumineuses diffuses - opacité très réduite */
        radial-gradient(circle 600px at 25% 45%, rgba(154, 192, 255, 0.03) 0%, transparent 65%),
        radial-gradient(circle 500px at 75% 55%, rgba(180, 140, 255, 0.03) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* Étoiles animées */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 60%, white, transparent),
        radial-gradient(1px 1px at 70% 40%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    opacity: 0.4;
    animation: twinkle 8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Grain texture animé (effet nébuleuse) */
main::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.15"/></svg>');
    background-size: 300px 300px;
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
    animation: grain 8s steps(10) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 35%); }
    90% { transform: translate(-10%, 10%); }
}

/* Typography */
h1, h2, h3 {
    color: var(--color-primary);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1rem;
    color: var(--color-secondary);
    line-height: 1.8;
}

strong {
    color: var(--color-primary);
    font-weight: 600;
}

a {
    color: var(--color-accent-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(77, 124, 254, 0.1);
}

nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

.cta {
    padding: 0.75rem 1.75rem;
    background: transparent;
    color: var(--color-primary);
    border-radius: 8px;
    border: 1px solid rgba(77, 124, 254, 0.3);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.cta:hover {
    background: rgba(77, 124, 254, 0.1);
    border-color: rgba(77, 124, 254, 0.5);
    box-shadow: 0 0 20px rgba(77, 124, 254, 0.2);
}

/* Main Content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

/* Sections */
section {
    margin-bottom: 4rem;
}

/* Glassmorphism Card - Style ultra transparent */
.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(5px) saturate(180%);
    -webkit-backdrop-filter: blur(5px) saturate(180%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 3rem;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        0 0 80px 0 rgba(77, 124, 254, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.glass:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow:
        0 12px 48px 0 rgba(0, 0, 0, 0.6),
        0 0 100px 0 rgba(77, 124, 254, 0.3),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 5rem;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.intro {
    font-size: 1.2rem;
    color: var(--color-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

/* Almaweb Section */
.almaweb {
    margin-bottom: 4rem;
}

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

.almaweb h2 {
    color: var(--color-primary);
}

.almaweb p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: var(--color-secondary);
}

.btn-almaweb {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--color-primary);
    border-radius: 10px;
    border: 1px solid rgba(77, 124, 254, 0.4);
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-almaweb:hover {
    background: rgba(77, 124, 254, 0.15);
    border-color: rgba(77, 124, 254, 0.6);
    box-shadow: 0 0 25px rgba(77, 124, 254, 0.3);
    transform: translateY(-2px);
}

/* About Section */
.about-content {
    max-width: 100%;
}

.about h2 {
    color: var(--color-primary);
}

.about p {
    font-size: 1.1rem;
    color: var(--color-secondary);
}

.services {
    list-style: none;
    margin-top: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.services li {
    padding: 1.5rem;
    background: rgba(15, 28, 50, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(77, 124, 254, 0.2);
    color: var(--color-secondary);
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.services li:hover {
    background: rgba(15, 28, 50, 0.5);
    border-color: rgba(77, 124, 254, 0.4);
    box-shadow: 0 4px 20px rgba(77, 124, 254, 0.15);
    transform: translateY(-2px);
}

/* Contact Section */
.contact {
    max-width: 700px;
    margin: 0 auto;
}

/* Alert Messages */
.alert {
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.6;
    animation: slideIn 0.4s ease;
}

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

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-error p {
    margin-bottom: 0.5rem;
    color: #fca5a5;
}

.alert-error p:last-child {
    margin-bottom: 0;
}

.contact h2 {
    text-align: center;
    color: var(--color-primary);
}

.contact-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

input,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 28, 50, 0.4);
    border: 1px solid rgba(77, 124, 254, 0.3);
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--color-primary);
    transition: all 0.3s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(184, 197, 214, 0.4);
}

input:focus,
textarea:focus {
    outline: none;
    background: rgba(15, 28, 50, 0.6);
    border-color: rgba(77, 124, 254, 0.6);
    box-shadow: 0 0 20px rgba(77, 124, 254, 0.2);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

.btn-submit {
    width: 100%;
    padding: 1.25rem;
    background: transparent;
    color: var(--color-primary);
    border: 1px solid rgba(77, 124, 254, 0.4);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-submit:hover:not(:disabled) {
    background: rgba(77, 124, 254, 0.15);
    border-color: rgba(77, 124, 254, 0.6);
    box-shadow: 0 0 25px rgba(77, 124, 254, 0.3);
    transform: translateY(-2px);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Spinner de chargement */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

/* Footer */
footer {
    margin-top: 6rem;
    background: rgba(10, 22, 40, 0.6);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(77, 124, 254, 0.1);
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.75rem;
    color: var(--color-secondary);
    font-size: 1rem;
}

.footer-content a {
    color: var(--color-accent-light);
    font-weight: 600;
}

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

.footer-nav {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.footer-nav a {
    color: var(--color-secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.copyright {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(184, 197, 214, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    nav {
        padding: 1.25rem 1.5rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .cta {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }

    main {
        padding: 80px 1.5rem 0;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .glass {
        padding: 2rem;
        border-radius: 16px;
    }

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

    .footer-nav {
        flex-direction: column;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }

    .intro {
        font-size: 1.1rem;
    }

    .glass {
        padding: 1.75rem;
        border-radius: 14px;
    }

    main {
        padding: 80px 1rem 0;
    }
}
