/*
Theme Name: IA-II Sovereign
Theme URI: https://www.ia-ii.org/
Author: Antigravity
Description: Premium theme for the Association internationale sur l'impact des investissements. Based on the Sovereign Impact Identity design.
Version: 1.0.0
Tested up to: 6.5
Requires at least: 6.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: eaii-sovereign
Tags: full-site-editing, block-themes, custom-colors, custom-typography
*/
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Lato:wght@300;400;700&family=Inter:wght@400;500;600;700&display=swap');


/* Reset body margin/padding */
*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove all spacing injected by WP FSE around template parts */
.wp-site-blocks,
.wp-block-template-part,
header.wp-block-template-part,
main,
.wp-block-group.has-background {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wp-site-blocks > * {
    margin-block-start: 0 !important;
}

.wp-block-template-part:has(#eaii-nav) {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Force header background transparent - WP FSE peut injecter un fond blanc */
header#eaii-nav,
header.eaii-nav,
.wp-block-template-part > header,
header.wp-block-template-part {
    background: transparent !important;
    background-color: transparent !important;
}

/* Admin bar offset */
.admin-bar .eaii-nav { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .eaii-nav { top: 46px; }
}

/* Safety padding for main content due to fixed header 
   We default to 0 on main to allow Heros to bleed under the header. */
main, 
.wp-site-blocks > main,
main.wp-block-group {
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.home main.wp-block-group {
    font-size: 0 !important;
    line-height: 0 !important;
}

body.home main.wp-block-group > * {
    font-size: 16px;
    line-height: normal;
}

/* Ensure the very first block of content is flush */
main > *:first-child {
    margin-top: 0 !important;
}

/* Standard pages: clear the header if the first child isn't a hero.
   Added :not(div) to avoid hidden debug/marker elements. */
main.wp-block-group > *:first-child:not(.alignfull):not(.eaii-hero):not(.full-width):not(div) {
    padding-top: clamp(7rem, 10vh, 10rem);
}

/* Standard page template layout (e.g. Legal Notice, Privacy Policy) */
main.eaii-standard-page-main {
    padding-top: clamp(9rem, 14vh, 13rem) !important;
    padding-bottom: clamp(4rem, 8vh, 8rem) !important;
}

/* Overriding excessive utility paddings from patterns */
.py-40 {
    padding-top: clamp(4rem, 7vw, 7rem) !important;
    padding-bottom: clamp(4rem, 7vw, 7rem) !important;
}

section, 
.wp-block-group.alignfull, 
main > .wp-block-group, 
main > .wp-block-columns {
    margin-bottom: 4rem !important;
}

/* Remove margin on the last item to stick to footer */
main > *:last-child,
main > .alignfull:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 2rem !important; /* Minimal breathing room before footer */
}

/* Contact Form 7 Premium Styling */
.cf7-premium-container {
    --cf7-field-border: rgba(20, 30, 60, 0.08);
    --cf7-field-focus: #C9A96E; /* Tertiary Gold */
    --cf7-text: #141E3C;
}

.cf7-input {
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid var(--cf7-field-border) !important;
    padding: 1rem 0 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    color: var(--cf7-text) !important;
    border-radius: 0 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.cf7-input:focus {
    outline: none !important;
    border-bottom-color: var(--cf7-field-focus) !important;
    padding-left: 0.5rem !important; /* Elegant shift */
    background: linear-gradient(to bottom, transparent 90%, rgba(201, 169, 110, 0.05)) !important;
}

.cf7-input::placeholder {
    color: rgba(20, 30, 60, 0.15) !important;
    font-weight: 400;
    font-style: italic;
}

/* Label Styling */
.font-label {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 11px;
    color: rgba(20, 30, 60, 0.4);
    display: block;
    margin-bottom: 0.5rem;
}

/* Typographie éditoriale — Cinzel (titres institutionnels) */
.font-editorial {
    font-family: 'Cinzel', serif;
}
h1.font-editorial, .font-editorial:is(h1) {
    font-size: clamp(1.8rem, 3.4vw, 2.8rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em !important;
}
h2.font-editorial, .font-editorial:is(h2) {
    font-size: clamp(1.4rem, 2.6vw, 1.8rem) !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
}
h3.font-editorial, .font-editorial:is(h3) {
    font-size: clamp(1.15rem, 1.8vw, 1.35rem) !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
}

/* Typographie corps de texte — Montserrat */
.font-body {
    font-family: 'Montserrat', sans-serif;
}


/* Submit Button Override */
.cf7-premium-container [type="submit"] {
    appearance: none;
    -webkit-appearance: none;
    background: #141E3C !important;
    color: white !important;
    border: none !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    font-size: 0.9rem !important;
    padding: 1.25rem 2.5rem !important;
    cursor: pointer !important;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1) !important;
    margin-top: 1rem !important;
    border-radius: 5rem !important; /* Rounded for a modern clean pill look */
}

.cf7-premium-container [type="submit"]:hover {
    background: linear-gradient(100deg, #C9A96E 0%, #dfc87e 45%, #C9A96E 100%) !important;
    letter-spacing: 0.05em !important;
    box-shadow: 0 15px 40px rgba(201, 169, 110, 0.2) !important;
    transform: translateY(-3px) !important;
}

/* CF7 Response Messages */
.wpcf7-response-output {
    margin: 2rem 0 0 0 !important;
    border: 1px solid var(--cf7-field-border) !important;
    background: white !important;
    padding: 1.5rem !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    text-align: center !important;
    border-radius: 0 !important;
    color: var(--cf7-text) !important;
}

.wpcf7-mail-sent-ok {
    border-image: linear-gradient(100deg, #C9A96E 0%, #dfc87e 45%, #C9A96E 100%) 1 !important;
    background: linear-gradient(100deg, #C9A96E 0%, #dfc87e 45%, #C9A96E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   GLOBAL GOLDEN GRADIENT OVERRIDES
   ========================================================================== */

/* Overriding the default solid tertiary color (gold) with a gradient */

.has-tertiary-color, 
.text-tertiary, 
.eaii-h1-emphasis em,
.eaii-impact-number {
    background: linear-gradient(100deg, #C9A96E 0%, #dfc87e 45%, #C9A96E 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
}

.has-tertiary-background-color,
.bg-tertiary {
    background: linear-gradient(100deg, #C9A96E 0%, #dfc87e 45%, #C9A96E 100%) !important;
}

.wp-block-button__link.has-tertiary-background-color:hover {
    background: linear-gradient(100deg, #a88a51 0%, #C9A96E 45%, #a88a51 100%) !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE SAFETY LAYER
   ========================================================================== */

@media screen and (max-width: 767.98px) {
    html,
    body {
        width: 100%;
        overflow-x: hidden !important;
        scroll-behavior: auto !important;
    }

    body {
        -webkit-text-size-adjust: 100%;
    }

    .wp-site-blocks,
    main,
    .eaii-wrap,
    .wp-block-group,
    .wp-block-columns {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    section,
    .wp-block-group.alignfull,
    main > .wp-block-group,
    main > .wp-block-columns {
        margin-bottom: 2.5rem !important;
    }

    main > .alignfull:last-child,
    main > *:last-child {
        padding-bottom: 0 !important;
    }

    .py-40,
    .py-32 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .py-24 {
        padding-top: 3.5rem !important;
        padding-bottom: 3.5rem !important;
    }

    .px-12,
    .px-10,
    .px-8,
    .p-16,
    .p-12,
    .p-10,
    .p-8 {
        padding-left: 1.125rem !important;
        padding-right: 1.125rem !important;
    }

    .p-16,
    .p-12,
    .p-10,
    .p-8 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .gap-28,
    .gap-24,
    .gap-16,
    .gap-12,
    .gap-10,
    .gap-8 {
        gap: 1.5rem !important;
    }

    .mb-40,
    .mb-32,
    .mb-24,
    .mb-16,
    .mb-12 {
        margin-bottom: 2.5rem !important;
    }

    .mt-40,
    .mt-24 {
        margin-top: 2.5rem !important;
    }

    .pt-20 {
        padding-top: 0 !important;
    }

    .text-9xl,
    .text-8xl,
    .text-7xl,
    .text-6xl,
    .text-5xl,
    .md\:text-9xl,
    .md\:text-8xl,
    .md\:text-7xl,
    .md\:text-6xl,
    .md\:text-5xl {
        font-size: clamp(1.8rem, 8.5vw, 2.5rem) !important;
        line-height: 1.15 !important;
        letter-spacing: -0.02em !important;
    }

    .text-4xl,
    .text-3xl,
    .text-2xl,
    .md\:text-4xl {
        font-size: clamp(1.3rem, 6vw, 1.7rem) !important;
        line-height: 1.25 !important;
        letter-spacing: -0.01em !important;
    }

    .tracking-\[0\.4em\],
    .tracking-\[0\.3em\],
    .tracking-\[0\.25em\],
    .tracking-widest,
    .tracking-wide {
        letter-spacing: 0.08em !important;
    }

    .rounded-\[3rem\],
    .rounded-\[2\.5rem\],
    .rounded-\[2rem\],
    .rounded-3xl {
        border-radius: 1.25rem !important;
    }

    .min-h-screen,
    .h-screen,
    .hero-slider-container {
        min-height: auto !important;
        height: auto !important;
    }

    .parallax-bg {
        background-attachment: scroll !important;
        transform: none !important;
    }

    .animate-on-scroll,
    .parallax-bg,
    .js-counter {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .eaii-hero {
        min-height: 100svh !important;
    }

    .eaii-hero-body {
        min-height: 100svh !important;
        padding: 9.5rem 1.125rem 4rem !important;
    }

    .eaii-h1 {
        font-size: clamp(1.4rem, 6.5vw, 2.0rem) !important;
        line-height: 1.15 !important;
        letter-spacing: 0 !important;
        padding-right: 0 !important;
        overflow-wrap: anywhere;
    }

    .eaii-h1 .eaii-h1-emphasis {
        display: inline !important;
        letter-spacing: 0 !important;
    }

    .eaii-desc-wrap {
        max-width: 100% !important;
    }

    .eaii-action-row,
    .eaii-btns {
        width: 100% !important;
    }

    .eaii-btn-a,
    .eaii-btn-b,
    .cf7-premium-container [type="submit"] {
        width: 100% !important;
        justify-content: center !important;
        white-space: normal !important;
        text-align: center !important;
    }

    .eaii-scroll-ind {
        display: none !important;
    }

    .eaii-logo-text {
        max-width: 13.5rem !important;
    }

    .eaii-logo-title {
        font-size: 0.5rem !important;
        line-height: 1.15 !important;
    }

    .eaii-logo img {
        height: 38px !important;
    }

    .eaii-mobile {
        max-height: calc(100svh - 76px) !important;
        overflow-y: auto !important;
    }
}

@media screen and (max-width: 390px) {
    .eaii-logo-text {
        max-width: 10.5rem !important;
    }

    .eaii-logo-title {
        font-size: 0.46rem !important;
    }

    .eaii-h1 {
        font-size: clamp(1.2rem, 7.5vw, 1.6rem) !important;
    }
}
