/* ========================
   VARIABLES
======================== */
:root {
    --primary: #0092CF;
    --primary-dark: #0077a8;
    --dark: #1c1c1c;
    --gray: #555;
    --light-gray: #f5f7fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 30px rgba(0,0,0,0.15);
    --radius: 12px;
    --header-height: 65px;
}

/* ========================
   RESET
======================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    padding-top: var(--header-height);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ========================
   HEADER
======================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--white);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* ========================
   LOGO
======================== */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 50%;
}

.logo span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ========================
   HAMBURGER BUTTON
======================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
    border-radius: 6px;
    transition: background 0.2s;
}

.hamburger:hover {
    background: var(--light-gray);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Animation hamburger → croix */
.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================
   NAVIGATION
======================== */
nav {
    display: flex;
    align-items: center;
    gap: 6px 20px;
    flex-wrap: wrap;
}

nav a {
    text-decoration: none;
    color: #444;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 5px 2px;
    position: relative;
    transition: color 0.3s;
    white-space: nowrap;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav a:hover {
    color: var(--primary);
}

nav a:hover::after {
    width: 100%;
}

/* ========================
   HERO
======================== */
.hero {
    position: relative;
    overflow: hidden;
    background: #90EE90;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
    min-height: 280px;
    max-height: 88vh;
    object-fit: cover;
    
}

/* Overlay sombre */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 90%;
    max-width: 680px;
    padding: 20px;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(1.6rem, 6vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 14px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    opacity: 0.93;
}

/* ========================
   SECTIONS COMMUNES
======================== */
section {
    padding: 60px 0;
}

section h2 {
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 28px;
}

/* ========================
   ACTUALITÉS
======================== */
#actualite {
    background: var(--light-gray);
    padding: 60px 0;
}

#actualite h2 {
    text-align: center;
}

.actualite-card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
    background: var(--white);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.actualite-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.actualite-card .card-img-top {
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.actualite-card:hover .card-img-top {
    transform: scale(1.04);
}

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.35;
}

.card-text {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.55;
    flex: 1;
    margin-bottom: 16px;
}

/* ========================
   BOUTONS
======================== */
.btn-outline-primary {
    align-self: flex-start;
    margin-top: auto;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.3s, color 0.3s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s !important;
}

.btn-primary:hover {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(0,146,207,0.3) !important;
}

/* ========================
   SECTION NOUS
======================== */
#nous {
    background: var(--white);
    padding: 60px 0;
}

#nous img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

#nous h2 {
    text-align: left;
}

#nous p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 0.97rem;
}

/* ========================
   SECTION PRÉSIDENTE
======================== */
#presidente {
    background: var(--white);
    padding: 60px 0;
}

#presidente h2 {
    font-weight: 700;
    text-align: left;
    margin-bottom: 16px;
}

#presidente .lead {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    line-height: 1.65;
}

#presidente p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 0.97rem;
}

.video-box {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    background: #000;
    margin-top: 24px;
}

.video-box video {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================
   CONTACT
======================== */
#contact {
    padding: 40px 20px;
    text-align: center;
}

#contactTheButton {
    background-color: var(--primary) !important;
    border: none !important;
    padding: 14px 40px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s !important;
}

#contactTheButton:hover {
    background-color: var(--primary-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0,146,207,0.3) !important;
}

/* ========================
   MODAL
======================== */
.modal-content {
    border-radius: var(--radius) !important;
    border: none !important;
    overflow: hidden;
}

.modal-header {
    background-color: var(--primary) !important;
    color: var(--white) !important;
    border: none !important;
    padding: 18px 24px !important;
    border-radius: 0 !important;
}

.modal-header .close {
    color: var(--white) !important;
    opacity: 0.9 !important;
    font-size: 1.5rem;
}

.modal-body {
    padding: 24px !important;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 6px;
}

.form-control {
    border-radius: 8px !important;
    border: 1.5px solid #ddd !important;
    padding: 10px 14px !important;
    font-size: 0.95rem !important;
    transition: border-color 0.3s, box-shadow 0.3s !important;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0,146,207,0.15) !important;
    outline: none !important;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ========================
   FOOTER
======================== */
#fin {
    background-color: var(--dark);
    padding: 30px 20px;
    text-align: center;
}

#fin h2 {
    color: rgba(255,255,255,0.75);
    font-size: clamp(0.72rem, 3vw, 0.9rem);
    font-weight: 400;
    margin: 0;
    line-height: 1.6;
}

/* ========================
   UTILITAIRES
======================== */
.text-center { text-align: center; }
.img-fluid   { max-width: 100%; height: auto; }
.rounded     { border-radius: var(--radius) !important; }
.shadow      { box-shadow: var(--shadow) !important; }

/* ========================
   MOBILE — max 767px
======================== */
@media (max-width: 767px) {

    /* Hamburger visible */
    .hamburger {
        display: flex;
    }

    /* Nav cachée par défaut, s'ouvre en dropdown */
    nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 20px 20px;
        gap: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        z-index: 999;
        border-top: 1px solid #eee;
    }

    nav.open {
        display: flex;
    }

    nav a {
        width: 100%;
        font-size: 1rem;
        padding: 13px 8px;
        border-bottom: 1px solid #f0f0f0;
        color: #333;
    }

    nav a:last-child {
        border-bottom: none;
    }

    nav a::after {
        display: none;
    }

    nav a:hover {
        color: var(--primary);
        background: rgba(0,146,207,0.06);
        border-radius: 6px;
        padding-left: 14px;
    }

    /* Hero */
    .hero-image {
        min-height: 240px;
    }

    .hero-content {
        width: 92%;
        padding: 16px;
    }

    /* Sections */
    section {
        padding: 48px 0;
    }

    /* Cards en colonne unique */
    .col-lg-4,
    .col-md-6 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .actualite-card .card-img-top {
        height: 190px;
    }

    /* Nous */
    #nous img {
        margin-bottom: 24px;
    }

    /* Présidente */
    .video-box {
        margin-top: 24px;
    }

    /* Contact button */
    #contactTheButton {
        width: 100% !important;
        max-width: 320px !important;
    }

    /* Modal plein écran sur mobile */
    .modal-dialog {
        margin: 10px !important;
    }

    .modal-body {
        padding: 16px !important;
    }
}

/* ========================
   TABLETTE — 768px à 991px
======================== */
@media (min-width: 768px) and (max-width: 991px) {

    .header .container {
        padding: 0 24px;
    }

    nav a {
        font-size: 0.88rem;
        margin-left: 14px;
    }

    .hero-image {
        min-height: 380px;
    }

    .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .actualite-card .card-img-top {
        height: 200px;
    }

    #nous img {
        margin-bottom: 0;
    }
}

/* ========================
   DESKTOP — 992px+
======================== */
@media (min-width: 992px) {

    :root {
        --header-height: 72px;
    }

    .header .container {
        padding: 0 30px;
    }

    .hero-image {
        min-height: 480px;
    }

    #nous img {
        margin-bottom: 0;
    }

    .video-box {
        margin-top: 0;
    }

    .actualite-card .card-img-top {
        height: 220px;
    }
}

/* ========================
   GRAND ÉCRAN — 1200px+
======================== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
        margin: 0 auto;
    }

    .header .container {
        padding: 0 20px;
    }
}

/* ========================
   TRÈS PETIT MOBILE — max 400px
======================== */
@media (max-width: 400px) {

    .logo span {
        font-size: 1rem;
    }

    .logo img {
        width: 32px;
        height: 32px;
    }

    .hero-image {
        min-height: 210px;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    section {
        padding: 40px 0;
    }

    #fin h2 {
        font-size: 0.72rem;
        padding: 0 10px;
    }
}