/* Variables */
:root {
    --primary-color: #0b4eab;
    /* Bleu professionnel */
    --secondary-color: #d54ba0;
    /* Vert éducatif */
    --accent-color: #f7a01d;
    /* Touche de dynamisme */
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f4f6fa;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.section-title.text-white h2 {
    color: var(--white);
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--secondary-color);
    margin: 0 auto 1rem;
    border-radius: 2px;
}

.divider.divider-light {
    background-color: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: #083c84;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(11, 78, 171, 0.3);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Layout Utilities */
section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

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

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

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    color: var(--text-color);
}

.nav-links a:not(.btn):hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(11, 78, 171, 0.8), rgba(11, 78, 171, 0.6)), url('images/arriere.jpeg') center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    margin-top: 80px;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero .btn {
    margin: 0.5rem;
}

/* À propos */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.values-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.values-list i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.about-image img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Formations */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.card:hover {
    border-bottom: 4px solid var(--secondary-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Actualités */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-item {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-item:hover .news-img img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
}

.news-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.news-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* Témoignages */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.quote-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-card .author {
    font-weight: 700;
    color: var(--secondary-color);
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.info-list i {
    width: 40px;
    height: 40px;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.map-placeholder {
    margin-top: 2rem;
}

.map-placeholder iframe {
    max-width: 100%;
    width: 100% !important;
    border-radius: 8px;
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: 10px;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 78, 171, 0.1);
}

/* Ecolepay Section */
.ecolepay-section {
    background: linear-gradient(135deg, #0b4eab 0%, #083c84 50%, #062f6a 100%);
    color: var(--white);
    padding: 5rem 0;
    overflow: hidden;
    position: relative;
}

.ecolepay-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.ecolepay-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.ecolepay-text h2 {
    font-size: 2.4rem;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.ecolepay-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.ecolepay-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    min-width: 170px;
}

.store-btn i {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.store-btn span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.store-btn small {
    font-size: 0.72rem;
    font-weight: 400;
    opacity: 0.85;
}

.apple-btn {
    background-color: #111;
    color: var(--white);
    border: 2px solid #333;
}

.apple-btn:hover {
    background-color: #222;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.android-btn {
    background-color: var(--white);
    color: #1a1a1a;
    border: 2px solid var(--white);
}

.android-btn:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.ecolepay-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ecolepay-phone-mockup {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
}

.ecolepay-phone-mockup i {
    font-size: 9rem;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 30px rgba(46, 168, 84, 0.6));
    animation: floatPhone 3s ease-in-out infinite;
}

.ecolepay-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 168, 84, 0.35) 0%, transparent 70%);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes floatPhone {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@media (max-width: 768px) {
    .ecolepay-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ecolepay-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .ecolepay-buttons {
        justify-content: center;
    }

    .ecolepay-visual {
        display: none;
    }
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #cccccc;
    padding-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}


.footer-logo h3 {
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo p {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: #333;
    color: var(--white);
    border-radius: 50%;
    margin-right: 10px;
}

.socials a:hover {
    background-color: var(--primary-color);
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #111;
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}


/* Gallery Section */
.gallery-section {
    padding: 5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 250px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Slideshow / Diaporama */
.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: 2rem auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.mySlides {
    display: none;
    height: 500px;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slide-caption {
    color: #f2f2f2;
    font-size: 15px;
    padding: 8px 12px;
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
}

.numbertext {
    color: #f2f2f2;
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
}

.dot-container {
    text-align: center;
    padding: 20px;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--primary-color);
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

@media (max-width: 768px) {
    .mySlides {
        height: 300px;
    }
}

@media (max-width: 1220px) {
    .hero h1 {
        font-size: 2.8rem;
    }

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

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: absolute;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
    }

    .nav-links.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero .btn {
        display: block;
        margin: 1rem auto;
        width: 80%;
    }

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

@media (max-width: 490px) {
    .navbar .container {
        height: 70px;
        /* Reduire un peu la hauteur du header */
    }

    .logo {
        font-size: 1rem;
        gap: 4px;
    }

    .logo img {
        height: 38px !important;
        /* Force override inline height */
    }
}

@media (max-width: 390px) {
    .logo {
        font-size: 0;
        /* Cache le texte direct "Collège " */
    }

    .logo span {
        font-size: 1rem;
        /* Garde le nom principal visible */
    }

    .logo img {
        height: 34px !important;
        margin-right: 4px !important;
    }
}

/* Animations au scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.scrolled-into-view {
    opacity: 1;
    transform: translateY(0);
}

/* Page À Propos */
.about-page {
    padding-top: 100px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 4px solid var(--secondary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0%;
    }

    .timeline-item::after {
        left: 21px;
    }

    .timeline-item:nth-child(even)::after {
        left: 21px;
    }
}

/* Supplemental Responsive Features */
@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

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

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

    .contact-form {
        padding: 1.5rem;
    }

    .map-placeholder iframe {
        height: 300px !important;
    }

    .mission-vision {
        margin-top: 2rem !important;
        padding: 1.5rem !important;
    }

    .cards-grid,
    .news-grid,
    .testimonials-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-title h2 {
        font-size: 1.6rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero {
        min-height: 480px;
    }

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

    .hero .btn {
        width: 100%;
        margin: 0.5rem 0;
    }

    .btn-large {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .cards-grid,
    .news-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem 1rem !important;
    }

    .news-img {
        height: 180px;
    }

    .navbar .container {
        padding: 0 15px;
    }

    .about-image img {
        height: auto;
    }

    .contact-form {
        padding: 1.5rem 1rem;
    }

    footer {
        padding-top: 2rem;
    }

    .footer-content {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .timeline::after {
        left: 20px;
    }
}