/* ============================================================
   GROUPE SCOLAIRE SOCLE D'AVENIR — style.css
   Feuille de styles commune à toutes les pages
   Charte graphique conservée à l'identique
   ============================================================ */

/* --- VARIABLES & RESET --- */
:root {
    --primary-color: #0302ff;
    --primary-hover: #0201cc;
    --secondary-color: #2fc1e6;
    --secondary-hover: #259bc0;
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-light: #f9f9f9;
    --bg-gray: #7a7a7a;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* --- BUTTONS --- */
.btn { display: inline-block; padding: 12px 24px; border-radius: 5px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; text-align: center; border: none; font-family: var(--font-main); font-size: 1rem; line-height: 1.4; }
.btn-primary  { background-color: var(--primary-color);   color: white; }
.btn-primary:hover  { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--secondary-color); color: white; }
.btn-secondary:hover { background-color: var(--secondary-hover); }
.btn-gray  { background-color: var(--bg-gray); color: white; }
.btn-gray:hover  { background-color: #555; }
.btn-white { background-color: white; color: var(--text-dark); }
.btn-white:hover { background-color: #f0f0f0; }

/* --- HEADER & NAVIGATION --- */
header { background: white; padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 2001; }
.header-content { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.logo img { max-height: 60px; width: auto; }

.main-nav ul { display: flex; list-style: none; gap: 20px; flex-wrap: wrap; }
.main-nav a { font-weight: 500; transition: color 0.2s; white-space: nowrap; }
.main-nav a:hover { color: var(--primary-color); }
.main-nav a.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); padding-bottom: 2px; }

.menu-toggle { display: none; font-size: 28px; cursor: pointer; color: var(--primary-color); line-height: 1; flex-shrink: 0; }
.close-menu { display: none; font-size: 28px; cursor: pointer; color: var(--text-dark); text-align: right; margin-bottom: 20px; line-height: 1; }

.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1999; }
.nav-overlay.active { display: block; }

/* --- HERO SECTION --- */
.hero { background: linear-gradient(135deg, #0201a8 0%, #0302ff 50%, #4a49ff 100%); color: white; padding: 80px 0; position: relative; }
.hero .container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-text { flex: 1; min-width: 0; }
.hero-text h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.hero-text p  { margin-bottom: 30px; font-size: 1.1rem; }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-image { flex: 1; display: flex; justify-content: center; flex-shrink: 0; }
.hero-image img { width: 400px; height: 400px; object-fit: cover; border-radius: 50%; border: 10px solid rgba(255,255,255,0.2); }

/* --- STATS --- */
.stats { background: white; padding: 40px 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-top: -30px; position: relative; z-index: 10; border-radius: 10px; max-width: 1000px; margin-left: auto; margin-right: auto; }
.stats-grid { display: flex; justify-content: space-around; align-items: center; text-align: center; flex-wrap: wrap; gap: 20px; }
.stat-item { flex: 1; min-width: 120px; }
.stat-item h3 { font-size: 2.5rem; color: var(--text-dark); margin-bottom: 5px; }
.stat-item p  { font-weight: bold; color: var(--text-gray); }

/* --- ABOUT --- */
.about { padding: 80px 0; }
.about .container { display: flex; align-items: center; gap: 50px; }
.about-img { flex: 1; min-width: 0; }
.about-img img { width: 100%; border-radius: 10px; }
.about-text { flex: 1; min-width: 0; }
.about-text h4 { color: var(--text-gray); font-weight: normal; }
.about-text h2 { font-size: 2.5rem; margin-bottom: 20px; line-height: 1.2; }
.about-text p  { color: var(--text-gray); margin-bottom: 20px; }

/* --- EXPERTISE / CARDS --- */
.expertise { padding: 60px 0; text-align: center; }
.expertise h2 { font-size: 2rem; margin-bottom: 40px; }
.expertise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.expertise-card { border: 1px solid #eee; padding: 30px 20px; border-radius: 8px; transition: transform 0.3s, box-shadow 0.3s; }
.expertise-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.expertise-card i  { font-size: 40px; color: var(--primary-color); margin-bottom: 15px; }
.expertise-card h3 { margin-bottom: 10px; }
.expertise-card p  { font-size: 0.9rem; color: var(--text-gray); }

/* --- CTA BANNER --- */
.cta-banner { background: var(--primary-color); color: white; border-radius: 20px; padding: 50px; display: flex; align-items: center; justify-content: space-between; margin: 60px auto; max-width: 1200px; position: relative; overflow: hidden; gap: 30px; }
.cta-text { z-index: 2; max-width: 60%; }
.cta-text h2 { font-size: 2.5rem; margin-bottom: 15px; line-height: 1.2; }
.cta-text p  { margin-bottom: 25px; }
.cta-image { position: absolute; right: 0; bottom: 0; height: 120%; z-index: 1; pointer-events: none; }

/* --- PROJECTS --- */
.projects { padding: 60px 0; text-align: center; }
.projects h2 { font-size: 2rem; margin-bottom: 40px; }
.projects h2 span { color: var(--primary-color); text-decoration: underline; }
.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.projects-grid img { width: 100%; height: 300px; object-fit: cover; border-radius: 10px; }

/* --- WHY CHOOSE --- */
.why-choose { padding: 60px 0; text-align: center; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.why-card { background: var(--primary-color); color: white; padding: 40px 20px; border-radius: 10px; }
.why-card i  { font-size: 40px; margin-bottom: 15px; }

/* --- SERVICES --- */
.services { padding: 60px 0; text-align: center; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; margin-top: 40px; }
.service-card { background: white; padding: 30px; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,0.06); text-align: center; }

/* --- SECONDARY CTA --- */
.secondary-cta { background: var(--primary-color); color: white; padding: 40px 50px; border-radius: 15px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 40px auto; }
.secondary-cta h2 { font-size: 2rem; }

/* --- FAQ --- */
.faq { max-width: 800px; margin: 0 auto; padding: 60px 20px; }
.faq h2 { text-align: center; font-size: 2rem; margin-bottom: 30px; }
.faq-item { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: white; border: 1px solid #eee; cursor: pointer; margin-bottom: 5px; border-radius: 8px; font-weight: 500; transition: background 0.2s; }
.faq-item:hover { background: var(--bg-light); }
.faq-item i { transition: transform 0.3s; color: var(--primary-color); }
.faq-answer { display: none; padding: 15px 20px; background: var(--bg-light); border: 1px solid #eee; border-top: none; margin-bottom: 5px; color: var(--text-gray); border-radius: 0 0 8px 8px; }

/* --- PAGE HERO --- */
.page-hero { background: linear-gradient(135deg, #0201a8 0%, #0302ff 50%, #4a49ff 100%); color: white; padding: 60px 20px; text-align: center; }
.page-hero h1 { font-size: 2.5rem; margin-bottom: 15px; }
.page-hero p  { font-size: 1.1rem; opacity: 0.9; }
.breadcrumb { display: flex; justify-content: center; gap: 10px; margin-top: 15px; font-size: 0.9rem; opacity: 0.8; flex-wrap: wrap; }
.breadcrumb a   { color: white; }
.breadcrumb span { opacity: 0.6; }

/* --- TARIFS TABLE --- */
.tarifs-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.tarifs-table th { background: var(--primary-color); color: white; padding: 15px; text-align: left; }
.tarifs-table td { padding: 12px 15px; border-bottom: 1px solid #eee; }
.tarifs-table tr:hover td { background: var(--bg-light); }
.tarifs-table .total { font-weight: bold; background: #f0f0ff; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- CONTACT FORM --- */
.contact-form { background: var(--bg-light); padding: 40px; border-radius: 10px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 5px; font-family: var(--font-main); font-size: 1rem; background: white; -webkit-appearance: none; appearance: none; }
.form-group select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; padding-right: 40px; }
.form-group textarea { height: 150px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(3,2,255,0.1); }

/* --- FOOTER --- */
footer { padding: 60px 0 20px; border-top: 1px solid #eee; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 40px; }
.footer-col h4 { color: var(--primary-color); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; color: var(--text-gray); }
.footer-col ul li a { color: var(--text-gray); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--primary-color); }
.socials a { display: inline-block; margin-right: 12px; }
.socials i { font-size: 20px; color: var(--text-gray); cursor: pointer; transition: color 0.2s; }
.socials i:hover { color: var(--primary-color); }
.copyright { text-align: center; color: var(--text-gray); font-size: 0.9rem; padding-top: 20px; border-top: 1px solid #eee; }

/* --- VIDEO BUTTON --- */
.btn-video { background: rgba(255,255,255,0.15); color: white; border: 2px solid rgba(255,255,255,0.7); backdrop-filter: blur(4px); display: inline-flex; align-items: center; gap: 8px; }
.btn-video:hover { background: rgba(255,255,255,0.28); border-color: white; }

/* --- VIDEO MODAL --- */
.video-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.82); z-index: 9999; align-items: center; justify-content: center; padding: 20px; }
.video-modal.active { display: flex; }
.video-modal-inner { position: relative; width: 100%; max-width: 860px; border-radius: 12px; overflow: hidden; box-shadow: 0 25px 60px rgba(0,0,0,0.6); background: #000; animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
.video-modal-inner video { width: 100%; display: block; max-height: 80vh; }
.video-modal-close { position: absolute; top: 10px; right: 12px; z-index: 10; background: rgba(0,0,0,0.55); color: white; border: none; border-radius: 50%; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.video-modal-close:hover { background: rgba(0,0,0,0.85); }

/* ============================================================ RESPONSIVE ============================================================ */
@media (max-width: 1024px) {
    .hero-text h1 { font-size: 2.4rem; }
    .hero-image img { width: 320px; height: 320px; }
    .expertise-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-text { max-width: 65%; }
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .header-btn  { display: none; }
    .main-nav { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background-color: white; box-shadow: -5px 0 20px rgba(0,0,0,0.15); transition: right 0.3s ease-in-out; z-index: 2002; padding: 20px; display: flex; flex-direction: column; overflow-y: auto; }
    .main-nav.active { right: 0; }
    .close-menu { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; margin-top: 10px; }
    .main-nav ul li a { display: block; padding: 14px 5px; border-bottom: 1px solid #f0f0f0; font-size: 1rem; }
    .main-nav a.active { border-bottom-color: var(--primary-color); }

    .hero { padding: 50px 0; }
    .hero .container { flex-direction: column; text-align: center; }
    .hero-text h1 { font-size: 2rem; }
    .hero-buttons { justify-content: center; }
    .hero-image img { width: 240px; height: 240px; margin-top: 20px; }

    .stats { margin-top: 20px; padding: 30px 20px; }
    .stats-grid { flex-direction: column; gap: 20px; }
    .stat-item h3 { font-size: 2rem; }

    .about { padding: 50px 0; }
    .about .container { flex-direction: column; gap: 30px; }
    .about .container[style*="row-reverse"] { flex-direction: column !important; }
    .about-text h2 { font-size: 2rem; }

    .expertise-grid { grid-template-columns: 1fr; }
    .why-grid       { grid-template-columns: 1fr 1fr; }
    .services-grid  { grid-template-columns: 1fr; }
    .projects-grid  { grid-template-columns: 1fr; }
    .footer-grid    { grid-template-columns: 1fr 1fr; }

    .cta-banner { flex-direction: column; text-align: center; padding: 40px 25px; }
    .cta-text { max-width: 100%; }
    .cta-image { display: none; }
    .cta-text h2 { font-size: 2rem; }

    .secondary-cta { flex-direction: column; text-align: center; padding: 30px 25px; }
    .secondary-cta h2 { font-size: 1.5rem; }

    .page-hero h1 { font-size: 2rem; }
    .contact-form { padding: 25px 20px; }
    .contact-grid { grid-template-columns: 1fr !important; }
    .mission-vision-grid { grid-template-columns: 1fr !important; }
    .frais-grid { grid-template-columns: 1fr !important; }

    .footer-grid { grid-template-columns: 1fr; }
    .tarifs-table th, .tarifs-table td { padding: 10px 12px; font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 1.7rem; }
    .about-text h2 { font-size: 1.6rem; }
    .page-hero h1  { font-size: 1.6rem; }
    .why-grid { grid-template-columns: 1fr; }
    .btn { padding: 11px 18px; font-size: 0.95rem; }
    .expertise-card { padding: 25px 15px; }
    .stat-item h3 { font-size: 1.8rem; }
    .cta-banner { padding: 30px 20px; }
    .cta-text h2 { font-size: 1.6rem; }
    .secondary-cta { padding: 25px 20px; }
    .contact-form { padding: 20px 15px; }
    .projects-grid img { height: 220px; }
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
}
