/**
 * Custom CSS pour LafabriKorigin
 * Animations et styles personnalisés
 */

/* ========================================
   ANIMATIONS REVEAL AU SCROLL
   ======================================== */

.reveal,
[data-reveal] {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.7s ease-out;
}

.reveal.is-visible,
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Variations de direction */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.7s ease-out;
}

.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.7s ease-out;
}

.reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   ANIMATION FADE-IN-DOWN (Mobile Menu)
   ======================================== */

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

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

.animate-fade-in-down {
    animation: fadeInDown 0.3s ease-out;
}

/* ========================================
   ANIMATION BOUNCE (Scroll Indicator)
   ======================================== */

@keyframes bounce {

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

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

.animate-bounce {
    animation: bounce 2s infinite;
}

/* ========================================
   ANIMATION PULSE
   ======================================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ========================================
   PARALLAX CONTAINERS
   ======================================== */

.parallax-container {
    overflow: hidden;
}

.parallax-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 120%;
    top: -10%;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.parallax-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========================================
   GRAIN OVERLAY COMPONENT
   ======================================== */

.grain-overlay-section {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    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.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="1"/%3E%3C/svg%3E');
    background-repeat: repeat;
}

/* Variations d'opacité */
.grain-overlay-section.opacity-low {
    opacity: 0.1;
}

.grain-overlay-section.opacity-medium {
    opacity: 0.3;
}

.grain-overlay-section.opacity-high {
    opacity: 0.4;
}

/* Variations de blend mode */
.grain-overlay-section.blend-overlay {
    mix-blend-mode: overlay;
}

.grain-overlay-section.blend-multiply {
    mix-blend-mode: multiply;
}

.grain-overlay-section.blend-screen {
    mix-blend-mode: screen;
}

/* ========================================
   SMOOTH SCROLL OFFSET (pour ancres)
   ======================================== */

html {
    scroll-padding-top: 100px;
    /* Hauteur navbar sticky */
}

/* ========================================
   TRANSITIONS GLOBALES
   ======================================== */

a,
button {
    transition: all 0.3s ease;
}

/* ========================================
   UTILITIES
   ======================================== */

/* Mix blend exclusion pour les titres sur images */
.mix-blend-exclusion {
    mix-blend-mode: exclusion;
}

/* Performance: GPU acceleration pour parallax */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ============================================
   WPFORMS CUSTOM STYLING - LAFABRIKORIGIN
   ============================================ */

/* Container */
.wpforms-container {
    max-width: 100% !important;
}

.wpforms-form {
    background: transparent !important;
}

/* Labels */
.wpforms-field-label {
    display: block !important;
    color: #fff !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 0.5rem !important;
    font-family: 'Inter', sans-serif !important;
}

.wpforms-required-label {
    color: #D62828 !important;
}

/* Inputs & Textareas - PLEINE LARGEUR */
.wpforms-field input[type="text"],
.wpforms-field input[type="email"],
.wpforms-field input[type="tel"],
.wpforms-field input[type="url"],
.wpforms-field input[type="number"],
.wpforms-field select,
.wpforms-field textarea {
    width: 100% !important;
    max-width: 100% !important;
    background-color: #000 !important;
    border: 2px solid #1f2937 !important;
    padding: 0.75rem 1rem !important;
    color: #fff !important;
    font-size: 1rem !important;
    transition: border-color 0.3s ease !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.wpforms-field input[type="text"]:focus,
.wpforms-field input[type="email"]:focus,
.wpforms-field input[type="tel"]:focus,
.wpforms-field input[type="url"]:focus,
.wpforms-field input[type="number"]:focus,
.wpforms-field select:focus,
.wpforms-field textarea:focus {
    border-color: #D62828 !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: #000 !important;
}

/* Placeholder */
.wpforms-field input::placeholder,
.wpforms-field textarea::placeholder {
    color: #6b7280 !important;
}

/* Select dropdown */
.wpforms-field select {
    cursor: pointer !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

/* Textarea */
.wpforms-field textarea {
    min-height: 150px !important;
    resize: vertical !important;
}

/* Field Spacing */
.wpforms-field {
    margin-bottom: 1.5rem !important;
}

/* Remove default WPForms styles */
.wpforms-container .wpforms-form .wpforms-field-container {
    padding: 0 !important;
}

/* Field Description */
.wpforms-field-description {
    color: #9ca3af !important;
    font-size: 0.75rem !important;
    margin-top: 0.25rem !important;
}

/* CAPTCHA (si activé) */
.wpforms-recaptcha-container {
    margin: 1.5rem 0 !important;
}

/* Remove autofill background */
.wpforms-field input:-webkit-autofill,
.wpforms-field input:-webkit-autofill:hover,
.wpforms-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #000 inset !important;
    -webkit-text-fill-color: #fff !important;
    border: 2px solid #1f2937 !important;
}

/* Focus state for autofill */
.wpforms-field input:-webkit-autofill:focus {
    border-color: #D62828 !important;
}

/* Hide honeypot fields (anti-spam) */
.wpforms-field[data-field-id="6"],
.wpforms-field[data-field-id="7"] {
    display: none !important;
}

/* Error Messages */
.wpforms-error {
    color: #D62828 !important;
    font-size: 0.875rem !important;
    margin-top: 0.5rem !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.wpforms-field.wpforms-has-error input,
.wpforms-field.wpforms-has-error textarea,
.wpforms-field.wpforms-has-error select {
    border-color: #D62828 !important;
    background-color: #000 !important;
}

/* ============================================
   SUBMIT BUTTON - AVEC ANIMATION
   ============================================ */

.wpforms-submit-container {
    margin-top: 1.5rem !important;
}

/* Bouton - Configuration de base + Animation */
.wpforms-submit {
    width: 100% !important;
    background-color: #D62828 !important;
    color: #fff !important;
    padding: 1.5rem 3rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.875rem !important;
    border-radius: 0 !important;
    transform: translateY(0) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 0 0 rgba(214, 40, 40, 0) !important;
}

/* Hover normal */
.wpforms-submit:hover,
.wpforms-submit:focus {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 25px rgba(214, 40, 40, 0.6) !important;
}

/* Pseudo-élément pour l'animation de remplissage */
.wpforms-submit::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #D62828 !important;
    transition: none !important;
    z-index: 0 !important;
}

/* État pendant l'envoi - Change le fond en noir et lance l'animation */
.wpforms-submit.wpforms-submit-processing {
    background-color: #000 !important;
    pointer-events: none !important;
    transform: translateY(0) !important;
    box-shadow: none !important;
    color: transparent !important;
}

.wpforms-submit.wpforms-submit-processing::before {
    left: 0 !important;
    transition: left 2s ease-in-out !important;
}

/* Texte pendant l'envoi */
.wpforms-submit.wpforms-submit-processing::after {
    content: "ENVOI EN COURS..." !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    z-index: 2 !important;
    font-size: 0.875rem !important;
}

/* Cacher le spinner */
.wpforms-submit-spinner {
    display: none !important;
}

/* ============================================
   MESSAGE DE SUCCÈS
   ============================================ */

.wpforms-confirmation-container-full {
    background-color: #D62828 !important;
    color: #fff !important;
    padding: 2rem !important;
    text-align: center !important;
    border: none !important;
    margin-bottom: 1.5rem !important;
}

/* Titre "MESSAGE ENVOYÉ" - BLANC */
.wpforms-confirmation-container-full::before {
    content: "MESSAGE ENVOYÉ" !important;
    display: block !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.75rem !important;
    font-family: 'Archivo Black', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #fff !important;
}

/* Texte de confirmation - BLANC */
.wpforms-confirmation-container-full p {
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin: 0 !important;
    color: #fff !important;
    line-height: 1.6 !important;
}

/* ==========================================
   LOGO PERSONNALISÉ 
   ========================================== */

/* Logo général */
.custom-logo-link {
    display: inline-block;
    line-height: 1;
    transition: opacity 0.3s;
}

.custom-logo-link:hover {
    opacity: 0.85;
}

.custom-logo {
    /* MOBILE : Grand logo (60px) */
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

/* TABLETTE : Logo moyen (55px) */
@media (min-width: 768px) {
    .custom-logo {
        max-height: 55px;
    }
}

/* DESKTOP : Logo normal (50px) */
@media (min-width: 1024px) {
    .custom-logo {
        max-height: 50px;
    }
}

/* ==========================================
   LOGO DANS LE HEADER/NAVIGATION
   ========================================== */

#main-navbar .custom-logo {
    max-height: 80px; 
}

@media (min-width: 768px) {
    #main-navbar .custom-logo {
        max-height: 100px;
    }
}

/* ==========================================
   LOGO DANS LE MENU MOBILE
   ========================================== */

#mobile-menu .custom-logo {
    max-height: 100px;
}

@media (min-width: 768px) {
    #mobile-menu .custom-logo {
        max-height: 120px;
    }
}

/* ==========================================
   LOGO DANS LE FOOTER
   ========================================== */

footer .custom-logo {
    max-height: 150px; 
}

@media (min-width: 768px) {
    footer .custom-logo {
        max-height: 120px;
    }
}

@media (min-width: 1024px) {
    footer .custom-logo {
        max-height: 150px;
    }
}
