/* ========================= */
/* PALETTE & VARIABLES LUXE */
/* ========================= */

:root {
    --fond: #050814;
    --fond2: #0b0f1f;
    --ivoire: #f8f3e9;
    --texte: #f5f5f5;
    --texte2: #c6cad8;
    --or: #c8a96a;
    --or2: #e2c27c;
    --font1: "Playfair Display", serif;
    --font2: "Inter", sans-serif;
}

/* ========================= */
/* GLOBAL */
/* ========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #111836 0, #050814 55%, #02030a 100%);
    color: var(--texte);
    font-family: var(--font2);
    line-height: 1.6;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

/* ========================= */
/* LOADER CINÉMATIQUE */
/* ========================= */

#loader {
    position: fixed;
    inset: 0;
    background: #050814;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    transition-delay: 1.2s;
}

.loader-logo {
    font-family: var(--font1);
    font-size: 3rem;
    color: var(--or2);
    border: 2px solid var(--or2);
    padding: 26px 38px;
    border-radius: 50%;
    animation: loaderPulse 2.4s ease-in-out infinite;
}

@keyframes loaderPulse {
    0% { box-shadow: 0 0 12px rgba(226,194,124,0.6); }
    50% { box-shadow: 0 0 32px rgba(226,194,124,1); }
    100% { box-shadow: 0 0 12px rgba(226,194,124,0.6); }
}

.loader-title {
    font-family: var(--font1);
    font-size: 1.2rem;
    color: var(--ivoire);
    text-align: center;
    margin-top: 22px;
    opacity: 0;
    transform: translateY(20px);
    animation: loaderTitleIn 1.4s ease forwards;
    animation-delay: 1.2s;
    line-height: 1.4;
}

.loader-subtitle {
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
}

.loader-subtitle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--or), var(--or2));
    animation: goldUnderline 1.2s ease forwards;
    animation-delay: 2.6s;
}

@keyframes loaderTitleIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes goldUnderline {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* ========================= */
/* HEADER */
/* ========================= */

.header {
    text-align: center;
    padding: 26px 16px 10px;
    position: relative;
}

.header-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid var(--or2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font1);
    font-size: 2rem;
    color: var(--or2);
    margin-bottom: 10px;
    animation: goldPulse 3s ease-in-out infinite;
}

@keyframes goldPulse {
    0% { box-shadow: 0 0 8px rgba(226,194,124,0.6); }
    50% { box-shadow: 0 0 24px rgba(226,194,124,0.95); }
    100% { box-shadow: 0 0 8px rgba(226,194,124,0.6); }
}

.header-title {
    font-family: var(--font1);
    font-size: 1.1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ivoire);
}

/* ========================= */
/* MENU MOBILE */
/* ========================= */

.menu-btn {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    color: var(--or2);
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(5,8,20,0.92);
    backdrop-filter: blur(14px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 40px;
}

.mobile-menu a {
    color: var(--ivoire);
    font-size: 1.4rem;
    margin: 14px 0;
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--or2);
    text-shadow: 0 0 12px rgba(226,194,124,0.8);
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 26px;
    background: none;
    border: none;
    color: var(--or2);
    font-size: 2.2rem;
    cursor: pointer;
}

/* ========================= */
/* HERO */
/* ========================= */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.hero-content {
    background: rgba(8,12,32,0.9);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 18px 45px rgba(0,0,0,0.6);
}

.hero-kicker {
    color: var(--or2);
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font1);
    font-size: 2.2rem;
    margin: 10px 0;
}

.hero-subtitle {
    color: var(--texte2);
    margin-bottom: 20px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.hero-tag {
    background: rgba(255,255,255,0.05);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--or);
    font-size: 0.85rem;
}

.hero-cta-main {
    display: inline-block;
    background: linear-gradient(135deg, var(--or), var(--or2));
    color: #111;
    padding: 12px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* ========================= */
/* HERO VISUEL */
/* ========================= */

.hero-visual {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--or);
}

.hero-visual-image {
    background-size: cover;
    background-position: center;
    height: 100%;
    min-height: 300px;
}

/* Assistant Juridique */
.hero-visual-image--aj {
    background-image: url("spanish-parliament-building-madrid-spain-2024-12-05-15-46-23-utc.jpg");
}

/* BTS ATI */
.hero-visual-image--ati {
    background-image: url("ingenieursenformation.png");
}

.hero-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,8,20,0.9), rgba(5,8,20,0.2));
}

.hero-visual-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(5,8,20,0.7);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--or);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
}
/* ========================= */
/* SECTIONS */
/* ========================= */

.section {
    margin-top: 50px;
}

.section-title {
    font-family: var(--font1);
    font-size: 1.8rem;
    margin-bottom: 20px;
    transition: text-shadow 0.8s ease, color 0.8s ease;
}

.section-title.glow {
    text-shadow: 0 0 6px rgba(226,194,124,0.45), 
                 0 0 14px rgba(226,194,124,0.25);
    color: var(--or2);
}

.section-text {
    color: var(--texte2);
    margin-bottom: 20px;
}

/* ========================= */
/* GRILLES */
/* ========================= */

.section-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.section-grid-3 {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 22px;
}

/* ========================= */
/* CARDS */
/* ========================= */

.card {
    background: rgba(8,12,32,0.97);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 18px 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.6);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--or2);
    box-shadow: 0 12px 40px rgba(200,169,106,0.35);
}

.card--highlight {
    border-color: rgba(200,169,106,0.8);
}

.card-title {
    font-family: var(--font1);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

/* ========================= */
/* LISTES */
/* ========================= */

.list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bullet {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--or2);
    margin-right: 8px;
}

.line {
    display: inline-block;
    width: 14px;
    height: 2px;
    background: var(--or2);
    margin-right: 8px;
}

/* ========================= */
/* ANIMATIONS SCROLL */
/* ========================= */

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s ease-out;
}

.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s ease-out;
}

.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================= */
/* PARTICULES */
/* ========================= */

#particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ========================= */
/* BOUTON RETOUR */
/* ========================= */

.back-to-top {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--or), var(--or2));
    color: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(200,169,106,0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
/* ========================= */
/* SLIDER — OPTION A (plein écran + image collée en haut) */
/* ========================= */

.slider {
    position: relative;
    width: 100%;
    height: 100vh; /* plein écran */
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    border: none;
}

.slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center !important; /* image collée en haut */
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.slider .slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Cinématique desktop uniquement (zoom sans mouvement horizontal) */
@media (min-width: 900px) {
    .slider .slide {
        animation: cinematicZoom 12s ease-in-out infinite;
    }
}

@keyframes cinematicZoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Parallax desktop uniquement */
.parallax {
    background-attachment: fixed;
}

@media (max-width: 900px) {
    .parallax {
        background-attachment: scroll !important;
    }
}

/* ========================= */
/* SLIDER — MODE MOBILE */
/* ========================= */

@media (max-width: 900px) {

    .slider {
        height: auto !important;
        min-height: 260px;
        aspect-ratio: auto !important;
    }

    .slider .slide {
        height: auto !important;
        min-height: 260px;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        animation: none !important;
        transform: none !important;
    }
}

/* Masquer les boutons du slider sur smartphone */
@media (max-width: 768px) {
    .slider-btn {
        display: none !important;
    }
}

/* ========================= */
/* FOOTER */
/* ========================= */

.footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 16px 26px;
    text-align: center;
    color: var(--texte2);
    margin-top: 60px;
}

/* ========================= */
/* RESPONSIVE GLOBAL */
/* ========================= */

@media (max-width: 950px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .section-grid-3,
    .section-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .section-title {
        text-align: center;
    }
    .page {
        padding: 16px 12px 40px;
    }
    .header-title {
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-content {
        padding: 18px;
    }
}
