:root {
    /* Règle 60-30-10 */
    --primary-60: #F8FAFC;    
    --secondary-30: #1E293B;  
    --accent-10: #3B82F6;     
    --white: #FFFFFF;
    --dark: #0F172A;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* FOND DEGRADÉ SUR TOUTE LA PAGE */
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; 
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 50%, #F8FAFC 100%);
    color: var(--secondary-30); 
    line-height: 1.6; 
    font-size: 16px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ANIMATIONS GLOBALES */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* FADE IN GLOBAL */
body {
    animation: fadeIn 1.2s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HEADER */
header { 
    background: rgba(255, 255, 255, 0.95); 
    backdrop-filter: blur(10px);
    padding: 1.5rem 0; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.15); 
    position: relative;
    animation: slideDown 0.8s ease-out 0.2s both;
}
@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lang-toggle { 
    position: absolute; top: 1.5rem; right: 20px; 
    background: var(--accent-10); 
    color: var(--white); 
    border: none; 
    padding: 0.5rem 1rem; 
    cursor: pointer; 
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lang-toggle:hover { 
    background: #2563EB; 
    transform: translateY(-2px) scale(1.05);
}

h1 { 
    font-size: 2rem; 
    font-weight: 700; 
    color: var(--secondary-30); 
    margin: 0;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* HERO */
.hero { 
    text-align: center; 
    padding: 5rem 0; 
    background: linear-gradient(135deg, var(--accent-10), #2563EB); 
    color: var(--white); 
    margin-bottom: 2rem;
    animation: fadeInScale 1s ease-out 0.6s both;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.hero h2 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    margin: 0 0 1.5rem; 
    font-weight: 700;
    animation: fadeInUp 0.8s ease-out 0.8s both;
}
.hero p { 
    font-size: 1.2rem; 
    opacity: 0.95; 
    max-width: 600px; 
    margin: 0 auto; 
}
.hero .line1 { 
    margin-bottom: 0.5rem; 
    animation: fadeInUp 0.6s ease-out 1s both;
}
.hero .line2 { 
    font-weight: 500; 
    animation: fadeInUp 0.6s ease-out 1.2s both;
}

/* SERVICES */
.services { 
    padding: 5rem 0; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 2rem; 
}
.service { 
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(10px);
    padding: 2.5rem; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.2); 
    text-align: center; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.3);
    opacity: 0;
    transform: translateY(30px);
}
.service.animate {
    animation: fadeInUpLarge 0.8s ease-out both;
}
.service:nth-child(1) { animation-delay: 1.4s; }
.service:nth-child(2) { animation-delay: 1.6s; }
.service:nth-child(3) { animation-delay: 1.8s; }
@keyframes fadeInUpLarge {
    to { opacity: 1; transform: translateY(0); }
}
.service:hover { 
    transform: translateY(-12px) scale(1.02) !important; 
    box-shadow: 0 40px 80px rgba(0,0,0,0.25);
}
.service h3 { 
    font-size: 1.5rem; 
    color: var(--secondary-30); 
    margin-bottom: 1rem; 
    font-weight: 600;
}

/* CTA */
.cta { 
    text-align: center; 
    padding: 5rem 0; 
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpLarge 0.8s ease-out 2s both;
}
.cta h2 { 
    font-size: 2.5rem; 
    color: var(--secondary-30); 
    margin-bottom: 1rem; 
    font-weight: 700;
}
.cta button { 
    background: var(--accent-10); 
    color: var(--white); 
    border: none; 
    padding: 1rem 2.5rem; 
    font-size: 1.1rem; 
    cursor: pointer; 
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}
.cta button:hover { 
    background: #2563EB; 
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.5);
}

/* FOOTER */
footer { 
    text-align: center; 
    padding: 3rem 0; 
    background: rgba(30, 41, 59, 0.95); 
    color: var(--white); 
    font-size: 0.9rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out 2.2s both;
}

@media (max-width: 768px) { 
    .lang-toggle { top: 1rem; right: 1rem; } 
    .services { padding: 3rem 0; }
}
/* TRANSITION FONDU CHANGEMENT DE LANGUE */
body.lang-transition * {
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

body.lang-transition {
    opacity: 0.7;
}

body.lang-transition [data-lang-fr],
body.lang-transition h1,
body.lang-transition h2,
body.lang-toggle,
body.lang-transition #contactBtn {
    opacity: 0.5;
    transform: translateY(-3px) scale(0.98);
}

/* Fin de transition - retour fluide */
body:not(.lang-transition) [data-lang-fr],
body:not(.lang-transition) h1,
body:not(.lang-transition) h2,
body:not(.lang-transition) .lang-toggle,
body:not(.lang-transition) #contactBtn {
    transition: all 0.3s ease-out;
}
/* FORMULAIRE CONTACT - Centré + Élégant */
.contact-form-section { 
    padding: 5rem 0; 
    display: flex;
    align-items: center;
    min-height: 60vh;
}

.contact-form {
    max-width: 700px; 
    width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 3.5rem;
    border-radius: 20px;
    box-shadow: 
        0 25px 60px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-10), #2563EB);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group { 
    margin-bottom: 2rem; 
}
.form-group:last-child { margin-bottom: 0; }

.form-group label {
    display: block; 
    margin-bottom: 0.75rem;
    font-weight: 600; 
    color: var(--secondary-30);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; 
    padding: 1.2rem 1.25rem;
    background: var(--white);
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    color: var(--secondary-30);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-10);
    box-shadow: 
        0 0 0 4px rgba(59, 130, 246, 0.1),
        0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-form button[type="submit"] {
    background: linear-gradient(135deg, var(--accent-10), #2563EB);
    color: var(--white); 
    border: none;
    padding: 1.4rem 3rem; 
    width: 100%;
    font-size: 1.2rem; 
    font-weight: 700;
    cursor: pointer; 
    margin-top: 1.5rem;
    border-radius: 12px;
    box-shadow: 
        0 15px 40px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; 
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-form button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: 
        0 25px 50px rgba(59, 130, 246, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

.contact-form button[type="submit"]:disabled {
    opacity: 0.7; 
    cursor: not-allowed;
    transform: none;
}

.loader {
    width: 22px; 
    height: 22px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 12px;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVE */
@media (max-width: 768px) {
    .contact-form-section { padding: 3rem 0; }
    .contact-form { 
        padding: 2.5rem 2rem; 
        margin: 0 1rem;
        border-radius: 16px;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .contact-form { padding: 2rem 1.5rem; }
}
