/* --- IMPORT & RESET --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
    --primary: #0b2545; /* Bleu profond moderne (plus foncé que ISIM) */
    --secondary: #ff6b00; /* Orange vibrant */
    --accent: #ff9e00;
    --text-main: #333;
    --text-light: #666;
    --bg-light: #f4f7f6;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; color: var(--text-main); line-height: 1.6; overflow-x: hidden; font-size: 1.05rem; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Augmenter taille des titres */
h1 { font-size: 4.2rem; font-weight: 800; }
h2 { font-size: 2.8rem; font-weight: 700; }
h3 { font-size: 1.6rem; font-weight: 700; }
h4 { font-size: 1.3rem; font-weight: 600; }
p { font-size: 1.1rem; line-height: 1.8; }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--secondary); color: white; }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3); }
.btn-outline { border: 2px solid white; color: white; margin-left: 10px; }
.btn-outline:hover { background: white; color: var(--primary); }

/* --- CONTACT BUTTON CUSTOM --- */
.btn-contact {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 6px 18px rgba(11,37,69,0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn-contact:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 24px rgba(11,37,69,0.12);
}

/* Make sure animate.css infinite pulses are subtle on nav */
.animate__animated.animate__pulse {
    --animate-duration: 1.6s;
}

/* Simple fade-in-on-scroll helper: elements can get 'inview' class via JS if needed */
.inview { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease; }
.outview { opacity: 0; transform: translateY(12px); }

/* --- HEADER (Style ISIM moderne) --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--white) 0%, #f8fafc 100%);
    box-shadow: 0 4px 30px rgba(11, 37, 69, 0.12);
    z-index: 1000;
    padding: 18px 0;
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--secondary);
}
header:hover {
    box-shadow: 0 8px 40px rgba(11, 37, 69, 0.18);
    padding: 16px 0;
}

.nav-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    position: relative;
}

.logo { 
    font-size: 1.8rem; 
    font-weight: 900; 
    color: var(--primary);
    display: flex; 
    align-items: center; 
    gap: 12px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    font-family: 'Bebas Neue', cursive;
    text-shadow: 0 4px 15px rgba(11, 37, 69, 0.2), 0 2px 6px rgba(255, 107, 0, 0.15);
    background: linear-gradient(135deg, var(--primary) 0%, #0a1f3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 12px rgba(11, 37, 69, 0.2)) drop-shadow(0 2px 4px rgba(255, 107, 0, 0.1));
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(11, 37, 69, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}
.logo:hover {
    transform: scale(1.1) translateY(-2px);
    text-shadow: 0 6px 20px rgba(11, 37, 69, 0.3), 0 3px 8px rgba(255, 107, 0, 0.25);
    box-shadow: 0 12px 32px rgba(11, 37, 69, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.4);
    filter: drop-shadow(0 6px 16px rgba(11, 37, 69, 0.3)) drop-shadow(0 3px 6px rgba(255, 107, 0, 0.2));
}
.logo span { 
    color: var(--secondary);
    font-weight: 900;
}

/* Desktop Nav */
.nav-menu { 
    display: flex; 
    gap: 28px; 
    align-items: center;
}

.nav-menu a { 
    font-weight: 600; 
    color: var(--primary); 
    font-size: 1rem;
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: var(--secondary);
}

.nav-menu a:hover::after {
    width: 100%;
}

.cta-header { 
    background: var(--secondary);
    color: white; 
    padding: 12px 24px; 
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 18px rgba(255, 107, 0, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.cta-header:hover { 
    background: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(255, 107, 0, 0.4);
}

.cta-header i {
    font-size: 1.2rem;
    color: white;
}

/* Mobile Menu */
.hamburger { display: none; cursor: pointer; font-size: 1.5rem; color: var(--primary); }

/* --- HERO SECTION --- */
.hero {
    height: 90vh;
    background: linear-gradient(rgba(11, 37, 69, 0.85), rgba(11, 37, 69, 0.7)), url('images/batiment-hero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    color: white;
    padding-top: 80px;
    text-align: center;
    animation: heroFadeIn 0.8s ease-out;
}

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

.hero h1 { 
    font-size: 4.5rem; 
    margin-bottom: 15px; 
    line-height: 1.1;
    font-weight: 900;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}
.hero h2 { 
    font-size: 1.8rem; 
    font-weight: 300; 
    margin-bottom: 30px; 
    color: #e8e8e8;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.values-list { 
    display: flex; 
    justify-content: center; 
    gap: 40px; 
    margin-bottom: 50px; 
    flex-wrap: wrap;
    animation: slideScrollLeft 15s linear infinite;
    overflow: hidden;
    white-space: nowrap;
    padding: 20px 0;
}

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

.values-list:hover {
    animation-play-state: paused;
}

.values-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1px;
    background: rgba(255, 107, 0, 0.15);
    padding: 12px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    animation: slideInUp 0.6s ease-out both;
    white-space: nowrap;
    flex-shrink: 0;
}
.values-item i { 
    color: var(--secondary);
    font-size: 1.4rem;
}

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

/* --- SECTIONS GÉNÉRALES --- */
.section { 
    padding: 100px 0;
    position: relative;
}
.bg-light { background-color: var(--bg-light); }

.section-title { 
    text-align: center; 
    margin-bottom: 60px;
}
.section-title h2 { 
    font-size: 3rem; 
    color: var(--primary); 
    margin-bottom: 20px; 
    position: relative; 
    display: inline-block;
    font-weight: 800;
}
.section-title h2::after { 
    content: ''; 
    width: 80px; 
    height: 5px; 
    background: var(--secondary); 
    position: absolute; 
    bottom: -15px; 
    left: 50%; 
    transform: translateX(-50%);
    border-radius: 3px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

/* --- CARDS (Cycles & Atouts - Style ISIM) --- */
.grid-4 { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    place-items: center;
    justify-content: center;
}

/* Force centrage pour 4 cartes */
.grid-4 > * {
    width: 100%;
    max-width: 320px;
}

@media (min-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
        place-items: stretch;
    }
    .grid-4 > * {
        max-width: 100%;
    }
}

@media (min-width: 900px) and (max-width: 1199px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
        place-items: center;
    }
}

@media (max-width: 899px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        place-items: center;
    }
}

@media (max-width: 600px) {
    .grid-4 {
        grid-template-columns: 1fr;
        place-items: center;
    }
}

.grid-2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 50px; 
    align-items: center;
}

.card {
    background: white;
    padding: 35px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(11, 37, 69, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    border-top: 5px solid transparent;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
    max-width: 320px;
    margin: 0 auto;
}

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

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.1), transparent);
    transition: left 0.6s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover { 
    transform: translateY(-15px) scale(1.02);
    border-top-color: var(--secondary);
    box-shadow: 0 16px 40px rgba(255, 107, 0, 0.15);
}

.card-icon { 
    font-size: 3rem; 
    color: var(--secondary); 
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.15) rotate(5deg);
}

.card h3 { 
    margin-bottom: 20px; 
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 700;
}

.card p { 
    font-size: 1rem; 
    color: var(--text-light); 
    margin-bottom: 25px;
    line-height: 1.7;
}

.card .btn-text { 
    color: var(--secondary); 
    font-weight: 700; 
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.card .btn-text:hover {
    transform: translateX(5px);
}

/* --- ADMISSION BANNER --- */
.admission-banner {
    background: linear-gradient(135deg, var(--secondary) 0%, #e55a00 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    background-image: url('data:image/svg+xml,%3Csvg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%23ffffff" fill-opacity="0.1" fill-rule="evenodd"%3E%3Ccircle cx="3" cy="3" r="3"/%3E%3Ccircle cx="13" cy="13" r="3"/%3E%3C/g%3E%3C/svg%3E');
    box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.1);
    animation: slideInDown 0.8s ease-out;
}

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

.admission-banner h2 { 
    margin-bottom: 20px;
    font-size: 2.8rem;
    font-weight: 900;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

/* --- FOOTER --- */
footer { 
    background: linear-gradient(135deg, var(--primary) 0%, #071a30 100%);
    color: #ddd; 
    padding: 50px 0 20px;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.2);
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin-bottom: 30px;
}

.footer-col h4 { 
    color: white; 
    margin-bottom: 15px; 
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul li { 
    margin-bottom: 10px;
}

.footer-col ul li a { 
    color: #bbb;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-col ul li a:hover { 
    color: var(--secondary);
    padding-left: 8px;
    font-weight: 600;
}

/* --- ANIMATIONS SCROLL --- */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.in-view {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Footer logo - version spéciale pour visibilité */
.logo.footer-logo {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(255, 107, 0, 0.4)) drop-shadow(0 1px 2px rgba(255, 255, 255, 0.1));
    color: var(--secondary) !important;
    font-size: 1.6rem;
    box-shadow: 0 6px 15px rgba(255, 107, 0, 0.2);
}

.footer-col .logo {
    color: var(--secondary) !important;
    font-size: 1.6rem;
}

.footer-col .logo span {
    color: var(--secondary) !important;
}

.footer-col .logo i {
    color: var(--secondary) !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .nav-menu {
        position: fixed; top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: white; flex-direction: column;
        padding-top: 80px; transition: 0.3s;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    .nav-menu.active { right: 0; }
    .hamburger { display: block; z-index: 1001; }
    .grid-2 { grid-template-columns: 1fr; }
    .values-list { flex-direction: column; gap: 10px; }
}