/* =========================
RESET & BASE
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
    background: #fff;
    color: #111;
}

/* =========================
HEADER PREMIUM
========================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    display: flex;
    align-items: center;

    padding: 22px 50px;

    background: transparent;
    transition: 0.3s ease;
}

/* LOGO (IMPORTANT : jamais bleu / jamais souligné) */

/*=========================
LOGO
=========================*/

.logo{
    flex-shrink:0;
}

.logo a{

    display:flex;
    flex-direction:column;

    text-decoration:none;

    color:white;

    transition:.3s;

}

.logo a:hover{

    opacity:.85;

}

.logo-title{

    font-size:1.45rem;

    font-weight:800;

    letter-spacing:1px;

    text-transform:uppercase;

    line-height:1.1;

}

.logo-subtitle{

    margin-top:4px;

    font-size:.72rem;

    font-style:italic;

    letter-spacing:1.5px;

    opacity:.80;

}

.logo a:visited,
.logo a:active,
.logo a:focus {
    color: white !important;
    text-decoration: none !important;
}

/* MENU TOUJOURS À DROITE */
.header nav {
    margin-left: auto;
    display: flex;
    gap: 25px;
}

.header nav a {
    color: white;
    text-decoration: none;
    opacity: 0.85;
    transition: 0.3s;
    font-weight: 500;
}

.header nav a:hover {
    opacity: 1;
}

/* HEADER AU SCROLL */
.header.scrolled {
    background: rgba(10, 20, 40, 0.75);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* =========================
HERO INDEX
========================= */

.hero {
    height: 100vh;
    position: relative;
}

.hero-slider {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

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

    height: 100%;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
    color: white;
}

/* =========================
PAGE HERO (autres pages)
========================= */

.page-hero {
    position: relative;

    height: 45vh;
    min-height: 320px;

    display: flex;
    justify-content: center;
    align-items: center;

    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.page-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(
        rgba(8,20,45,.55),
        rgba(8,20,45,.35)
    );
}

.page-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.page-content h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-filiere{
    background-image:url("../assets/images/herofiliere.jpg");
}

.hero-concours{
    background-image:url("../assets/images/heroconcours.jpg");
}

.hero-recrutement{
    background-image:url("../assets/images/herorecrutement.jpg");
}

.hero-anciens{
    background-image:url("../assets/images/heroanciens.jpg");
}



/* =========================
CONTENT
========================= */

.content {
    max-width: 1100px;
    margin: auto;
    padding: 80px 40px;
}

/* =========================
BUTTONS
========================= */

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    margin: 0 10px;
    transition: 0.3s;
}

.primary {
    background: #0A74DA;
    color: white;
}

.secondary {
    border: 2px solid white;
    color: white;
}

.ghost {
    border: 1px solid rgba(255,255,255,0.6);
    color: white;
}

.ghost:hover {
    background: white;
    color: #0A74DA;
}

/* =========================
SECTIONS
========================= */

section {
    padding: 50px 20%;
    text-align: center;
}

/* =========================
GRID
========================= */

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 60px;
    background: #f5f7fa;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    transition: 0.3s;
}

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

/* =========================
STATS
========================= */

.stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 80px;
    text-align: center;
}

.stat h2 {
    font-size: 3rem;
    color: #0A74DA;
}

/* =========================
LAB
========================= */

.lab {
    display: flex;
    align-items: center;
    gap: 50px;
}

.lab-image {
    width: 50%;
    height: 300px;
    background: url("https://images.unsplash.com/photo-1581092334651-ddf26d9a09d0?auto=format&fit=crop&w=1200&q=80");
    background-size: cover;
    border-radius: 15px;
}

/* =========================
FILIERE
========================= */

.steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.step {
    width: 250px;
    padding: 30px;
    border-radius: 15px;
    background: #f5f7fa;
    transition: 0.3s;
}

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

/* =========================
TO TOP BUTTON
========================= */

#toTopBtn {
    position: fixed;
    bottom: 25px;
    right: 25px;

    width: 52px;
    height: 52px;

    border-radius: 50%;
    border: none;

    background: linear-gradient(135deg, #0A74DA, #1e90ff);
    color: white;

    font-size: 22px;

    cursor: pointer;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);

    transition: 0.3s;
}

#toTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* =========================
ANIMATIONS
========================= */

.hidden {
    opacity: 0;
    transform: translateY(30px);
}

.show {
    opacity: 1;
    transform: translateY(0);
    transition: 0.6s ease;
}

/* =========================
RESPONSIVE
========================= */

@media (max-width: 768px) {

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

    .stats {
        flex-direction: column;
        gap: 20px;
    }

    .steps {
        flex-direction: column;
    }

    .lab {
        flex-direction: column;
    }

    section {
        padding: 60px 20px;
    }

    .header {
        padding: 18px 20px;
    }

    .header nav {
        gap: 15px;
    }
	
	.social-bar{

    display:none;

}
	
}

.footer {
    background: #0b1220;
    color: rgba(255,255,255,0.65);
    padding: 10px 20px;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-container {
    max-width: 1100px;
    margin: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer h3 {
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    color: rgba(255,255,255,0.85);
}

.footer p {
    margin: 0;
    line-height: 1.2;
}

.footer-right {
    text-align: right;
}

/* mobile */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .footer-right {
        text-align: center;
    }
}

/* =========================
MENU MOBILE
========================= */

.menu-toggle{
    display:none;
    font-size:2rem;
    color:white;
    cursor:pointer;
    user-select:none;
}

@media (max-width:900px){

    header.header{
        padding:15px 20px;
    }

    .menu-toggle{
        display:block;
    }

    header nav{

        position:fixed;

        top:70px;
        right:-280px;

        width:250px;
        height:calc(100vh - 70px);

        background:rgba(10,20,40,.96);

        display:flex;
        flex-direction:column;

        padding:30px;

        gap:20px;

        transition:.35s;

        backdrop-filter:blur(15px);

        box-shadow:-10px 0 30px rgba(0,0,0,.3);
    }

    header nav.open{
        right:0;
    }

    header nav a{
        margin:0;
        font-size:1.1rem;
    }

}

/* ===========================
   Bloc texte + image
=========================== */

.bloc-image{

    display:flex;
    align-items:center;
    gap:60px;

    margin:60px 0;

}

.bloc-texte{

    flex:1;

}

.bloc-photo{

    flex:1;

}

.bloc-photo img{

    width:100%;
    border-radius:18px;

    box-shadow:0 15px 40px rgba(0,0,0,.18);

    display:block;

}

@media (max-width:900px){

    .bloc-image{

        flex-direction:column;

    }

}



/* ===========================
   Accordéon livre OR
=========================== */


.accordion-section{
    max-width: 1500px;
    width: 100%;
    margin: 20px auto;
}

.accordion-item{

    margin-bottom:12px;

    border-radius:12px;

    overflow:hidden;

    box-shadow:0 6px 20px rgba(0,0,0,.08);

}

.accordion-header{

    width:100%;

    background:#0A74DA;

    color:white;

    border:none;

    padding:18px 25px;

    text-align:left;

    cursor:pointer;

    font-size:1.05rem;

    font-weight:600;

}

.accordion-content{

    max-height:0;

    overflow:hidden;

    background:white;

    transition:max-height .35s ease;

}

.accordion-content p{

    padding:25px;

}

.accordion-item.active .accordion-content{

    max-height:400px;

}


/* ===============================
   MÉTIERS DES ANCIENS
================================ */

.metiers-section{

    width:min(95%,1400px);
    margin:60px auto;

    text-align:center;

}

.section-intro{

    max-width:850px;

    margin:20px auto 60px;

    color:#666;

    font-size:1.1rem;

}

.metiers-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));

    gap:30px;

}

.metier-card{

    background:white;

    border-radius:18px;

    padding:35px;

    box-shadow:0 8px 25px rgba(0,0,0,.08);

    transition:.3s;

}

.metier-card:hover{

    transform:translateY(-8px);

    box-shadow:0 18px 40px rgba(0,0,0,.15);

}

.metier-icon{

    font-size:3rem;

    margin-bottom:20px;

}

.metier-card h3{

    color:#0A74DA;

    margin-bottom:15px;

}

.metier-card p{

    color:#555;

    line-height:1.8;

}

/* =====================================
   Réseaux sociaux flottants
===================================== */

.social-bar{

    position:fixed;

    left:0;

    top:50%;

    transform:translateY(-50%);

    z-index:999;

}

.social-bar a{

    display:flex;

    align-items:center;

    width:55px;

    height:55px;

    margin:4px 0;

    background:#0A74DA;

    color:white;

    text-decoration:none;

    overflow:hidden;

    transition:.35s;

    border-radius:0 12px 12px 0;

    box-shadow:0 5px 18px rgba(0,0,0,.15);

}

.social-bar a:hover{

    width:180px;

}

.social-bar i{

    width:55px;

    text-align:center;

    font-size:1.4rem;

    flex-shrink:0;

}

.social-bar span{

    white-space:nowrap;

    font-weight:600;

    opacity:0;

    transition:.25s;

}

.social-bar a:hover span{

    opacity:1;

}

.social-bar a:nth-child(1){
    background:#E1306C;
}

.social-bar a:nth-child(2){
    background:#3b5998;
}

.social-bar a:nth-child(3){
    background:#0A66C2;
}

.social-bar a:nth-child(4){
    background:#FF0000;
}

.social-bar a:nth-child(5){
    background:#008000;
}

.social-bar a:nth-child(6){
    background:#808080;
}


/*=========================
IMAGE ZOOM
=========================*/

.zoomable{
    cursor:zoom-in;
    transition:.25s;
}

.zoomable:hover{
    transform:scale(1.02);
}

.image-popup{

    position:fixed;
    inset:0;

    display:flex;
    justify-content:center;
    align-items:center;

    background:rgba(0,0,0,.82);

    opacity:0;
    visibility:hidden;

    transition:.25s;

    z-index:99999;

}

.image-popup.open{

    opacity:1;
    visibility:visible;

}

.image-popup img{

    max-width:92%;
    max-height:92%;

    border-radius:10px;

    box-shadow:0 20px 60px rgba(0,0,0,.5);

}


/*==================================================
POPUP D'ACCUEIL
==================================================*/

#welcomePopup{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.75);

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:100000;

    backdrop-filter:blur(3px);

}

.welcome-box{

    width:min(700px,90%);

    background:white;

    border-radius:18px;

    padding:35px;

    box-shadow:0 25px 60px rgba(0,0,0,.35);

    text-align:center;

    animation:popupAppear .35s;

}

.welcome-box h2{

    color:#0A74DA;

    margin-bottom:20px;

}

.welcome-text{

    margin-bottom:30px;

    line-height:1.8;

}

.welcome-buttons{

    display:flex;

    justify-content:center;

    gap:15px;

    flex-wrap:wrap;

    margin-bottom:25px;

}

.popup-btn{

    padding:12px 22px;

    border-radius:30px;

    text-decoration:none;

    color:white;

    transition:.3s;

}

.popup-primary{

    background:#0A74DA;

}

.popup-secondary{

    background:#444;

}

.popup-btn:hover{

    transform:translateY(-2px);

}

.popup-close{

    border:none;

    background:#eeeeee;

    padding:10px 22px;

    border-radius:25px;

    cursor:pointer;

    transition:.3s;

}

.popup-close:hover{

    background:#dddddd;

}

@keyframes popupAppear{

    from{

        opacity:0;
        transform:scale(.92);

    }

    to{

        opacity:1;
        transform:scale(1);

    }

}


/* ===============================
   TABLEAU RÉSULTATS CONCOURS
================================ */

.resultats-section {
    max-width: 1100px;
    margin: 20px auto 60px;
    padding: 40px 20px;
    text-align: center;
}

.resultats-section h2 {
    color: #0b1220;
    font-size: 2rem;
    margin-bottom: 10px;
}

.resultats-section .section-intro {
    margin: 0 auto 35px;
}

/* Conteneur pour le défilement sur mobile */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    background: white;
}

.table-concours {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 1.05rem;
}

/* En-tête du tableau (Années) */
.table-concours thead {
    background: linear-gradient(135deg, #0A74DA, #0856a3);
    color: white;
}

.table-concours th {
    padding: 18px 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.table-concours th:first-child {
    text-align: left;
    padding-left: 30px;
}

/* Lignes et cellules */
.table-concours td {
    padding: 16px 20px;
    border-bottom: 1px solid #eef2f6;
    color: #333;
    font-weight: 500;
    transition: background 0.2s ease;
}

/* Première colonne (Noms des écoles) */
.table-concours td:first-child {
    text-align: left;
    padding-left: 30px;
    font-weight: 700;
    color: #0b1220;
}

/* Effet zébré léger */
.table-concours tbody tr:nth-child(even) {
    background-color: #f8fafd;
}

/* Effet au survol d'une ligne */
.table-concours tbody tr:hover {
    background-color: #ebf4ff;
}

.table-concours tbody tr:hover td:first-child {
    color: #0A74DA;
}

/* Suppression de la bordure sur la dernière ligne */
.table-concours tbody tr:last-child td {
    border-bottom: none;
}

/* Adaptation mobile */
@media (max-width: 768px) {
    .table-concours th,
    .table-concours td {
        padding: 14px 15px;
        font-size: 0.95rem;
    }

    .table-concours th:first-child,
    .table-concours td:first-child {
        padding-left: 20px;
        position: sticky;
        left: 0;
        background: inherit;
    }

    .table-concours thead th:first-child {
        background: #0A74DA;
    }

    .table-concours tbody tr:nth-child(odd) td:first-child {
        background: white;
    }

    .table-concours tbody tr:nth-child(even) td:first-child {
        background: #f8fafd;
    }
}