/* ==========================================================================
   ELSO PLAST — Page "Site en cours de création"
   Fidèle à la maquette Under_Construction.jpg avec fusion bg-stamp & responsive
   ========================================================================== */

:root {
    --bg-top: #373737;
    --bg-upper: #2b2b2b;
    --bg-mid: #1e1e1e;
    --bg-lower: #131313;
    --bg-bottom: #0a0a0a;

    --text-primary: #ffffff;
    --text-secondary: #f2f2f2;
    --text-footer: #555555;

    --input-bg: #f6f4f5;
    --input-text: #141414;
    --input-placeholder: #3a3a3a;

    --btn-bg: #080808;
    --btn-bg-hover: #141414;
    --btn-border: rgba(255, 255, 255, 0.08);
    --btn-border-hover: rgba(255, 255, 255, 0.24);

    --status-success-bg: rgba(34, 197, 94, 0.14);
    --status-success-border: rgba(74, 222, 128, 0.42);
    --status-success-text: #bbf7d0;

    --status-info-bg: rgba(255, 255, 255, 0.08);
    --status-info-border: rgba(255, 255, 255, 0.22);
    --status-info-text: #f3f4f6;

    --status-error-bg: rgba(239, 68, 68, 0.16);
    --status-error-border: rgba(248, 113, 113, 0.45);
    --status-error-text: #fecaca;

    --font-sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius-pill: 9999px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    background-color: var(--bg-bottom);
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-bottom);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==========================================================================
   Conteneur principal avec dégradé exact + contexte d'isolation pour le blend
   ========================================================================== */

.page {
    position: relative;
    isolation: isolate;
    min-height: 100dvh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse 85% 55% at 50% 18%, rgba(255, 255, 255, 0.035) 0%, transparent 70%),
        linear-gradient(
            180deg,
            var(--bg-top) 0%,
            var(--bg-upper) 25%,
            var(--bg-mid) 50%,
            var(--bg-lower) 75%,
            var(--bg-bottom) 100%
        );
}

/* ==========================================================================
   Filigrane ELSO en mode de fusion (mix-blend-mode: screen)
   ========================================================================== */

.bg-stamp {
    position: absolute;
    left: 50%;
    top: 63.5%;
    z-index: 1;
    width: min(1657px, 88vw);
    transform: translate(
        calc(-50% + var(--px, 0px)),
        calc(-50% + var(--py, 0px))
    );
    mix-blend-mode: screen;
    pointer-events: none;
    user-select: none;
    will-change: transform;
    transition: transform 0.25s ease-out;
}

.bg-stamp img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Grille de mise en page verticale
   ========================================================================== */

.page__inner {
    position: relative;
    z-index: 2;
    flex: 1 0 auto;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(28px, 6.2vh, 88px) clamp(20px, 5vw, 64px) clamp(20px, 4.5vh, 52px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 4vh, 48px);
}

/* ==========================================================================
   Logo Elso Plast
   ========================================================================== */

.brand {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: clamp(4px, 2.5vh, 32px);
    animation: fadeSlideDown 0.7s var(--ease-out-expo) both;
}

.brand__logo {
    display: block;
    width: clamp(200px, 22.5vw, 415px);
    height: auto;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
}

/* ==========================================================================
   Zone centrale : Titre, Accroche & Formulaire
   ========================================================================== */

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

.hero__title {
    margin: 0;
    font-size: clamp(1.38rem, 2.75vw, 3.05rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    animation: fadeSlideUp 0.75s var(--ease-out-expo) 0.08s both;
}

.hero__subtitle {
    margin: clamp(26px, 5.5vh, 72px) 0 0;
    max-width: 820px;
    font-size: clamp(0.98rem, 1.48vw, 1.62rem);
    font-weight: 500;
    line-height: 1.48;
    color: var(--text-secondary);
    animation: fadeSlideUp 0.75s var(--ease-out-expo) 0.16s both;
}

/* ==========================================================================
   Formulaire d'inscription
   ========================================================================== */

.subscribe-form {
    width: 100%;
    max-width: 1068px;
    margin-top: clamp(28px, 5.2vh, 64px);
    animation: fadeSlideUp 0.75s var(--ease-out-expo) 0.24s both;
}

.subscribe-form__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2.4vw, 44px);
    width: 100%;
}

.subscribe-form__input {
    flex: 1 1 auto;
    min-width: 0;
    height: clamp(52px, 4.1vw, 66px);
    padding: 0 clamp(22px, 2.2vw, 34px);
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    background-color: var(--input-bg);
    color: var(--input-text);
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    font-weight: 400;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition:
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background-color 0.22s ease,
        transform 0.22s ease;
}

.subscribe-form__input::placeholder {
    color: var(--input-placeholder);
    font-style: italic;
    opacity: 1;
}

.subscribe-form__input:hover {
    background-color: #ffffff;
}

.subscribe-form__input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.16),
        0 12px 32px rgba(0, 0, 0, 0.45);
}

.subscribe-form__input:focus-visible {
    outline: none;
}

.subscribe-form__button {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(160px, 11.8vw, 214px);
    height: clamp(52px, 4.1vw, 66px);
    padding: 0 28px;
    border: 1px solid var(--btn-border);
    border-radius: var(--radius-pill);
    background-color: var(--btn-bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 1vw, 1.05rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    transition:
        background-color 0.22s ease,
        border-color 0.22s ease,
        transform 0.18s ease,
        box-shadow 0.22s ease;
}

.subscribe-form__button:hover:not(:disabled) {
    background-color: var(--btn-bg-hover);
    border-color: var(--btn-border-hover);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}

.subscribe-form__button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.subscribe-form__button:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

.subscribe-form__button:disabled {
    cursor: wait;
    opacity: 0.82;
}

/* Spinner de chargement dans le bouton */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.subscribe-form__button.is-loading .btn-label {
    display: none;
}

.subscribe-form__button.is-loading .btn-spinner {
    display: inline-block;
}

/* ==========================================================================
   Zone de retour utilisateur (sans décalage de mise en page)
   ========================================================================== */

.form-feedback {
    min-height: 44px;
    margin: 18px auto 0;
    padding: 10px 20px;
    max-width: 680px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.form-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.form-feedback.is-success {
    background-color: var(--status-success-bg);
    border-color: var(--status-success-border);
    color: var(--status-success-text);
}

.form-feedback.is-info {
    background-color: var(--status-info-bg);
    border-color: var(--status-info-border);
    color: var(--status-info-text);
}

.form-feedback.is-error {
    background-color: var(--status-error-bg);
    border-color: var(--status-error-border);
    color: var(--status-error-text);
}

.subscribe-form.is-shaking .subscribe-form__controls {
    animation: shakeX 0.36s ease;
}

/* ==========================================================================
   Google reCAPTCHA (v2 widget sombre & mention légale v3)
   ========================================================================== */

.recaptcha-box {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.recaptcha-legal {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: #666666;
    line-height: 1.4;
}

.recaptcha-legal a {
    color: #8a8a8a;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.recaptcha-legal a:hover {
    color: #cccccc;
}

/* ==========================================================================
   Pied de page
   ========================================================================== */

.site-footer {
    width: 100%;
    text-align: center;
    animation: fadeIn 0.9s ease 0.32s both;
}

.site-footer p {
    margin: 0;
    font-size: clamp(0.78rem, 0.9vw, 0.95rem);
    font-weight: 400;
    color: var(--text-footer);
    letter-spacing: 0.01em;
}

/* ==========================================================================
   Utilitaires d'accessibilité et anti-spam
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
    .bg-stamp {
        width: 96vw;
        top: 62%;
    }
}

@media (max-width: 639px) {
    .page__inner {
        padding: 32px 20px 24px;
        gap: 28px;
    }

    .brand {
        padding-top: 8px;
    }

    .brand__logo {
        width: min(230px, 64vw);
    }

    .hero__title {
        font-size: clamp(1.32rem, 6.2vw, 1.75rem);
        line-height: 1.25;
    }

    .hero__subtitle {
        margin-top: 22px;
        font-size: 1rem;
    }

    .subscribe-form {
        margin-top: 28px;
    }

    .subscribe-form__controls {
        flex-direction: column;
        gap: 14px;
    }

    .subscribe-form__input,
    .subscribe-form__button {
        width: 100%;
        height: 54px;
    }

    .form-feedback {
        border-radius: 16px;
        font-size: 0.88rem;
    }

    .bg-stamp {
        width: 122vw;
        top: 64%;
    }
}

@media (max-width: 359px) {
    .recaptcha-box .g-recaptcha {
        transform: scale(0.88);
        transform-origin: center top;
    }
}

@media (max-height: 640px) and (min-width: 640px) {
    .page__inner {
        padding-top: 24px;
        padding-bottom: 18px;
        gap: 18px;
    }

    .brand {
        padding-top: 0;
    }

    .brand__logo {
        width: clamp(170px, 18vw, 280px);
    }

    .hero__subtitle {
        margin-top: 20px;
    }

    .subscribe-form {
        margin-top: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brand,
    .hero__title,
    .hero__subtitle,
    .subscribe-form,
    .site-footer,
    .subscribe-form.is-shaking .subscribe-form__controls {
        animation: none;
    }

    .bg-stamp,
    .subscribe-form__input,
    .subscribe-form__button,
    .form-feedback {
        transition: none;
    }

    .bg-stamp {
        --px: 0px;
        --py: 0px;
    }
}
