/* ==========================================================================
   POLYMA — style.css
   Unified stylesheet for index.html & formulaire.html
   ========================================================================== */

/* ==================== Reset ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

img,
picture,
svg,
video {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
}

/* ==================== Variables ==================== */
:root {
    --bg-color: #09090b;
    --bg-elevated: #18181b;
    --text-primary: #fafafa;
    --text-muted: #a1a1aa;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.5);
    --border-color: #27272a;
    --border-highlight: rgba(255, 255, 255, 0.1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-serif: 'Instrument Serif', serif;
    --ease-out-smooth: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-interactive: cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --section-padding: 8rem;
    --mouse-x: 50vw;
    --mouse-y: 50vh;
}

/* ==================== Global ==================== */
body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    font-size: 16px;
    position: relative;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding) 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.section-header .section-title {
    margin-bottom: 1rem;
}

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

.dramatic-text {
    font-family: var(--font-heading);
    font-weight: 700;
}

.utility-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.accent {
    color: var(--accent);
}

.dramatic-text.light {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 1rem 0;
}

.w-full {
    width: 100%;
}

.mt-4 {
    margin-top: 1rem;
}

.opacity-70 {
    opacity: 0.7;
}

.icon-sm {
    width: 18px;
    height: 18px;
}

/* ==================== Buttons (shared) ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s var(--ease-interactive);
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    background-color: #e4e4e7;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.btn-outline {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background-color: rgba(24, 24, 27, 0.5);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    border-color: var(--border-highlight);
    background-color: rgba(24, 24, 27, 0.8);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==================== Background & Blobs (shared) ==================== */
.fixed-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #050505;
    overflow: hidden;
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(128, 128, 128, 0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(128, 128, 128, 0.07) 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 0;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #050505, transparent);
    z-index: 0;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

.blob-1 {
    background-color: #2563eb;
    width: 500px;
    height: 500px;
    top: -5rem;
    right: -5rem;
    animation: pulse 10s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.blob-2 {
    background-color: #c026d3;
    width: 600px;
    height: 600px;
    bottom: -10rem;
    left: -5rem;
    opacity: 0.2;
}

.blob-3 {
    background-color: #06b6d4;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.1;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.2;
        transform: scale(1.05);
    }
}

/* ==================== Glow Card (shared) ==================== */
.glow-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    --x: 50%;
    --y: 50%;
}

.glow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--x) var(--y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-interactive);
    z-index: 1;
    pointer-events: none;
}

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

.card-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    z-index: 2;
    pointer-events: none;
}

.glow-card:hover .card-border {
    border-color: rgba(255, 255, 255, 0.1);
}

.card-content {
    position: relative;
    padding: 2.5rem;
    z-index: 3;
}

/* ==================== Reveal on Scroll (shared) ==================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out-smooth), transform 0.8s var(--ease-out-smooth);
}

/* ==================== Animated CTA Button (shared) ==================== */
.animated-cta-btn {
    display: inline-flex;
    position: relative;
    align-items: center;
    justify-content: center;
    padding: 1px;
    border-radius: 9999px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 320px;
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
}

.animated-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.1);
}

.animated-cta-btn .cta-spin-border {
    position: absolute;
    inset: -100%;
    animation: spin 3s linear infinite;
    background: conic-gradient(from 90deg at 50% 50%, transparent 0%, transparent 75%, #ffffff 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.animated-cta-btn:hover .cta-spin-border {
    opacity: 1;
}

.animated-cta-btn .cta-bg-layer {
    position: absolute;
    inset: 0;
    background-color: var(--accent);
    border-radius: 9999px;
    transition: opacity 0.3s ease;
}

.animated-cta-btn:hover .cta-bg-layer {
    opacity: 0;
}

.animated-cta-btn .cta-content-layer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: color 0.3s ease, background-color 0.3s ease;
    color: #ffffff;
    background-color: var(--accent);
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.animated-cta-btn:hover .cta-content-layer {
    color: #ffffff;
}

.animated-cta-btn svg {
    transition: transform 0.3s ease;
}

.animated-cta-btn:hover svg {
    transform: translateX(2px);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   INDEX.HTML — Landing Page Specific
   ========================================================================== */

/* ==================== Curtain ==================== */
#curtain {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.panel {
    width: 20%;
    height: 100%;
    background-color: #09090b;
    border-right: 1px solid #18181b;
    transform: translateY(0);
    will-change: transform;
}

.curtain-active .panel {
    transform: translateY(-100%);
    transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1);
    transition-delay: calc(var(--i) * 100ms);
}

/* ==================== Hero SVG Drawing ==================== */
.hero-svg {
    width: 8rem;
    height: 8rem;
    margin: 0 auto 1rem auto;
    color: var(--text-primary);
    opacity: 0.9;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.hero-svg svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.path {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    fill-opacity: 0;
}

.draw-active .path {
    stroke-dashoffset: 0;
    fill-opacity: 1;
    transition: stroke-dashoffset 2.5s ease-in-out, fill-opacity 1s ease-in-out 2s;
}

/* ==================== 3D Card ==================== */
.perspective-container {
    perspective: 1000px;
}

.card-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(2deg);
}

/* ==================== Hero Section ==================== */
.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.tag i {
    width: 14px;
    height: 14px;
    color: inherit;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
}

.hero-title .title-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: #e5e5e5;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-actions .subtext {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==================== Floating Pigments ==================== */
.floating-pigment {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: float-pigment 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 5px var(--accent));
}

@keyframes float-pigment {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0.1;
    }

    25% {
        transform: translateY(-15px) translateX(8px);
        opacity: 0.7;
    }

    50% {
        transform: translateY(-5px) translateX(-4px);
        opacity: 0.3;
    }

    75% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.9;
    }
}

/* ==================== Polyma Logo ==================== */
.polyma-logo-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInDown 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

.polyma-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(99, 180, 150, 0.4));
}

.polyma-wordmark {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: -0.04em;
    color: #fafafa;
    line-height: 1;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* ==================== Landing Page Layout ==================== */
.landing-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 1.5rem;
    overflow: hidden;
}

.landing-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 10;
}

.landing-content .hero-title {
    margin-bottom: 1.5rem;
    animation-delay: 0.2s;
}

.landing-content .hero-description {
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation-delay: 0.3s;
}

.landing-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    animation-delay: 0.4s;
    width: 100%;
}

@media (min-width: 640px) {
    .landing-actions {
        flex-direction: row;
        gap: 1rem;
    }
}

.landing-actions .animated-cta-btn {
    width: 100%;
    justify-content: center;
}

.landing-actions .btn-outline {
    width: 100%;
    border-radius: 999px;
    padding: 0.8rem 2rem;
    font-family: var(--font-sans);
}

@media (min-width: 640px) {

    .landing-actions .animated-cta-btn,
    .landing-actions .btn-outline {
        width: auto;
    }
}

/* ==========================================================================
   FORMULAIRE.HTML — Contact Page Specific
   ========================================================================== */

/* ==================== Badge ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    color: #f5f5f5;
    margin-bottom: 1.5rem;
}

/* ==================== Form Page Titles ==================== */
.title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.title-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 500;
    color: #e5e5e5;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 650px;
    margin: 0 auto;
}

/* ==================== Grid Layout ==================== */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 4rem;
}

@media(min-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==================== Glass Panel ==================== */
.glass-panel {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #fff;
}

/* ==================== Form Styles ==================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media(min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d4d4d8;
    margin-bottom: 0.5rem;
}

input,
textarea {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    color: #f5f5f5;
    font-family: var(--font-sans);
    transition: all 0.2s;
    outline: none;
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #a1a1aa;
}

input:focus,
textarea:focus {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.submit-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    color: #f5f5f5;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ==================== Contact Info Blocks ==================== */
.info-blocks {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.icon-box {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.info-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #fff;
}

.info-content p {
    color: #a1a1aa;
    font-size: 0.875rem;
}

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

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
    transition: all 0.2s;
}

.social-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* ==================== Copy Button ==================== */
.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a1aa;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
}

.copy-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    color: #86efac;
    border-color: #86efac;
    background: rgba(134, 239, 172, 0.1);
}

/* ==================== Back Button ==================== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--text-primary);
}

/* ==================== Bottom Glow ==================== */
.bottom-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2rem;
    background: radial-gradient(ellipse 80% 100% at 50% 100%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 30%, transparent 70%);
    pointer-events: none;
}

.bottom-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

/* ==================== Formulaire — Section ==================== */
/* Override .section & .container specifically for the form page */
.section.form-page-section {
    padding: 6rem 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section.form-page-section .container {
    max-width: 1000px;
    padding: 0 1.5rem;
}