@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400&family=Playfair+Display:wght@700;800&display=swap');

/* --- VARIABLES & RESET --- */
:root {
    --primary-dark: #021d44;
    --primary-light: #3f5a83;
    --light-bg: #f4f6f9;
    --text-dark: #021d44;
    --text-light: #5a6b7c;
    --white: #ffffff;
    --font-body: 'Nunito', 'Segoe UI', sans-serif;
    --font-title: 'Playfair Display', Georgia, serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

body {
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--white);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
a:hover { color: var(--primary-light); }
ul { list-style: none; }

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

.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border: 2px solid transparent;
}
.btn-orange {
    background-color: var(--primary-light);
    color: var(--white);
}
.btn-orange:hover {
    background-color: var(--primary-dark);
    color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-light);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    font-family: var(--font-title);
}

h1, h2, h3 {
    font-family: var(--font-title);
}
.page-hero h1, .hero h2 {
    font-family: var(--font-title);
}

.page-hero {
    height: 35vh;
    background: linear-gradient(rgba(2, 29, 68, 0.85), rgba(63, 90, 131, 0.7)), url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.page-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.page-hero p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-top: 10px;
}

/* --- TOP BAR --- */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.contact-info span { margin-right: 15px; }

/* --- NAVBAR --- */
.navbar {
    background: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
}
.logo {
    padding: 15px 0;
    height: 100%;
    display: flex;
    align-items: center;
}
.logo h1 { color: var(--primary-dark); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }

.nav-links { display: flex; gap: 30px; }
.nav-links a {
    color: var(--primary-dark);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-light); }

/* --- HERO SECTION --- */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(2, 29, 68, 0.8), rgba(63, 90, 131, 0.6)), url('img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}
.hero h2 {
    font-size: 3.5rem;
    max-width: 900px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    font-weight: 700;
}

/* --- PRESIDENT SECTION --- */
.president-section {
    padding: 80px 0;
    background: white;
}
.pres-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}
.pres-left { text-align: center; }
.pres-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 20px auto;
    border: 5px solid var(--light-bg);
}
.pres-name {
    color: var(--primary-dark);
    font-weight: bold;
    font-size: 1.2rem;
    text-transform: uppercase;
}
.pres-title { font-size: 0.9rem; color: var(--primary-light); }
.pres-right p { margin-bottom: 20px; color: var(--text-light); text-align: justify; }

/* --- PROGRAMS GRID --- */
.programs-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 400px 400px;
}
.prog-main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    background-color: var(--primary-dark);
    color: white;
    padding: 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.prog-main .section-title { color: white; }
.prog-item {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    overflow: hidden;
    transition: transform 0.3s;
}
.prog-item:hover { transform: scale(1.01); z-index: 2; }
.prog-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(2, 29, 68, 0.9), rgba(2, 29, 68, 0.2));
}
.prog-1 { grid-column: 2 / 5; grid-row: 1 / 2; background-image: url('img/prog-secondaire.jpg'); }
.prog-2 { grid-column: 2 / 4; grid-row: 2 / 3; background-image: url('img/prog-primaire.jpg'); }
.prog-3 { grid-column: 4 / 5; grid-row: 2 / 3; background-image: url('img/prog-superieur.jpg'); }
.prog-content { position: relative; z-index: 2; color: white; }
.prog-content h3 { font-size: 2rem; margin-bottom: 15px; }

/* --- NEWS --- */
.news-section { padding: 80px 0; background-color: var(--light-bg); }
.news-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(2, 29, 68, 0.08);
    transition: 0.3s;
}
.card:hover { transform: translateY(-5px); }
.card img { width: 100%; height: 220px; object-fit: cover; }
.card-body { padding: 25px; }
.card-date { font-size: 0.8rem; color: var(--primary-light); font-weight: bold; margin-bottom: 10px; display: block; }
.card-title { font-weight: bold; color: var(--primary-dark); font-size: 1.1rem; margin-bottom: 10px; }
.card-text { color: var(--text-light); font-size: 0.9rem; }

/* --- STATS SECTION --- */
.stats-section {
    background-color: white;
    padding: 80px 0;
    text-align: center;
}
.big-quote {
    font-size: 2rem;
    color: var(--primary-dark);
    font-weight: 800;
    max-width: 800px;
    margin: 0 auto 60px;
    line-height: 1.3;
}
.big-quote span {
    background: var(--primary-light);
    color: white;
    padding: 0 10px;
}
.stats-grid {
    display: flex;
    justify-content: space-around;
    margin-bottom: 80px;
    flex-wrap: wrap;
}
.stat-item { margin: 20px; }
.stat-item i { font-size: 3rem; color: var(--primary-light); margin-bottom: 15px; }
.stat-number { font-size: 3rem; font-weight: 900; color: var(--primary-dark); display: block; }
.stat-label { color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }

/* Newsletter */
.newsletter {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: var(--light-bg);
    border-radius: 50px;
    padding: 5px;
    border: 1px solid #dae1e7;
}
.newsletter input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 25px;
    outline: none;
    color: var(--primary-dark);
}

/* --- CONTENT SECTIONS --- */
.content-section { padding: 80px 0; }
.content-section.bg-light { background: var(--light-bg); }
.content-section.bg-white { background: white; }
.content-section.bg-dark {
    background: var(--primary-dark);
    color: white;
}
.content-section.bg-dark .section-title { color: white; }
.content-section.bg-dark p { color: rgba(255,255,255,0.8); }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.two-col-3 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
    align-items: center;
}

/* Info cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}
.info-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(2,29,68,0.08);
    border-top: 3px solid var(--primary-light);
}
.info-card i { font-size: 2rem; color: var(--primary-light); margin-bottom: 15px; }
.info-card h3 { color: var(--primary-dark); font-weight: 700; margin-bottom: 10px; font-size: 1.1rem; }
.info-card p { color: var(--text-light); font-size: 0.9rem; }

/* Values grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 30px;
}
.value-item {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 25px;
    border-radius: 8px;
}
.value-item i { font-size: 1.8rem; color: #7a9cc8; margin-bottom: 12px; }
.value-item h4 { color: white; font-weight: 700; margin-bottom: 8px; }
.value-item p { color: rgba(255,255,255,0.75); font-size: 0.9rem; }

/* Serment */
.serment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 40px;
}
.serment-item {
    background: var(--primary-dark);
    color: white;
    padding: 35px 25px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(2,29,68,0.15);
}
.serment-item i { font-size: 2.2rem; color: #7a9cc8; margin-bottom: 15px; }
.serment-item p { font-weight: 600; font-size: 1rem; }

/* Reglement */
.reglement-block {
    background: white;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(2,29,68,0.08);
    margin-bottom: 25px;
}
.reglement-block h3 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.2rem;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--light-bg);
}
.reglement-block h3 i { color: var(--primary-light); margin-right: 10px; }
.reglement-block p { color: var(--text-light); margin-bottom: 12px; font-size: 0.95rem; }
.reglement-block ul { list-style: none; }
.reglement-block ul li {
    padding: 9px 0;
    border-bottom: 1px solid #eef1f5;
    color: var(--text-light);
    font-size: 0.92rem;
}
.reglement-block ul li:last-child { border-bottom: none; }
.reglement-block ul li::before { content: '›  '; color: var(--primary-light); font-weight: bold; }

/* Contact form page */
.contact-page-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: start;
}
.contact-form-box { background: white; padding: 40px; box-shadow: 0 4px 20px rgba(2,29,68,0.08); border-radius: 8px; }
.contact-form-box h2 { color: var(--primary-dark); font-weight: 700; margin-bottom: 25px; font-size: 1.8rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--text-dark); font-weight: 600; margin-bottom: 7px; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dae1e7;
    border-radius: 5px;
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    border-color: var(--primary-light);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.contact-info-box { display: flex; flex-direction: column; gap: 20px; }
.contact-info-card {
    background: var(--primary-dark);
    color: white;
    padding: 25px;
    border-radius: 8px;
}
.contact-info-card i { font-size: 1.8rem; color: #7a9cc8; margin-bottom: 12px; }
.contact-info-card h4 { font-weight: 700; margin-bottom: 8px; }
.contact-info-card p { font-size: 0.9rem; opacity: 0.85; }

/* Clubs */
.clubs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}
.club-card {
    background: white;
    padding: 25px 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(2,29,68,0.07);
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}
.club-card:hover {
    transform: translateY(-4px);
    border-bottom-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(2,29,68,0.12);
}
.club-card i { font-size: 2rem; color: var(--primary-light); margin-bottom: 12px; }
.club-card h4 { color: var(--primary-dark); font-size: 0.9rem; font-weight: 700; }

/* --- NAV SPACE BUTTONS (top bar) --- */
.top-bar-spaces {
    display: flex;
    gap: 8px;
    align-items: center;
}
.btn-space {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.3s;
    white-space: nowrap;
    font-family: var(--font-body);
}
.btn-space-eleve {
    background-color: var(--primary-light);
    color: var(--white);
    border: 1px solid var(--primary-light);
}
.btn-space-eleve:hover, .btn-space-eleve.active {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primary-dark);
}
.btn-space-admin {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.5);
}
.btn-space-admin:hover, .btn-space-admin.active {
    background-color: var(--white);
    border-color: var(--white);
    color: var(--primary-dark);
}

/* --- FOOTER --- */
.footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 80px 0 0;
    position: relative;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}
.footer-form h2 { margin-bottom: 30px; font-size: 2rem; }
.footer-form input, .footer-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 15px 0;
    color: white;
    margin-bottom: 20px;
    font-size: 1rem;
}
.footer-form input::placeholder, .footer-form textarea::placeholder {
    color: rgba(255,255,255,0.5);
}
.footer-form input:focus, .footer-form textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-light);
}
.footer-card {
    background: white;
    color: var(--primary-dark);
    padding: 50px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.footer-card h2 { color: var(--primary-dark); margin-bottom: 5px; font-weight: 900; letter-spacing: 2px; }
.footer-card img { height: 100px; object-fit: contain; margin-bottom: 10px; }
.footer-card a { color: var(--primary-light); font-weight: bold; }
.footer-card p { margin: 4px 0; }
.footer-bottom {
    background-color: rgba(0,0,0,0.2);
    padding: 20px 0;
    margin-top: 40px;
}
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.8;
}
.social-icons a { margin-left: 20px; font-size: 1.2rem; }
.social-icons a:hover { color: var(--primary-light); }

/* --- OFF-CANVAS MENU --- */
.menu-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 1998;
}
.menu-overlay.active { display: block; }
.offcanvas-menu {
    position: fixed; top: 0; left: -310px; width: 290px; height: 100vh;
    background: var(--primary-dark); z-index: 1999;
    transition: left 0.3s ease; padding: 30px 20px; overflow-y: auto;
}
.offcanvas-menu.active { left: 0; }
.offcanvas-menu .close-btn {
    background: none; border: none; color: white; font-size: 1.5rem;
    cursor: pointer; margin-bottom: 30px; display: block; text-align: right; width: 100%;
}
.offcanvas-menu ul { display: flex; flex-direction: column; gap: 4px; }
.offcanvas-menu ul a {
    display: block; color: white; font-weight: 600; text-transform: uppercase;
    font-size: 0.9rem; padding: 12px 15px; border-radius: 5px; transition: background 0.2s;
}
.offcanvas-menu ul a:hover,
.offcanvas-menu ul a.active { background: var(--primary-light); color: white; }
.hamburger {
    display: none; background: none; border: none;
    font-size: 1.5rem; color: var(--primary-dark); cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .nav-links { display: none !important; }
    .hamburger { display: block !important; }
    .navbar .container { flex-direction: row !important; height: auto !important; padding: 10px 20px !important; }

    .programs-section { grid-template-columns: 1fr; grid-template-rows: auto; }
    .prog-main, .prog-1, .prog-2, .prog-3 { grid-column: auto; grid-row: auto; height: 300px; }
    .prog-main { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); height: auto; padding: 40px; }

    .pres-grid, .two-col, .two-col-3, .footer-grid, .contact-page-grid { grid-template-columns: 1fr; gap: 30px; }
    .card-grid, .serment-grid, .info-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .clubs-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: 1fr; }
    .stats-grid { flex-direction: column; align-items: center; }
    .hero h2 { font-size: 2.5rem; }
    .page-hero h1 { font-size: 2.2rem; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .card-grid, .serment-grid, .info-grid, .clubs-grid { grid-template-columns: 1fr; }
    .hero h2 { font-size: 1.9rem; }
    .section-title { font-size: 2rem; }
    .contact-info span { display: none; }
    .contact-info span:first-of-type { display: inline; }
}