/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #003366;
    --primary-dark: #002244;
    --accent: #E63946;
    --accent-hover: #c5303c;
    --light: #F4F4F4;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --whatsapp: #25D366;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #20bd5a;
}

.btn-full {
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: var(--text);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent);
}

.btn-call-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-call-header:hover {
    background: var(--accent-hover);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* Hero */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 70px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    text-align: center;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Sections */
.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* Services */
.services {
    padding: 100px 0;
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--light);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--accent);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.service-card p {
    color: var(--text-light);
}

/* Formation */
.formation {
    padding: 100px 0;
    background: var(--light);
}

.formation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.formation-text .section-title {
    text-align: left;
}

.formation-text .section-subtitle {
    text-align: left;
}

.formation-list {
    list-style: none;
    margin-bottom: 30px;
}

.formation-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 1.05rem;
}

.formation-list svg {
    color: var(--whatsapp);
    flex-shrink: 0;
}

.formation-image {
    display: flex;
    justify-content: center;
}

.formation-img-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: var(--white);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.formation-img-placeholder svg {
    width: 60%;
    height: auto;
    opacity: 0.3;
}

.formation-img-placeholder span {
    margin-top: 20px;
    font-weight: 600;
    opacity: 0.5;
}

/* À Propos */
.apropos {
    padding: 100px 0;
    background: var(--white);
}

.apropos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.apropos-card {
    text-align: center;
    padding: 40px 20px;
}

.apropos-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.apropos-number svg {
    fill: var(--accent);
}

.apropos-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.apropos-card p {
    color: var(--text-light);
}

/* Contact */
.contact {
    padding: 100px 0;
    background: var(--light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.contact-item p,
.contact-item a {
    color: var(--text-light);
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.contact-map {
    min-height: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand .logo-icon {
    background: var(--accent);
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-contact a {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-links a:hover,
.footer-contact a:hover {
    opacity: 1;
}

.footer-contact p {
    margin-bottom: 8px;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Header Actions & Cart */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon {
    position: relative;
    color: var(--primary);
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.cart-icon:hover {
    background: var(--light);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--whatsapp);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

/* Responsive */
@media (max-width: 992px) {
    .formation-content {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .btn-call-header {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
}


/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

.lang-btn:hover {
    background: rgba(255,255,255,0.2);
}

.lang-btn.active {
    border-color: var(--accent);
    background: rgba(230, 57, 70, 0.2);
}

.lang-btn img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .header .container {
    flex-direction: row-reverse;
}

body.rtl .nav-menu {
    flex-direction: row-reverse;
}

body.rtl .header-actions {
    flex-direction: row-reverse;
}

body.rtl .lang-switcher {
    margin-right: 0;
    margin-left: 15px;
}

body.rtl .service-card,
body.rtl .formation-content {
    text-align: right;
}

body.rtl .hero-content {
    text-align: center;
}

body.rtl .cart-item {
    flex-direction: row-reverse;
}

body.rtl .cart-item-actions {
    align-items: flex-start;
}

body.rtl .btn svg {
    margin-left: 8px;
    margin-right: 0;
}

body.rtl .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

body.rtl .footer-grid {
    direction: rtl;
}

@media (max-width: 768px) {
    .lang-switcher {
        position: absolute;
        top: 15px;
        right: 70px;
    }
    
    body.rtl .lang-switcher {
        right: auto;
        left: 70px;
    }
}
