@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

/* ================ Réinitialisation de base ================ */
* {
    margin:0; 
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: "Jost", sans-serif;
}

/* ================ Variables CSS ================ */
:root {
    --bg-color: #081b29; 
    --second-bg-color: #112e42; 
    --text-color: #ededed; 
    --main-color: #00abf0;
    --hover-color: #00abf0;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all .3s ease;
    backdrop-filter: blur(10px);
}

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


.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: 4s ease-in-out;
}
.navbar-logo:hover {
    animation: scaleUp 0.3s ease-in-out;
}
.logo-container img {
    width: 60px;
    height: 50px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.logo-text span.animate {
    position: relative;
}

.navbar {
    position: relative;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .3s;
}

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

#menu-icon {
    position: relative;
    font-size: 3.6rem;
    color: var(--text-color);
    cursor: pointer;
    display: none;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

/* ================ Section Accueil ================ */
.home {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 9%;
    background: linear-gradient(rgba(8,27,41,0.93), rgba(8,27,41,0.93)),
        url("/assets/images/logo/Logo.png") no-repeat center center;
    background-size: 50% auto; 
    background-position: center 35%;
    position: relative;
    min-height: 100vh;
    padding: 10rem 9% 2rem;
    margin-top: 80px;
    overflow: hidden;
}

.home-content {
    max-width: 100%;
    z-index: 2;
    width: 100%;
    text-align: center;
}

.home-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(2px); 
    z-index: 1;
}

.home-content h1 {
    font-size: 6rem;
    white-space: nowrap; 
    margin-bottom: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content .text-animate {
    position: relative;
    display: inline-block;
    width: auto;
    margin: 0 auto;
}

.text-animate-wrapper {
    position: relative;
    display: inline-block;
}

.animated-text {
    position: relative;
    font-size: 3.2rem;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: .7px var(--main-color);
    background-image: linear-gradient(var(--main-color), var(--main-color));
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 0% 100%;
    animation: textFill 6s linear infinite;
}

.animated-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    border-right: 2px solid var(--main-color);
    animation: 
        cursorMove 6s linear infinite,
        cursorBlink 0.7s step-end infinite;
}

.home-content p {
    position: relative;
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
}

.btn-box {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 2rem;
    height: 5rem;
    opacity: 0;
    animation: fadeInUp 1s forwards;
    animation-delay: 2s;
}

.btn-box .btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 15rem;
    height: 100%;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: .8rem;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: .1rem;
    color: var(--bg-color); 
    z-index: 1;
    overflow: hidden;
}

.btn-box .btn:hover {
    color: var(--main-color);
    scale: 1.1;
    border: 2px solid var(--hover-color);
    background-color: transparent;
    font-weight: 500;
    box-shadow: 0 0 30px var(--hover-color)
}

.btn-box .btn:nth-child(2) {
    background: transparent;
    color: var(--main-color);
}

.btn-box .btn:nth-child(2):hover {
    color: var(--bg-color);
}

.btn-box .btn:nth-child(2)::before {
    background: var(--main-color);
}

.btn-box .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--bg-color);
    z-index: -1;
    transition: .5s;
}

.btn-box .btn:hover::before {
    width: 100%;
}

.home-sci{
    padding-top: 5rem;
    z-index: 2;
    opacity: 0;
    animation: fadeInLeft 1s forwards;
    animation-delay: 2.5s;
}

.home-sci a {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 20px;
    color: var(--main-color);
    z-index: 1;
    overflow: hidden;
    transition: .5s;
}

.home-sci a:hover {
    color: var(--bg-color);
}

.home-sci a::before {
    content: ''; 
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--main-color);
    z-index: -1;
    transition: .5s;
}

.home-sci a:hover::before {
    width: 100%;
}

.home-imgHover {
    display: none;
}

.home-imgHover:hover {
    background: var(--bg-color);
    opacity: .8;
}

.cta-box {
    background: rgba(0, 171, 240, 0.1);
    border: 2px solid var(--main-color);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem auto;
    text-align: center;
    width: 100%;
    backdrop-filter: blur(5px);
}

.cta-box .btn {
    animation: pulse 4s infinite;
     padding: 0.5rem 1rem;
    background: var(--main-color);
    color: var(--bg-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

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

.cta-box h3 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
}

/* ================ Section A propos ================ */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 2rem; 
    background: linear-gradient(135deg, 
        var(--second-bg-color) 0%, 
        rgba(17, 46, 66, 0.95) 100%);
    padding-bottom: 6rem;
}

.heading {
    position: relative;
    font-size: 4rem;
    margin-bottom: 3rem;
    text-align: center;
}

span {
    color: var(--main-color);
}

.about-img {
    position: relative;
    width: 25rem;
    height: 25rem;
    border-radius: 5%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.about-img img {
    width: 90%;
    border-radius: 50%;
    border: .2rem solid var(--main-color);
}

.about-img .circle-spin {
    position: absolute;
    top: 50%;
    left: 50%; 
    transform: translate(-50%, -50%) rotate(0);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-top: .2rem solid var(--second-bg-color);
    border-bottom: .2rem solid var(--second-bg-color);
    border-left: .2rem solid var(--main-color);
    border-right: .2rem solid var(--main-color);
    animation: aboutSpinner 8s linear infinite; 
}

.about-content {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.founder-section {
    width: 100%;
    margin-top: 5rem;
}

.founder-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 3rem;
}

.founder-img {
    flex: 0 0 300px;
}

.founder-img img {
    width: 100%;
    border-radius: 1rem;
    border: 3px solid var(--main-color);
    box-shadow: 0 0 2rem var(--main-color);
}

.founder-details {
    flex: 1;
    font-size: 1.5rem;
    text-align: justify;
}

.founder-details a {
    color: var(--main-color);
    font-size: 2rem;
    gap: 2;
}

.founder-details a:hover {
    color: aquamarine; 
}
.founder-details a.active-nav {
    color: rgb(185, 54, 54);
}

.founder-details h4 {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 1.5rem;
}

.founder-socials {
    margin-top: 2rem;
}

.founder-socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 20px;
    color: var(--main-color);
    margin-right: 1rem;
    transition: .5s linear;
}

.founder-socials a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    scale: 1.3;
    filter: drop-shadow(0 0 10px var(--hover-color));
}

.team-section {
    padding: 6rem 9% 8rem;
    width: 100%;
}

.team-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4rem;
    margin-top: 5rem;
}


.team-member {
    flex: 1 1 25rem;
    background: var(--bg-color);
    padding: 3rem 2rem;
    border-radius: 1rem;
    text-align: center;
    border: .2rem solid var(--second-bg-color);
    transition: 0.5s ease-in-out;
}

.team-member:hover {
    border-color: var(--hover-color);
    transform: translateY(-10px);
    box-shadow: 0 0 50px var(--hover-color);
    scale: 1.03;
}

.member-img {
    width: 15rem;
    height: 15rem;
    border-radius: 50%;
    margin: 0 auto 2rem;
    overflow: hidden;
    border: .5rem solid var(--main-color);
}

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

.team-member h3 {
    font-size: 2.2rem;
}

.team-member p {
    font-size: 1.4rem;
    margin: 1rem 0;
    color: var(--main-color);
}

.member-socials {
    margin-top: 1.5rem;
}

.member-socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 0 1rem;
      transition: .5s linear;
}

.member-socials a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
    scale: 1.3;
    filter: drop-shadow(0 0 10px var(--hover-color));
}

.elem {
    flex: 1;
    text-align: center;
    padding: 20px;
    padding-left: 20px;
    padding-right: 20px;
    margin: 10px;
    border: 2px solid #0ef; 
    box-shadow: 0px 2px 7px var(--hover-color);
    border-radius: .6rem;
}

.elem h3 {
    position: relative;
    font-size: 2.6rem;
    padding: 20px;
}

.elem p {
    position: relative;
    text-align: justify;
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

.btn-box.btns {
    display: inline-block;
    width: 15rem;
}

.btn-box.btns a::before {
    background: var(--second-bg-color);
}

.education {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: auto;
}

.education .education-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

.education-row .education-column {
    flex: 1 1 40rem;
}

.education-column .title {
    position: relative;
    display: inline-block;
    font-size: 2.5rem;
    margin: 0 0 1.5rem 2rem;
}

.education-column .education-box {
    position: relative;
    border-left: .2rem solid var(--main-color);
}

.education-box .education-content {
    position: relative;
    padding-left: 2rem;
}

.education-box .education-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1.1rem;
    width: 2rem;
    height: 2rem;
    background: var(--main-color);
    border-radius: 50%;
}

.education-content .content {
    position: relative;
    padding: 1.5rem;
    padding-left: 2.5rem; 
    border: .2rem solid var(--main-color);
    border-radius: .6rem;
    margin-bottom: 2rem;
    overflow: hidden;
    font-size: 1.5rem;; 
}

.education-content .content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--second-bg-color);
    z-index: -1;
    transition: .5s;
}

.education-content .content:hover::before {
    width: 100%;
}

.education-content .content .year {
    font-size: 1.5rem;
    color: var(--main-color);
    padding-bottom: .5rem;
}

.education-content .content .year i {
    padding-right: .5rem;
}

.education-content .content h3 {
    font-size: 2rem;
}

.education-content .content p {
    font-size: 1.6rem;
    padding-top: .5rem;
}

.cours-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 3rem;
}

.cours-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 380px;
    background: var(--second-bg-color);
    transition: box-shadow .3s;
}

.cours-box img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 0;
    border-radius: 1rem;
    display: block;
    transition: .5s cubic-bezier(.22,.68,.62,1.12);
}

.cours-box:hover img {
    transform: scale(1.07);
    filter: brightness(1.1) contrast(1.12);
}

.cours-layer {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.20) 20%, var(--main-color) 100%);
    display: flex; 
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center; 
    padding: 2.5rem; 
    flex:1; 
    z-index: 2;
    transition: background .5s;
}

.cours-layer h3 {
    font-size: 2.1rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    margin-top: 2rem; 
    text-shadow: 0 3px 8px rgba(0,0,0,.22);
}

.cours-layer p {
    font-size: 1.3rem;
    color: #f5f5f5;
    margin-bottom: 1rem;
    text-shadow: 0 1px 5px rgba(0,0,0,.15);
}

.cours-layer a.btn1 {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2.2rem;
    background: var(--text-color);
    color: var(--second-bg-color);
    border: none;
    border-radius: 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    box-shadow: 0 2px 10px 0 rgba(0,0,0,0.08);
    transition: background 0.22s, color 0.22s, transform 0.18s;
    cursor: pointer;
    margin-top: 0.6rem;
    text-decoration: none;
}

.cours-layer a.btn1:hover {
    background: var(--second-bg-color);
    color: var(--main-color);
    transform: scale(1.08);
}

.cours-layer a.btn1 i {
    font-size: 1.65rem;
    color: inherit;
    margin-right: 0.4rem;
}

/* ========== FORMULAIRE D'INSCRIPTION ========== */
.inscription {
    min-height: auto;
    padding-bottom: 8rem;
    background: var(--second-bg-color);
}

.inscription-form {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    background: var(--bg-color);
    border-radius: 1rem;
    box-shadow: 0 0 2rem rgba(0,0,0,0.15);
    padding: 3rem 2rem;
}

.inscription-form h3 {
    font-size: 2.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--main-color);
    font-weight: 600;
    letter-spacing: 1px;
}

.input-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-group {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.inscription-form input,
.inscription-form select,
.inscription-form textarea {
    width: 100%;
    padding: 1.2rem 1rem;
    font-size: 1.5rem;
    color: var(--text-color);
    background: var(--second-bg-color)!important; 
    border-radius: .6rem;
    border: .2rem solid var(--main-color)!important; 
    transition: border-color .3s;
    margin-bottom: .5rem;
}

.inscription-form input:focus,
.inscription-form select:focus,
.inscription-form textarea:focus {
    border-color: var(--hover-color);
    outline: none;
}

.inscription-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230ef' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    background-size: 1.5rem;
}

.inscription-form option {
    color: #081b29;
    background: #ededed;
}

.textarea-field {
    margin: 2rem 0;
}

.textarea-field textarea {
    width: 100%;
    height: 20rem;
    padding: 1.2rem;
    font-size: 1.5rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .6rem;
    border: .2rem solid var(--main-color);
    resize: vertical;
}

.inscription-form .declaration {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    font-size: 1.3rem;
    gap: 1rem;
}
.inscription-form .declaration label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.4rem;
}

.inscription-form .declaration input[type="checkbox"] {
    accent-color: var(--main-color);
    width: 1.5rem;
    height: 1.5rem;
}

.btn-box.btns {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    width: 100%;
    text-align: center;
}

.btn-box .btn,
.inscription-form button[type="submit"] {
    padding: 1rem 3rem;
    background: var(--main-color);
    border: none;
    border-radius: 2rem;
    font-size: 1.6rem;
    color: var(--bg-color);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 1rem var(--main-color);
    transition: background .3s, color .3s, transform .3s;
}

.btn-box .btn:hover,
.inscription-form button[type="submit"]:hover {
    background: var(--hover-color);
    color: var(--text-color);
    transform: scale(1.05);
}

.inscription-form .error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.25rem;
}

/* Section Actualités */
.news {
    background: var(--bg-color);
    min-height: auto;
    padding-bottom: 7rem;
}

section#news .news-card {
    flex: 1 1 35rem !important;
    background: var(--second-bg-color, #f7f7f7) !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2) !important;
    transition: .5s ease !important;
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 1rem !important;
    position: relative !important;
}

#news-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 5rem;
    justify-content: center;
    background: var(--bg-color);
}

.news-card:hover {
    transform: translateY(-1rem);
}
.news-img-container {
    width: 100%;
    height: 25rem;
    overflow: hidden;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.news-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.news-card:hover .news-image {
    transform: scale(1.1);
}

.news-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    background: inherit;
}

.news-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: bold;
    color: var(--text-color, #2d2d2d);
}

.news-summary {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-color)
}

.news-date {
    display: block;
    font-size: 1.2rem;
    color: var(--main-color, #ee2180);
    margin-bottom: 1rem;
    margin-top: auto;
}

.btn-primary,
.news-content .btn-primary,
.news-content .btn1 {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color, #ee2180);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color, #ee2180);
    font-size: 1.6rem;
    color: var(--second-bg-color, #fff);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    width: auto;
    max-width: 100%;
    margin-top: 1.2rem;
    transition: .5s ease-in-out;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.news-content .btn-primary:hover, .news-content .btn1:hover {
    box-shadow: none;
    scale: 1.1;
    color: var(--bg-color, #222);
    background: rgb(235, 128, 208);
    border: 2px solid var(--hover-color, #e41ae7);
}
.no-news-message {
    font-size: 1.4rem;
    color: #b00;
    text-align: center;
    width: 100%;
    margin-top: 2rem;
}

/* ---- MODALE NEWS  ---- */
#news-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(5px);
}

#modal-news-body {
  background: var(--second-bg-color);
  margin: 2vh auto;
  padding: 2.5rem;
  border-radius: 1rem;
  border: 2px solid var(--main-color);
  width: 90%;
  max-width: 800px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  animation: fadeIn 0.4s;
}

#modal-news-body h2 {
  font-size: 3rem;
  color: var(--main-color, #00abf0);
  margin-bottom: 0.7rem;
  text-align: center;
  word-break: break-word;
}
#modal-news-body .news-modal-date,
#modal-news-body .news-date {
  color: #80bfff;
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
  display: block;
  text-align: center;
}

#modal-news-body .modal-img-container {
  width: 100%;
  max-height: 60vh;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: 0.8rem;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
}

#modal-news-body .modal-image {
    max-width: 100%;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.6rem;
    transition: max-height 0.18s;
}

#modal-news-body .modale-content {
  font-size: 2rem;
  line-height: 1.6;
  color: var(--text-color);
  padding: 0 1rem;
}

@media (max-width: 900px) {
  #modal-news-body {
    width: 90%;
    padding: 2rem; 
  }
}
@media (max-width: 600px) {
  #modal-news-body {
    width: 95%;
    padding: 1.5rem;
    margin: 1vh auto;
  }
  #modal-news-body h2 {
    font-size: 1.4rem !important;
    margin-bottom: 0.5rem;
  }
  #modal-news-body .news-modal-date,
  #modal-news-body .news-date {
    font-size: 0.98rem !important;
    margin-bottom: 0.6rem;
  }
  #modal-news-body .modal-img-container {
    max-height: 50vh;
  }
  #modal-news-body .modal-image {
    max-height: 58vw;
    min-height: 110px;
    border-radius: 9px;
  }
}

#modal-news-body .modale-content,
#modal-news-body .news-content {
  font-size: 1.5rem;
  line-height: 1.65;
  color: var(--text-color, #ededed);
  margin: 1.2rem 0 1.8rem 0;
  padding: 0 0.6rem;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

#modal-news-body p, 
#modal-news-body li {
    font-size: 2rem;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto;
}

#modal-news-body .close-modal-btn {
  display: inline-block;
  margin: 1.2rem auto 0 auto;
  background: var(--main-color, #00abf0);
  color: var(--bg-color, #081b29);
  border: none;
  border-radius: 7px;
  padding: 0.7rem 2.4rem;
  font-size: 1.12rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 8px 0 rgba(0,171,240,0.08);
  transition: background 0.18s;
}
#modal-news-body .close-modal-btn:hover {
  background: #0092cc;
  color: #fff;
}

@media (max-width: 428px) {
  #modal-news-body .modal-image {
    max-height: 65vw;
    min-height: 80px;
  }
  #modal-news-body {
    padding: 1rem;
    border-radius: 0.5rem;
  }
  #modal-news-body .modale-content,
  #modal-news-body .news-content {
    font-size: 0.98rem !important;
    margin: 0.6rem 0 1.1rem 0 !important;
    padding: 0 0.14rem !important;
  }
}
@media (max-width: 360px) {
  #modal-news-body .modal-image {
    max-height: 80vw;
    min-height: 60px;
  }
  #modal-news-body {
    border-radius: 5px;
  }
}

#modal-news-body,
#modal-news-body .modale-content,
#modal-news-body .news-content {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

/* Section Partenaires */
.partners {
    padding: 8rem 9%;
    position: relative;
    overflow: hidden;
    background: var(--second-bg-color);
}

.partners-wrapper {
    display: flex;
    width: 100%;
    overflow: hidden;
}

.partners-container {
    display: flex;
    animation: scroll 30s linear infinite;
    padding: 2rem 0;
    gap: 4rem;
}

.partner-logo {
    flex: 0 0 auto;
    width: 180px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    position: relative;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--main-color);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--main-color);
    box-shadow: 0 0 10px var(--main-color);
    transform: scale(1.2);
}

.contact {
    min-height: auto;
    padding-bottom: 7rem;
}

.contact h2 {
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.contact form {
    max-width: 70rem;
    margin: 0 auto;
    text-align: center;
}

.contact form .input-box {
    position: relative;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact form .input-box .input-field {
    position: relative;
    width: 49%;
    margin: .8rem 0;
}

.contact form .input-box .input-field input,
.contact form .textarea-field textarea {
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: transparent;
    border-radius: .6rem;
    border: .2rem solid var(--main-color);
}

.contact form .input-box .input-field input::placeholder,
.contact form .textarea-field textarea::placeholder {
    color: var(--text-color);
}

.contact form .focus {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--second-bg-color);
    border-radius: .6rem;
    z-index: -1;
    transition: .5s;
}

.contact form .input-box .input-field input:focus~.focus,
.contact form .input-box .input-field input:valid~.focus,
.contact form .textarea-field textarea:focus~.focus,
.contact form .textarea-field textarea:valid~.focus {
    width: 100%;
}

.contact form .textarea-field {
    position: relative;
    margin: .8rem 0 2.7rem;
    display: flex;
}

.contact form .textarea-field textarea {
    resize: none;
}

.contact form .btn-box.btns .btn {
    cursor: pointer;
}

/* ================ Modal ================ */
.modale {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modale-content {
    background-color: var(--second-bg-color);
    margin: 5% auto;
    padding: 3rem;
    border: .2rem solid var(--main-color);
    border-radius: 1rem;
    width: 80%;
    max-width: 900px;
    position: relative;
    animation: fadeIn 0.5s;
}

.close {
    color: var(--main-color);
    float: right;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: var(--text-color);
    transform: rotate(90deg);
}

.modale-body {
    padding: 2rem 0;
    font-size: 1.6rem;
    line-height: 1.6;
}

.modale-body h3 {
    color: var(--main-color);
    margin-bottom: 1.5rem;
    font-size: 2.4rem;
}

.modale-body p, .modale-body ul {
    margin-bottom: 1.5rem;
}

.modale-body ul {
    padding-left: 2rem;
}

/* Footer Style  */
.footer {
    position: relative;
    background: linear-gradient(135deg, 
        var(--second-bg-color) 0%, 
        #0a2538 50%, 
        var(--bg-color) 100%);
    color: rgba(255, 255, 255, 0.9);
    padding-top: 3rem;
    overflow: hidden;
    font-family: 'Jost', sans-serif;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.3);
}

/* Effet de vague animée */
.footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%23081b29" opacity=".5"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="%23081b29" opacity=".25"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23081b29"/></svg>');
    background-size: cover;
    animation: waveAnimation 8s linear infinite;
    filter: drop-shadow(0 -5px 10px rgba(0, 171, 240, 0.2));
}

@keyframes waveAnimation {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; 
    gap: 2rem;
    padding-bottom: 2rem;
    align-items: start;
}

/* Style des liens */
.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer a:hover {
    color: var(--main-color);
    transform: translateX(5px);
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--main-color);
    transition: width 0.3s ease;
}

.footer a:hover::after {
    width: 100%;
}
.footer-links {
    display: flex;
    gap: 3rem; 
    justify-content: center; 
}

/* Groupe de liens */
.links-group {
    margin-bottom: 0;
    flex: 1;
    max-width: 200px;
}

.links-group h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    display: inline-block;
}

.links-group h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--main-color);
}

.links-group a {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

/* Section contact */
.footer-contact p {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-contact i {
    color: var(--main-color);
    font-size: 1.5rem;
    min-width: 25px;
}

/* Brand section */
.footer-brand {
    animation: fadeInUp 0.8s ease-out forwards;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 2rem;
}

.footer-logo {
    width: 70px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 171, 240, 0.3));
    transition: transform 0.5s ease;
}

.footer-logo:hover {
    transform: rotate(-5deg) scale(1.05);
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: .5rem;
    color: white;
}

.footer-brand p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* Footer bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.5rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 171, 240, 0.4);
}

.copyright {
    text-align: center;
    font-size: 1.4rem;
    opacity: 0.7;
    flex-grow: 1;
}

.copyright a {
    color: var(--main-color);
    font-weight: 600;
}

/* Bouton back-to-top */
.back-to-top {
    position: static;
    margin-left: auto;
    transform: translateY(-50%);
    right: 2rem;
    top: -30px;
    width: 60px;
    height: 60px;
    background: var(--main-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 171, 240, 0.5);
    transition: all 0.4s ease;
    animation: pulse 2s infinite;
    color: var(--bg-color);
    font-size: 1.5rem;
    opacity: 0.9;
}

.back-to-top:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 5px 25px rgba(0, 171, 240, 0.7);
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modale-content {
    background-color: var(--second-bg-color);
    margin: 5% auto;
    padding: 3rem;
    border: .2rem solid var(--main-color);
    border-radius: 1rem;
    width: 80%;
    max-width: 900px;
    position: relative;
    animation: fadeIn 0.5s;
}

.close {
    color: var(--main-color);
    float: right;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close:hover {
    color: var(--text-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem 0;
    font-size: 1.6rem;
    line-height: 1.6;
}

/* animation pour les cartes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Effet parallaxe */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Animation texte dégradé */
.gradient-text {
    background: linear-gradient(45deg, #00abf0, #00ff95, #00abf0);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient 8s ease infinite;
}


/* MODALE DE CONNEXION */
.modal {
  display: none; 
  position: fixed; 
  z-index: 9999; 
  left: 0; top: 0; width: 100vw; height: 100vh;
  overflow: auto; 
  background-color: rgba(0,0,0,0.55);
}

.modal-content {
  background-color: #fefefe;
  margin: 8vh auto;
  padding: 30px 25px 18px 25px;
  border-radius: 12px;
  border: 1.5px solid #e6e6e6;
  max-width: 420px;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.14);
  animation: popupShow .3s;
}

@keyframes popupShow {
  from { transform: translateY(-50px); opacity: 0;}
  to   { transform: translateY(0); opacity: 1;}
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1e355d;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.modal .close {
  float: right;
  font-size: 2rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  margin-top: -10px;
}
.modal .close:hover { color: #d64545; }

.btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  transition: .16s;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.045);
  font-weight: 600;
}
.btn:hover {
  background: #f3f7fa;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  width: 100%;
  padding: 10px 9px;
  margin: 7px 0;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  box-sizing: border-box;
  background: #fafcff;
}
label {
  font-size: 1rem; color: #1e355d; font-weight: 500;
}
.form-group { margin-bottom: 1.2rem; }

@media (max-width: 600px) {
  .modal-content { width: 98vw; padding: 14px 6vw 12px 6vw; }
}

/* ===================== MODALE DE CONNEXION ÉTUDIANT ===================== */
.student-auth-modal {
  display: none; 
  position: fixed; 
  z-index: 9999; 
  left: 0; top: 0; width: 100vw; height: 100vh;
  overflow: auto; 
  background-color: rgba(0,0,0,0.55);
}

.student-auth-modal .modal-content {
  background-color: #fefefe;
  margin: 8vh auto;
  padding: 30px 25px 18px 25px;
  border-radius: 12px;
  border: 1.5px solid var(--main-color);
  max-width: 420px;
  box-shadow: 0 4px 32px 0 rgba(0,0,0,0.14);
  animation: student-popupShow .3s;
}

@keyframes student-popupShow {
  from { transform: translateY(-50px); opacity: 0;}
  to   { transform: translateY(0); opacity: 1;}
}

.student-auth-modal .modal-content h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1e355d;
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.student-auth-modal .close {
  float: right;
  font-size: 2rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  margin-top: -10px;
  background: none;
}
.student-auth-modal .close:hover { color: #d64545; }

.student-auth-modal .btn {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  transition: .16s;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.045);
  font-weight: 600;
  width: 100%;
}
.student-auth-modal .btn:hover {
  background: #f3f7fa;
}

.student-auth-modal input[type="text"], 
.student-auth-modal input[type="email"], 
.student-auth-modal input[type="password"], 
.student-auth-modal input[type="number"] {
  width: 100%;
  padding: 10px 9px;
  margin: 7px 0;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  box-sizing: border-box;
  background: #fafcff;
  font-size: 1rem;
}
.student-auth-modal label {
  font-size: 1rem; color: #1e355d; font-weight: 500;
}
.student-auth-modal .form-group { margin-bottom: 1.2rem; }

.student-auth-modal #student-auth-status span,
.student-auth-modal #register-status span {
  padding: 4px 10px;
  border-radius: 5px;
}

.student-auth-modal #student-auth-status .error,
.student-auth-modal #register-status .error {
  color: #d64545;
  text-align: center;
  font-weight: 500;
}
.student-auth-modal #student-auth-status .info,
.student-auth-modal #register-status .info {
  color: #fff;
  background: #1e355d;
}

.modal.student-auth-modal .student-connected-area .profile-photo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  margin: 0 auto 10px auto;
  box-shadow: 0 2px 8px rgba(30,53,93,0.10);
  border: 2px solid var(--hover-color);
  background: #eee;
  vertical-align: middle;
}

.modal.student-auth-modal .student-connected-area .profile-photo.placeholder {
  background: #1e355d;
  color: #fff;
  font-size: 2.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.student-auth-modal #student-auth-status .success,
.student-auth-modal #register-status .success {
  color: #fff;
  background: var(--main-color); 
}

.modal.student-auth-modal .modal-content .student-connected-area {
  text-align: center;
  margin: 0 auto 1.2rem auto;
}

.modal.student-auth-modal .student-connected-area p {
  font-size: 1.1rem;
  color: #1e355d;
  margin-bottom: 2rem;
  font-weight: 500;
}

.modal.student-auth-modal .student-connected-area .welcome-user {
  font-size: 1.25rem;
  color: var(--main-color);
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: block;
  letter-spacing: 0.2px;
}

.modal.student-auth-modal .student-connected-area .student-logout-btn {
  background: #d64545;
  color: #fff;
  width: 90%;
  margin: 1rem auto 0 auto;
  border: none;
  border-radius: 7px;
  padding: 10px 0;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 1px 6px 0 rgba(30,53,93,0.055);
  cursor: pointer;
  transition: background .18s;
}

.modal.student-auth-modal .student-connected-area .student-logout-btn:hover {
  background: #b61f1f;
}

.modal.student-auth-modal .student-connected-area .bib-link-btn {
  background: var(--main-color);
  color: #fff;
  width: 90%;
  margin: 2rem auto 0 auto;
  border: none;
  border-radius: 7px;
  padding: 12px 0;
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 1px 6px 0 rgba(30,53,93,0.065);
  cursor: pointer;
  transition: background .17s;
  display: block;
  text-decoration: none;
}

.modal.student-auth-modal .student-connected-area .bib-link-btn:hover {
  background: rgb(27, 93, 193);
}
.user-icon {
    display: none;
}

@media (max-width: 600px) {
  .student-auth-modal .modal-content { width: 98vw; padding: 14px 6vw 12px 6vw; }
}

/* Design pour les cours */
.cours-details {
    background: var(--second-bg-color);
    padding: 8rem 9%;
    border-radius: 1rem;
    margin: 3rem auto;
    max-width: 1200px;
}

.titre-cours {
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 0 2rem rgba(0, 0, 0, 0.2);
}

.titre-cours h2 {
    color: var(--main-color);
    font-size: 3.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.titre-cours h3 {
    font-size: 2.5rem;
    color: var(--main-color);
    margin: 2rem 0 1rem;
}

.titre-cours p, 
.titre-cours ol, 
.titre-cours ul {
    font-size: 1.6rem;
    line-height: 1.6;
    margin: 1.5rem;
    text-align: justify;
}

.titre-cours ul ul {
    margin-left: 2rem;
}

.titre-cours li {
    margin-bottom: 0.5rem;
}

.apercu, .objectifs, .resultas, .competences {
    color: var(--text-color) !important;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

/* ANIMATION RELOAD AND SCROLL  */
.animate {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 98;
    animation: showRight 1s ease forwards;
    animation-delay: calc(.3s * var(--i));
}

.animate.home-img {
    width: 50%;
}

.logo .animate, 
.navbar .animate,
#menu-icon .animate,
.home.show-animate .animate {
    animation: showRight 1s ease forwards;
    animation-delay: calc(.3s * var(--i));
}

.animate.scroll {
    transition: 1s ease;
    transition-delay: calc(.3s / var(--i));
    animation: none;
}

section:nth-child(odd) .animate.scroll, 
.footer .animate.scroll {
    background: var(--second-bg-color);
}

.education .education-box .animate.scroll {
    width: 105%;
}

.home.show-animate .animate.scroll,
.about.show-animate .animate.scroll,
.education.show-animate .animate.scroll, 
.cours.show-animate .animate.scroll, 
.contact.show-animate .animate.scroll,
.footer.show-animate .animate.scroll  {
    transition-delay: calc(.3s * var(--i));
    width: 0;
}


/* ================ Animation ================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1.5rem); }
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from { 
        opacity: 0;
        transform: translateX(-20px);
    }
    to { 
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes textFill {
    0% { 
        background-size: 0% 100%;
        -webkit-text-stroke: .7px var(--main-color);
    }
    100%, 100% { 
        background-size: 100% 100%;
    }
}

@keyframes cursorMove {
    0% { width: 0 }
    100% { width: 100% }
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1 }
    50% { opacity: 0 }
}

@keyframes aboutSpinner {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes showRight {
    100% {
        width: 0;
    }
}

@keyframes pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(0, 171, 240, 0.7),
                    0 0 0 0 rgba(0, 171, 240, 0.4); 
    }
    70% { 
        box-shadow: 0 0 0 15px rgba(0, 171, 240, 0),
                    0 0 0 30px rgba(0, 171, 240, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(0, 171, 240, 0),
                    0 0 0 0 rgba(0, 171, 240, 0); 
    }
}

/* Responsive Design */
@media (max-width:1200px) {
    html {
        font-size: 55%
    }
    .logo-text {
        font-size: 1.5rem;
        font-weight: 600;
    }
    .navbar a {
        font-size: 1.2rem;
        margin-left: 1.5rem;
        padding: 0.2rem 0.6rem;
    }
    .navbar {
        flex-wrap: nowrap;
    }
    .partner-logo {
        width: 160px;
        height: 90px;
    }
}

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

/* Cas général : quand il y a 2 éléments seuls sur la dernière ligne */
.cours-container .cours-box:nth-last-child(2):nth-child(3n+1),
.cours-container .cours-box:last-child:nth-child(3n+2) {
    grid-column: span 1.5; /* Chacun occupe 1.5 colonne */
}

/* Cas spécifique pour 8 éléments */
.cours-container .cours-box:nth-child(7):nth-last-child(2),
.cours-container .cours-box:nth-child(8):last-child {
    grid-column: span 1.5;
    width: 100%;
}

@media (max-width: 992px) {
    .header {
        padding: 2rem 4%;
    }
     .navbar-logo {
        height: 35px;
    }
    .navbar a {
        font-size: 1rem;
        margin-left: 0.7rem;
        padding: 0.1rem 0.2rem;
    }
    .logo-text {
        font-size: 1rem;
        font-weight: 600;
    }
    .cours-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .cours-container .cours-box:nth-last-child(2):nth-child(3n+1),
    .cours-container .cours-box:last-child:nth-child(3n+2),
    .cours-container .cours-box:nth-child(7):nth-last-child(2),
    .cours-container .cours-box:nth-child(8):last-child {
        grid-column: span 1;
    }
    .partners-container {
        gap: 3rem;
    }
    .partner-logo {
        width: 140px;
        height: 80px;
    }
    .modale-body h3 {
        color: var(--main-color);
        margin-bottom: 1rem;
        font-size: 2rem;
    }
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-links {
        grid-column: span 2;
        justify-content: space-around;
    }
    
   .footer-brand {
        grid-column: span 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 1rem;
    }
      .footer-logo {
        margin-bottom: 0.5rem;  
        width: 60px; 
    }

    .footer-brand h3 {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;  
    }

    .footer-brand p {
        font-size: 0.9rem;
        max-width: 80%;  
    }
    
}

@media (max-width:991px) {
    .header {
        padding: 2rem 4%;
    }

    section {
        padding: 10rem 4% 2rem;
    } 

    .home {
        padding: 0 4%;
    }

    .logo-text {
        font-size: 1rem;
        font-weight: 600;
    }
    
}

@media (max-width:856px) {
    .animate.home-img {
        width: 50%;
    }
}

@media (max-width:768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
     .header {
        padding: 2rem 5% !important;
        background: var(--bg-color);
    }

    .logo-container {
        flex-direction: row;
        gap: 1rem;
    }
    .navbar-logo {
        height: 30px;
    }
    .logo-text {
        font-size: 1.5rem;
        font-weight: 600;
    }
 
    .navbar {
        position: absolute;
        top: 100%;
        left: -100vw;
        width: 100vw;
        background: var(--main-color);
        flex-direction: column;
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12);
        z-index: 900;
        transition: .25s ease;
    }
    .navbar.active {
        left: 0;
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 1rem 0 1rem 0;
        padding: 0.7rem 0;
        text-align: left;
    }
    .user-icon {
        display: block;
        position: relative;
        top: 100%;
        right:-23%;
        margin-right: 1rem;
        background: var(--second-bg-color);
        border: none;
        width: 4rem;
        height: 4rem;
        border-radius: 50%;
        padding: 0.5rem;
        font-size: 2.2rem;
        color: var(--main-color);
        cursor: pointer;
        transition: background 0.18s;
    }
    .user-icon:hover {
        background: var(--main-color);
        color: var(--bg-color);
    }
    .user-mobile-btn {
        display: flex !important;
        align-items: center;
        gap: 0.7rem;
        position: absolute;
        left: 9vw;
        top: 1.2rem;
        z-index: 1001;
    }
    
    #menu-icon {
        display: block;
        position: relative;
        color: var(--main-color);
        font-size: 2.6rem;
        z-index: 1003;
        cursor: pointer;
    }

    .logo-text {
        font-size: 1.5rem;
        font-weight: 600;
    }
    .home {
        background-size: 100% auto;
    }
    .home-content h1 {
        font-size: 4.5rem;
        white-space: normal; 
        align-items: center;
    }
    .cours-container {
        grid-template-columns: 1fr;
    }
     .cours-layer h3 {
        margin-top: 3rem !important; 
    }
    .navbar {
        position: absolute;
        top: 100%;
        left: -100%; 
        width: 100%;
        padding: 1rem 4%;
        background: var(--main-color);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        z-index: 1;
        transition: .25s ease;
        transition-delay: .25s;
    }

    .navbar.active {
        left: 0;
        transition-delay: 0s;
    }

    .navbar .active-nav {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        z-index: -1; 
        transition: .25s ease;
        transition-delay: 0s;
    }

    .navbar.active .active-nav {
        left: 0;
        transition-delay: .25s; 
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        transform: translateX(-20rem); 
        transition: .25s ease;
        transition-delay: 0s;
    }

    .navbar.active a {
        transform: translateX(0);
        transition-delay: .25s;
    }
    .navbar.active ~ .user-icon,
    .user-icon.hide-mobile {
    display: none !important;
  }

    .home-imgHover {
        pointer-events: none;
        background: var(--bg-color);
        opacity: .6;
    }
    .inscription-form {
        padding: 2rem 1rem;
    }
    .input-row {
        flex-direction: column;
        gap: 0.5rem;  
        margin-bottom: 1.2rem; 
    }
    .input-group {
        flex: unset;
        margin-bottom: 0;  
        width: 100%;
        gap: 0.5rem;
    }
    .inscription-form input,
    .inscription-form select,
    .inscription-form textarea {
        margin-bottom: 1rem;
    }

    .founder-content {
        flex-direction: column;
    }
    
    .founder-img {
        flex: 0 0 auto;
        width: 80%;
    }

    .team-member {
        flex: 1 1 100%;
    }

      .cours-layer h3 {
        margin-top: 3rem !important;
    }

    #news-list {
        align-items: center;
        gap: 2rem;
    }
    .cta-box h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--main-color);
    }
    .news-card {
        max-width: 100vw;
        min-width: 0;
        width: 98vw;
    }
    .news-img-container {
        height: 18rem;
    }
    .partners {
        padding: 6rem 5%;
    }
    .partner-logo {
        width: 120px;
        height: 70px;
    }
    .slider-dots {
        margin-top: 1.5rem;
    }
     .modale-body h3 {
        color: var(--main-color);
        margin-bottom: .5rem;
        font-size: 1rem;
    }
     .footer-main {
        grid-template-columns: 1fr;
    }
    .footer-brand {
        padding: 0 1rem; 
        margin-top: 0.5rem;
    }

    .footer-logo {
        width: 50px;
        margin-bottom: 0.3rem;
    }
     .footer-brand h3 {
        font-size: 1.2rem;
    }
     .footer-brand p {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .links-group {
        max-width: 100%;
        text-align: center;
    }
    
    .links-group h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .back-to-top {
        margin: 0 auto;
        order: -1; 
    }
}

@media (max-width: 600px) {
    .user-icon {
        font-size: 2.3rem !important;
        width: 3.4rem !important;
        height: 3.4rem !important;
        top: 1.3rem !important;
        right: 5.2rem !important;
        margin-right: 0 !important;
    }
  .student-auth-modal .modal-content {
    padding: 14px 2vw 12px 2vw !important;
    max-width: 99vw !important;
  }
  .student-auth-modal label,
  .student-auth-modal input[type="text"],
  .student-auth-modal input[type="email"],
  .student-auth-modal input[type="password"],
  .student-auth-modal input[type="number"],
  .student-auth-modal .btn {
    font-size: 1.4rem !important;
  }
  .student-auth-modal input::placeholder {
    font-size: 1.2rem !important;
  }

  .student-auth-modal #register-form label,
  .student-auth-modal #register-form input,
  .student-auth-modal #register-form .btn {
    font-size: 1.4rem !important;
  }
  .modale-content,
  .modal-content {
    width: 98vw !important;
    padding: 1.2rem 1vw !important;
    max-width: 99vw !important;
  }
  .modal-body h2,
  .modal-body h3 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
    margin-bottom: 0.6rem !important;
    word-break: break-word;
    text-align: center;
  }
  .modale-body h3 {
    font-size: 1.3rem !important;
    margin-bottom: 0.7rem !important;
  }
   #modal-news-body {
    padding: 1.1rem 0.4rem !important;
  }
  #modal-news-body h2 {
    font-size: 1.25rem !important;
  }
  #modal-news-body .news-modal-date {
    font-size: 0.98rem !important;
  }
  #modal-news-body .modale-content {
    font-size: 1.07rem !important;
  }
  #modal-news-body .close-modal-btn {
    font-size: 1.01rem !important;
    padding: 0.6rem 1.4rem !important;
  }
  .cours-box {
    border-radius: 1.2rem;
    overflow: hidden;
    }
   .cours-box img {
    border-radius: 1rem;
    height: 144px !important; 
    }
    .cours-layer h3 {
        font-size: 1.5rem !important;
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
    }
    .cours-layer p {
        font-size: 1rem !important;
        margin-bottom: 0.9rem !important;
    }
}

@media (max-width:520px) {
    html {
        font-size: 50%;
    }
    .logo-text {
        font-size: 1.5rem;
        font-weight: 600;
    }
    .header {
        flex-wrap: nowrap !important;
        align-items: center !important;
        padding: 1.5rem 2% !important;
    }
    .user-icon {
        position: absolute;
        font-size: 2.3rem !important;
        width: 3.2rem !important;
        height: 3.2rem !important;
        top: 1.3rem !important;
        right: 5.2rem !important;
        margin-right: 0 !important;
        top: 1.3rem;
        left: auto;
        z-index: 1002;
    }
    #menu-icon {
        position: absolute;
        font-size: 2.8rem !important;
        top: 1.3rem !important;
        right: 1.2rem !important;
        z-index: 1003;
        margin-left: 0;
    }
    .heading {
        font-size: 2.5rem;
    }

    .home-content {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
    .home-content h1 {
        display: flex;
    }

    .home-sci {
        width: 160px;
    }

    .home-sci a {
        width: 38px;
        height: 38px;
    }

    .cours-container {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }
    .cours-box {
        min-height: 180px !important;
        padding: 0.5rem !important;
        margin-bottom: 1.2rem !important;
        overflow: hidden;
    }
    .cours-box img {
        border-radius: 1rem;
        height: 144px !important;
    }
    .cours-layer {
        padding: 0 0.7rem 1.2rem 0.7rem !important;
    }
    .cours-layer h3 {
        font-size: 1.5rem !important;
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
    }
    .cours-layer p {
        font-size: 1.2rem !important;
        margin-bottom: 0.9rem !important;
    }
    .contact form .input-box .input-field {
        width: 100%;
    }
     .partners-container {
        gap: 2rem;
    }
    .partner-logo {
        width: 100px;
        height: 60px;
    }
    .slider-dot {
        width: 10px;
        height: 10px;
    }
    .footer-brand {
            flex-direction: column;
            align-items: center;
        }
    .footer-logo {
            align-self: center;
        }
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width:462px) {
    .logo-text {
        font-size: 1.5rem;
        font-weight: 600;
    }
    .user-icon {
        right: 6rem;
        width: 3.2rem;
        height: 3.2rem;
        font-size: 1.8rem;
    }
    #menu-icon {
        right: 1rem;
        font-size: 2rem;
    }
    .home-content h1 {
        font-size: 4.5rem;
        text-align: center;
    }
    .home-content {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
    .heading {
    font-size: 2.5rem;
    }
    .animated-text {
        font-size: 3rem;
    }

    .home-content .text-animate h3::before {
        max-width: 31rem;
    }

    .education {
        padding: 10rem 4% 5rem;
    }
     .partners-container {
        gap: 2rem;
    }
    .partner-logo {
        width: 100px;
        height: 60px;
    }
    .slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 400px) {
    .header {
        padding: 1.1rem 4% !important;
    }
    .user-icon {
        right: 4.2rem !important;
        top: 1.2rem !important;
        width: 2.7rem !important;
        height: 2.7rem !important;
        font-size: 1.5rem !important;
        margin-right: 0;
    }
    #menu-icon {
        right: 0.8rem !important;
        top: 1.2rem !important;
        font-size: 2.2rem !important;
    }
    .logo-container {
        gap: 0.2rem !important;
    }
     .home-content .animated-text {
        font-size: 2.15rem !important;
        white-space: normal !important;
        word-break: break-word;
        max-width: 90vw;
        text-align: center;
        line-height: 1.2 !important;
    }
    .home-content h1 {
        font-size: 2.8rem !important;
        white-space: normal !important;
        text-align: center;
    }

  .student-auth-modal label,
  .student-auth-modal input,
  .student-auth-modal .btn {
    font-size: 1.2rem !important;
  }
  .student-auth-modal input::placeholder {
    font-size: 1.2rem !important;
  }

  .student-auth-modal #register-form label,
  .student-auth-modal #register-form input,
  .student-auth-modal #register-form .btn {
    font-size: 1.2rem !important;
  }
   .modale-content {
    padding: 0.7rem 0.5vw !important;
  }
  .modal-body h2 {
    font-size: 1.3rem !important;
    margin-bottom: 0.8rem !important;
  }
  .modale-body h3 {
    font-size: 1.1rem !important;
  }
}

@media (max-width:371px) {
    .logo-text {
        font-size: 1.5rem;
        font-weight: 600;
    }
    
    .home {
        justify-content: center;
    }

    .home-content {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }

    .home-content h1 {
        font-size: 4rem;
        text-align: center;
    }

    .animated-text {
        font-size: 3rem;
    }

    .home-content .text-animate h3::before {
        max-width: 37rem;
    }

    .about .heading h2 {
        font-size: 4.7rem;
    }
    .modale-body h3,
    .modal-body h3 {
        font-size: 1.01rem !important;
        line-height: 1.1 !important;
    }
    
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .lazy {
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .lazy.loaded {
        opacity: 1;
    }
}

/* Adaptation responsive des images dans la modale cours */
.modale-content .modal-cours-img-bg {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
}

.modale-content .modal-cours-img-bg-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 38vw;     /* max 38% de la largeur écran desktop */
  object-fit: contain;
  display: block;
  margin: 0 auto 1.3rem auto;
  border-radius: 12px;
  box-shadow: 0 2px 14px rgba(8,27,41,0.18);
  transition: max-height 0.18s;
}

/* Tablette et mobile : image occupe plus de hauteur de la modale */
@media (max-width: 900px) {
  .modale-content .modal-cours-img-bg-img {
    max-height: 50vw;
  }
}
@media (max-width: 600px) {
  .modale-content .modal-cours-img-bg-img {
    max-height: 58vw;
    min-height: 120px;  /* Jamais trop petite sur mobile */
    border-radius: 9px;
  }
}
@media (max-width: 428px) {
  .modale-content .modal-cours-img-bg-img {
    max-height: 65vw;
    min-height: 90px;
  }
}
@media (max-width: 360px) {
  .modale-content .modal-cours-img-bg-img {
    max-height: 80vw;
    min-height: 80px;
  }
}

#mention {
    padding: 2rem 4%;
    background: var(--second-bg-color);
    border-radius: 1rem;
    margin: 3rem auto;
    max-width: 1200px;
}
#mention h1 {
    color: var(--main-color);
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
}
#mention h2 {
    color: var(--main-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}
#mention p,
#mention ol,
#mention ul {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 1.5rem;
    text-align: justify;
}
#mention ul ul {
    margin-left: 2rem;
}
#mention li {
    margin-bottom: 0.5rem;
}
#mention h3 {
    font-size: 2.5rem;
    color: var(--main-color);
    margin: 2rem 0 1rem;
}
#mention .section {
    color: var(--text-color) !important;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) {
    #mention h1 {
        font-size: 2.5rem;
    }
    #mention h2 {
        font-size: 1.8rem;
    }
    #mention p,
    #mention ol,
    #mention ul {
        font-size: 1rem;
    }
    #mention h3 {
        font-size: 1.5rem;
    }
}
#mention .section {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    margin-bottom: 2rem;
    color: var(--text-color) !important;
    justify-content: center;    
    align-items: center;
}
#mention .section h3 {
    font-size: 1.5rem;
    color: var(--main-color);
    margin: 1rem 0;
}   
