/* ============================================
   École Digitale - Styles Globaux
   ============================================ */

/* Import Google Fonts - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* ============================================
   Variables CSS
   ============================================ */
:root {
    --primary-color: #28a745;
    --primary-hover: #218838;
    --secondary-color: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    font-weight: 300;
}

.text-light {
    font-weight: 300;
}

.text-muted {
    color: var(--text-muted);
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.navbar-brand span {
    color: var(--text-dark);
}

.navbar-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-dark);
    font-weight: 400;
    transition: var(--transition);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary-color);
}

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

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 50%;
}

.card-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--primary-color);
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.card-text {
    color: var(--text-muted);
    font-weight: 300;
}

/* ============================================
   Grid System
   ============================================ */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.9), rgba(33, 136, 56, 0.9)),
                url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?w=1600&q=80') center/cover;
    color: var(--bg-white);
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    font-weight: 300;
    animation: fadeInUp 0.8s ease 0.2s;
    animation-fill-mode: both;
}

.hero .btn {
    animation: fadeInUp 0.8s ease 0.4s;
    animation-fill-mode: both;
}

/* ============================================
   Stats Section
   ============================================ */
.stats {
    background-color: var(--bg-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--bg-white);
    text-align: center;
    padding: 80px 20px;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

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

.cta .btn:hover {
    background-color: var(--bg-light);
    transform: scale(1.05);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section a {
    font-weight: 300;
    margin-bottom: 10px;
    display: block;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--text-dark);
    color: var(--bg-white);
    padding: 20px;
    box-shadow: var(--shadow-md);
    z-index: 9999;
    display: none;
    animation: slideUp 0.5s ease;
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner p {
    margin: 0;
    font-weight: 300;
}

.cookie-banner a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
}

.cookie-banner .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* ============================================
   Form Styles
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* ============================================
   Blog Styles
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.blog-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.blog-card-content {
    padding: 25px;
}

.blog-card-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.blog-card-excerpt {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 300;
}

.blog-article {
    max-width: 800px;
    margin: 0 auto;
}

.blog-article-header {
    margin-bottom: 40px;
}

.blog-article-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.blog-article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.blog-article-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.blog-article-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablette */
@media (max-width: 992px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .grid-3,
    .grid-4,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .section {
        padding: 50px 0;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .hero {
        min-height: 500px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-white);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.active {
        left: 0;
    }

    .navbar-toggle {
        display: flex;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-banner .btn {
        width: 100%;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 10px;
}

.mb-2 {
    margin-bottom: 20px;
}

.mb-3 {
    margin-bottom: 30px;
}

.mt-1 {
    margin-top: 10px;
}

.mt-2 {
    margin-top: 20px;
}

.mt-3 {
    margin-top: 30px;
}

.d-none {
    display: none;
}

.d-block {
    display: block;
}
