/*
Theme Name: Insuffle v2 - Radical
Author: Antigravity
Description: Theme based on Insuffle HTML template.
Version: 1.1
*/

/* === GLOBAL & UTILS (Rotation fix: ensure no global transform on main containers) === */
body {
    color: #F8FAFC;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    font-family: 'Poppins', sans-serif;
}

.grain {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #02040a;
}

::-webkit-scrollbar-thumb {
    background: #1f3a8b;
    border-radius: 10px;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-glass {
    background: rgba(2, 4, 10, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 9999;
}

/* === POST-IT WALL === */
.fog-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.postit {
    position: absolute;
    background-color: #ffde59;
    color: #02040a;
    padding: 1.2rem;
    width: 210px;
    height: auto;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
    opacity: 0;
    animation: pop-in 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, float-subtle 4s ease-in-out infinite alternate;
    clip-path: polygon(0% 0%, 100% 0%, 100% 90%, 90% 100%, 0% 100%);
    z-index: 10;
}

@keyframes pop-in {
    from {
        transform: scale(0.5) rotate(var(--rot));
        opacity: 0;
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(var(--rot));
    }
}

.p-1 {
    top: 15%;
    left: 8%;
    --rot: -2deg;
    animation-delay: 0.1s;
}

.p-2 {
    top: 35%;
    left: 4%;
    --rot: 1deg;
    animation-delay: 0.3s;
}

.p-3 {
    top: 60%;
    left: 10%;
    --rot: -3deg;
    animation-delay: 0.5s;
}

.p-4 {
    bottom: 10%;
    left: 5%;
    --rot: 2deg;
    animation-delay: 0.7s;
}

.p-5 {
    top: 18%;
    right: 7%;
    --rot: 1deg;
    animation-delay: 0.2s;
}

.p-6 {
    top: 40%;
    right: 3%;
    --rot: -1deg;
    animation-delay: 0.4s;
}

.p-7 {
    top: 65%;
    right: 9%;
    --rot: 3deg;
    animation-delay: 0.6s;
}

.p-8 {
    bottom: 12%;
    right: 4%;
    --rot: -2deg;
    animation-delay: 0.8s;
}

@media (max-width: 1024px) {
    .postit {
        display: none;
    }
}

/* === RADAR SYSTEM (FIXED ANIMATION) === */
.radar-system {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    margin: 0 auto;
    border-radius: 50%;
    background: #080f1f;
    border: 1px solid rgba(31, 58, 139, 0.5);
    box-shadow: 0 0 100px -20px rgba(31, 58, 139, 0.4);
    overflow: visible;
    transform-origin: center center;
}

.radar-scan-wrapper {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
}

.radar-scan {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            transparent 0deg, transparent 270deg,
            rgba(31, 58, 139, 0.1) 320deg,
            rgba(255, 222, 89, 0.6) 350deg,
            rgba(255, 255, 255, 0.8) 355deg,
            transparent 360deg);
    animation: radar-spin 3s linear infinite;
    z-index: 10;
}

.radar-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(31, 58, 139, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

.radar-ring {
    position: absolute;
    border: 1px solid rgba(31, 58, 139, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.radar-axis {
    position: absolute;
    background: rgba(31, 58, 139, 0.3);
    z-index: 0;
}

/* POINTS CARDINAUX (FIXED VISIBILITY) */
.c-point {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    z-index: 50;
    padding: 0.5rem;
    background: #080f1f;
    border-radius: 0.25rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transform: translate(var(--translateX, 0), var(--translateY, 0));
}

.c-point:hover {
    transform: translate(var(--translateX, 0), var(--translateY, 0)) scale(1.15);
    z-index: 60;
}

.c-badge {
    width: 54px;
    height: 54px;
    background: #1f3a8b;
    border: 2px solid #ffde59;
    border-radius: 50%;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(31, 58, 139, 0.3);
    margin-bottom: 8px;
    position: relative;
    transition: all 0.3s;
}

/* POSITIONNEMENT FINAL DES POINTS CARDINAUX (Hors du cercle) */
.pos-n {
    top: -40px;
    left: 50%;
    --translateX: -50%;
    --translateY: 0;
}

.pos-s {
    bottom: -40px;
    left: 50%;
    --translateX: -50%;
    --translateY: 0;
}

.pos-e {
    right: -80px;
    top: 50%;
    --translateX: 0;
    --translateY: -50%;
}

.pos-w {
    left: -80px;
    top: 50%;
    --translateX: 0;
    --translateY: -50%;
}

@media (max-width: 640px) {
    .pos-n {
        top: -20px;
    }

    .pos-s {
        bottom: -20px;
    }

    .pos-e {
        right: -50px;
    }

    .pos-w {
        left: -50px;
    }
}

/* === ODCT STICKY STACK FIX === */
.odct-stack-container {
    min-height: 250vh;
}

.odct-card {
    position: sticky;
    padding: 2rem 3rem;
    margin-top: 5rem;
    border-radius: 0.25rem;
    transform: translateZ(0);
    width: 100%;
}

#phase-1 {
    top: 120px;
    z-index: 10;
}

#phase-2 {
    top: 160px;
    z-index: 20;
}

#phase-3 {
    top: 200px;
    z-index: 30;
}

#phase-4 {
    top: 240px;
    z-index: 40;
}

/* === PORTES FIXES & VERBATIMS === */
.door-card {
    min-height: 400px;
    position: relative;
    overflow: hidden;
    background: #0c1629;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
}

.door-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    z-index: 20;
}

.door-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

.door-card:hover::before {
    transform: scaleX(1);
}

.door-overlay {
    background: linear-gradient(to top, #02040a 10%, rgba(2, 4, 10, 0.95) 50%, rgba(2, 4, 10, 0.3) 100%);
}

.door-content-wrapper {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    max-height: 0;
    opacity: 0;
    transform: translateY(20px);
    padding-top: 0;
    overflow: hidden;
}

.door-card:hover .door-content-wrapper {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
    padding-top: 1.5rem;
}

.door-content-visible {
    flex-grow: 1;
    padding-bottom: 2rem;
}

.verbatim-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

/* === FINAL CTA MONOLITHE (Coherent with brand colors) === */
.cta-final {
    background-color: #0c1629;
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
    border-top: 4px solid #1f3a8b;
    border-bottom: 4px solid #1f3a8b;
    margin-bottom: 0;
}

.cta-box {
    background: #02040a;
    color: #fff;
    padding: 4rem 3rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 4px solid #1f3a8b;
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.cta-scan {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, transparent 50%, rgba(31, 58, 139, 0.05) 50%, transparent 100%), linear-gradient(90deg, transparent 50%, rgba(31, 58, 139, 0.05) 50%, transparent 100%);
    background-size: 50px 50px;
    opacity: 0.5;
    animation: pattern-move 60s linear infinite;
}

.cta-glow {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: #ffde59;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: float 10s ease-in-out infinite;
}

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

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

.animate-spin-slow {
    animation: spin 20s linear infinite;
}

@keyframes float {

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

    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: marquee 20s linear infinite;
}

.animate-marquee-slow {
    animation: marquee 40s linear infinite;
}

/* === GUTENBERG BLOCK STYLES (Adapted for White Background in Blog) === */
.wp-block-button__link {
    background-color: #1f3a8b;
    color: #ffffff;
    border-radius: 0.25rem;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    text-decoration: none;
}

.wp-block-button__link:hover {
    background-color: #ffde59;
    color: #02040a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 222, 89, 0.3);
}

.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid #1f3a8b;
    /* Darker for white bg */
    color: #1f3a8b;
}

.is-style-outline .wp-block-button__link:hover {
    background-color: #1f3a8b;
    color: #ffffff;
}

.wp-block-quote {
    border-left: 4px solid #ffde59;
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f8fafc;
    /* Light gray background */
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #0f172a;
    /* Slate 900 for text */
    position: relative;
}

.wp-block-quote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -1rem;
    left: 0.5rem;
    color: #ffde59;
    opacity: 0.5;
    font-family: serif;
    line-height: 1;
}

.wp-block-quote p {
    color: #0f172a;
    /* Slate 900 */
    font-size: 1.125rem;
    line-height: 1.6;
    font-weight: 500;
}

.wp-block-quote cite {
    color: #64748b;
    font-style: normal;
    font-size: 0.875rem;
    display: block;
    margin-top: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wp-block-cover {
    border-radius: 0.5rem;
    overflow: hidden;
}

.wp-block-cover .wp-block-cover__inner-container {
    color: #ffffff;
}

.wp-block-separator {
    border-color: #e2e8f0;
}

/* Entry Content Typography (Dark on White - High Contrast) - ONLY for Single Posts */
.single-post .entry-content h1 {
    font-size: 2.5rem !important;
    /* 40px */
    font-weight: 800;
    margin-top: 3.5rem;
    margin-bottom: 1.5rem;
    color: #02040a !important;
    line-height: 1.1;
}

.single-post .entry-content h2,
.single-post .entry-content .wp-block-heading {
    font-size: 2rem !important;
    /* 32px */
    font-weight: 800;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #02040a !important;
    line-height: 1.2;
}

.single-post .entry-content h3 {
    font-size: 1.5rem !important;
    /* 24px */
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #02040a !important;
}

.single-post .entry-content h4,
.single-post .entry-content h5,
.single-post .entry-content h6 {
    font-size: 1.25rem !important;
    /* 20px */
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #02040a !important;
}

.entry-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #334155;
    /* Slate 700 - Dark Grey */
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: #334155;
}

.entry-content ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.entry-content ol li {
    list-style-type: decimal;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.entry-content strong {
    color: #02040a;
    font-weight: 700;
}

.entry-content a {
    color: #1f3a8b;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    transition: all 0.2s;
}

.entry-content a:hover {
    color: #ffde59;
    background-color: #02040a;
    text-decoration: none;
}

/* === UTILITIES === */
.text-brand-dark {
    color: #02040a !important;
}

.text-brand-primary {
    color: #1f3a8b !important;
}

.text-brand-primaryLight {
    color: #3b82f6 !important;
}

/* === EDITOR STYLES OVERRIDES === */
.editor-styles-wrapper {
    background-color: #ffffff !important;
    /* Force white background */
    padding: 2rem !important;
    /* Add some breathing room */
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6,
.editor-styles-wrapper p,
.editor-styles-wrapper li,
.editor-styles-wrapper blockquote {
    color: #02040a !important;
    /* Force dark text in editor */
}

.editor-styles-wrapper .wp-block-heading {
    color: #02040a !important;
}

.editor-styles-wrapper a {
    color: #1f3a8b !important;
}