/* ===== CONTACT - DESIGN ULTRA MODERNE 2026 ===== */
/* ===== ANIMATIONS IMMÉDIATES EN CASCADE ===== */

/* Variables */
:root {
    --primary: #0066ff;
    --primary-light: #3385ff;
    --primary-dark: #0044cc;
    --accent: #00e5ff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --bg-glass: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 30px 60px -15px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(0, 102, 255, 0.2);
    --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== ANIMATIONS ===== */
@keyframes flyInFromBottom {
    0% {
        opacity: 0;
        transform: translateZ(-200px) translateY(100px) rotateX(-10deg);
        filter: blur(10px);
    }
    40% {
        opacity: 0.5;
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateZ(0) translateY(0) rotateX(0);
        filter: blur(0);
    }
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* ===== BODY ===== */
body {
    background-color: var(--bg-color, #ffffff);
    color: var(--text-primary);
    transition: background-color 0.4s var(--transition-smooth), color 0.4s var(--transition-smooth);
}

/* ===== HEADER - Animation immédiate ===== */
header {
    opacity: 0;
    animation: flyInFromBottom 0.8s var(--transition-smooth) forwards;
}

header h1 {
    opacity: 0;
    animation: textReveal 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.1s;
}

header p {
    opacity: 0;
    animation: textReveal 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.25s;
}

/* ===== SECTION CONTACT - Visible immédiatement ===== */
.contact-section,
section,
.container section,
main section {
    opacity: 0;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 24px !important;
    padding: 2.5rem !important;
    margin: 2rem auto !important;
    box-shadow: var(--shadow-lg) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    transition: all 0.4s var(--transition-smooth);
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: scaleIn 0.8s var(--transition-smooth) forwards;
    animation-delay: 0.3s;
}

.contact-section:hover,
section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg), var(--shadow-glow) !important;
}

/* ===== FORMULAIRES ===== */
.form-control,
input,
textarea {
    opacity: 0;
    border-radius: 12px !important;
    border: 1px solid var(--border-light) !important;
    background: var(--bg-glass) !important;
    backdrop-filter: blur(5px);
    padding: 14px 18px !important;
    font-size: 1rem !important;
    transition: all 0.3s var(--transition-smooth) !important;
    animation: slideInLeft 0.6s var(--transition-smooth) forwards;
}

.form-control:nth-of-type(1),
input:nth-of-type(1) {
    animation-delay: 0.4s;
}

.form-control:nth-of-type(2),
input:nth-of-type(2) {
    animation-delay: 0.5s;
}

.form-control:nth-of-type(3),
input:nth-of-type(3) {
    animation-delay: 0.6s;
}

textarea {
    animation: slideInLeft 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.7s;
    min-height: 150px;
    resize: vertical;
}

.form-control:focus,
input:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1) !important;
    outline: none;
    transform: translateY(-2px);
}

/* ===== LABELS ===== */
.form-label,
label {
    opacity: 0;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: textReveal 0.5s var(--transition-smooth) forwards;
}

label:nth-of-type(1) { animation-delay: 0.35s; }
label:nth-of-type(2) { animation-delay: 0.45s; }
label:nth-of-type(3) { animation-delay: 0.55s; }
label:nth-of-type(4) { animation-delay: 0.65s; }

/* ===== BOUTON CUSTOM ===== */
.btn-custom {
    width: 100%;
    background: linear-gradient(135deg, #111, #2b2b2b);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    padding: 15px 24px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: all 0.3s var(--transition-smooth);
    cursor: pointer;
    opacity: 0;
    animation: scaleIn 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.9s;
    position: relative;
    overflow: hidden;
}

.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

.btn-custom:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
}

.btn-custom:active {
    transform: translateY(0);
}

/* ===== STATUS MESSAGE ===== */
#status,
.status-message {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    transition: all 0.3s var(--transition-smooth);
    opacity: 0;
    animation: textReveal 0.5s var(--transition-smooth) forwards;
    animation-delay: 1s;
}

#status.success,
.status-message.success {
    background-color: rgba(46, 204, 113, 0.1);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #27ae60;
    animation: pulse 1.5s ease-in-out;
}

#status.error,
.status-message.error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* ===== ICÔNES CONTACT ===== */
.contact-icon {
    opacity: 0;
    animation: scaleIn 0.5s var(--transition-smooth) forwards;
}

.contact-icon:nth-of-type(1) { animation-delay: 0.8s; }
.contact-icon:nth-of-type(2) { animation-delay: 0.9s; }
.contact-icon:nth-of-type(3) { animation-delay: 1s; }

/* ===== TITRES DE SECTION ===== */
h2, h3 {
    opacity: 0;
    color: var(--text-primary) !important;
    position: relative;
    padding-bottom: 15px;
    animation: textReveal 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.35s;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.8s var(--transition-smooth);
}

h2::after {
    animation: expandLine 0.8s var(--transition-smooth) forwards;
    animation-delay: 0.8s;
}

@keyframes expandLine {
    0% { width: 0; }
    100% { width: 80px; }
}

section:hover h2::after {
    width: 120px;
}

/* ===== PARAGRAPHES ===== */
p {
    opacity: 0;
    line-height: 1.8;
    color: var(--text-secondary);
    animation: textReveal 0.6s var(--transition-smooth) forwards;
    animation-delay: 0.45s;
}

/* ===== MODE NUIT ===== */
[data-bs-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-light: rgba(255, 255, 255, 0.08);
    --bg-color: #0a0c10;
}

[data-bs-theme="dark"] section,
[data-bs-theme="dark"] .contact-section {
    background: rgba(20, 20, 30, 0.8) !important;
    backdrop-filter: blur(20px);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3 {
    color: #ffffff !important;
}

[data-bs-theme="dark"] p {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] input,
[data-bs-theme="dark"] textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] input:focus,
[data-bs-theme="dark"] textarea:focus {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] input::placeholder,
[data-bs-theme="dark"] textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .btn-custom {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-color: rgba(0, 102, 255, 0.3);
}

[data-bs-theme="dark"] .btn-custom:hover {
    background: linear-gradient(135deg, #16213e, #0f3460);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.3);
}

[data-bs-theme="dark"] #status.success {
    background-color: rgba(46, 204, 113, 0.05);
    border-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

[data-bs-theme="dark"] #status.error {
    background-color: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    section,
    .contact-section {
        padding: 1.8rem !important;
        margin: 1.5rem auto !important;
    }
    
    .btn-custom {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .form-control,
    input,
    textarea {
        padding: 12px 16px !important;
    }
}

@media (max-width: 480px) {
    section,
    .contact-section {
        padding: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .btn-custom {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
}

/* ===== ANIMATION DE CHARGEMENT DU FORMULAIRE ===== */
.form-group {
    opacity: 0;
    animation: textReveal 0.5s var(--transition-smooth) forwards;
}

.form-group:nth-of-type(1) { animation-delay: 0.4s; }
.form-group:nth-of-type(2) { animation-delay: 0.5s; }
.form-group:nth-of-type(3) { animation-delay: 0.6s; }
.form-group:nth-of-type(4) { animation-delay: 0.7s; }