@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --primary-color: #0b3a5f;      /* Bleu nuit de l'excellence */
    --primary-light: #1a4f7c;      /* Bleu plus vif */
    --accent-color: #b31919;       /* Rouge historique de l'EAT */
    --accent-hover: #8a121f;       /* Rouge foncé */
    --accent-gold: #c5a059;        /* Or pour le leadership */
    --text-color: #475569;         /* Slate 600 */
    --text-dark: #0f172a;          /* Slate 900 */
    --text-light: #94a3b8;         /* Slate 400 */
    --bg-light: #f8fafc;           /* Fond de page doux */
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 10px -1px rgba(15, 23, 42, 0.04);
    --card-hover-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(11, 58, 95, 0.05) 0%, transparent 40%),
                radial-gradient(circle at bottom left, rgba(179, 25, 25, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* En-tête globale */
.main-header {
    background: var(--bg-white);
    box-shadow: 0 1px 10px rgba(15, 23, 42, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: center; /* Center the logo and slogan */
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    text-align: center;
}

.logo-img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.logo-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.slogan {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent-color);
    letter-spacing: 0.02em;
    margin-top: 2px;
}

/* Barre de navigation placée après la bannière */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 1152px;
    margin: 0 auto 30px;
    padding: 12px 24px;
    box-shadow: var(--card-shadow);
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.navbar a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 10px;
    transition: var(--transition);
}

.navbar a:hover {
    color: var(--accent-color);
    background: rgba(179, 25, 25, 0.05);
}

.navbar a.active {
    color: var(--white);
    background: var(--accent-color);
    box-shadow: 0 4px 12px rgba(179, 25, 25, 0.2);
}

/* Bannière Héroïque */
.hero-banner {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
    position: relative;
}

.hero-banner-inner {
    width: 100%;
    height: 380px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    background-color: #0f172a;
}

/* Image floutée en arrière-plan */
.hero-bg-blur {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(20px) brightness(0.45);
    transform: scale(1.15);
    pointer-events: none;
    z-index: 1;
}

/* Image principale devant */
.hero-fg-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 2;
    transition: transform 0.5s ease;
}

.hero-banner:hover .hero-fg-image {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.1) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
    color: var(--white);
    z-index: 3;
}

.hero-overlay h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    color: var(--white);
}

.hero-overlay p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    font-weight: 400;
}

/* Contenu Principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 24px;
}

.section-title-block {
    margin-bottom: 32px;
}

.section-title-block h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.4rem;
    color: var(--primary-color);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
}

.section-title-block h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 60px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 2px;
}

.section-title-block p.lead {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 800px;
}

/* Grille de mise en page réactive */
.section-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
}

.grid-main {
    grid-column: span 8;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.grid-sidebar {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Cartes (Articles / Asides) */
.article-card, .section-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.article-card:hover, .section-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
}

/* Page d'accueil : Section Présentation du Président */
.president-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 768px) {
    .president-card {
        flex-direction: row;
        align-items: flex-start;
    }
}

.president-img-wrapper {
    flex-shrink: 0;
    width: 100%;
    max-width: 240px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    border: 3px solid var(--white);
    margin: 0 auto;
}

.president-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.president-img-wrapper:hover img {
    transform: scale(1.05);
}

.president-text {
    flex-grow: 1;
}

.president-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 16px;
}

.president-text p::first-letter {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    float: left;
    margin-right: 8px;
    line-height: 1;
}

/* Typographie interne */
h2, h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    margin-bottom: 16px;
    font-weight: 700;
}

h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 16px;
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Styles pour le Siège / Infos */
.sidebar-info-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-tag {
    background: rgba(11, 58, 95, 0.05);
    color: var(--primary-color);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Icônes Sociales (SVG) */
.social-icons-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary-color);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-btn:hover {
    color: var(--white);
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(11, 58, 95, 0.2);
}

.social-btn.facebook:hover { background: #1877f2; }
.social-btn.twitter:hover { background: #1da1f2; }
.social-btn.tiktok:hover { background: #000000; }
.social-btn.whatsapp:hover { background: #25d366; }

/* QR Codes scannables (TikTok & WhatsApp) */
.qr-cards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}

.qr-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.qr-card:hover {
    background: var(--bg-white);
    box-shadow: var(--card-shadow);
}

.qr-image {
    width: 100%;
    max-width: 130px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 12px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 4px solid var(--white);
    display: block;
    object-fit: cover;
}

.qr-card span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* Page Formations - Cartes spécifiques */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
}

.formation-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.formation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(197, 160, 89, 0.4);
}

.formation-badge {
    align-self: flex-start;
    background: rgba(197, 160, 89, 0.15);
    color: #a37f3d;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.formation-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.formation-card ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.formation-card li {
    position: relative;
    padding-left: 24px;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.formation-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-weight: 800;
}

/* Formulaire de Contact */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-light);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(11, 58, 95, 0.1);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

button[type="submit"] {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(179, 25, 25, 0.15);
}

button[type="submit"]:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(179, 25, 25, 0.25);
}

button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Retour formulaire (succès / erreur) */
.form-message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid transparent;
}

.form-message.success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.form-message.error {
    background: #fff1f2;
    color: #881337;
    border-color: #fecdd3;
}

/* Galerie Photo Interactive */
.gallery-section {
    margin-top: 40px;
    background: var(--bg-white);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--card-shadow);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.gallery-item::after {
    content: "🔎 Agrandir";
    position: absolute;
    inset: 0;
    background: rgba(11, 58, 95, 0.8);
    color: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

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

/* Lightbox pour la galerie */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 24px;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: var(--accent-color);
}

/* Pied de page */
.main-footer {
    background: var(--primary-color);
    color: rgba(255, 255, 255, 0.85);
    padding: 60px 24px 30px;
    border-top: 4px solid var(--accent-gold);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-box img.footer-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.footer-box h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 8px;
    position: relative;
    padding-bottom: 8px;
}

.footer-box h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gold);
}

.footer-box p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.footer-box ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-box li, .footer-box a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-box a:hover {
    color: var(--accent-gold);
    padding-left: 4px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations au Scroll */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Bouton Scroll Top */
#scrollTopBtn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(179, 25, 25, 0.3);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

#scrollTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
}

#scrollTopBtn:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
}

/* Ajustements Responsive */
@media (max-width: 860px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .navbar {
        margin: 0 24px 20px;
        border-radius: 12px;
        padding: 10px 16px;
    }

    .navbar ul {
        margin-top: 0;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .hero-banner-inner {
        height: 240px;
    }

    .hero-overlay {
        padding: 20px;
    }

    .hero-overlay h1 {
        font-size: 1.5rem;
    }

    .hero-overlay p {
        font-size: 0.9rem;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .grid-main, .grid-sidebar {
        grid-column: span 12;
    }

    .section-title-block h1 {
        font-size: 1.8rem;
    }
}
