/* =====================================================
   CSS Final pour CRC VAE Auvergne-Rhône-Alpes
   - Gestion des deux nav-container dans le header
   - Menu burger masqué sur desktop, visible sur mobile
   - Menu principal visible sur desktop, masqué sur mobile
   - z-index ajouté pour le menu déroulant
   ===================================================== */

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
@font-face {
  font-family: "Questrial";
  src: url("../fonts/questrial-regular.woff2") format("woff2");
  font-display: swap;
}

html {
    font-size: 90% 
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: "Questrial", sans-serif;
    color: #3D3D3D;
    background: #fff;
    width: 100%;
}

a {
    text-decoration: none;
    color: #4A7FB5;
}

a:hover {
    color: #1B3A6B;
}

/* ===== HEADER ===== */
header {
    background-color: #1B3A6B;
    padding: 0 2rem;
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- Premier nav-container (menu complet) --- */
.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 70px;
    width: auto;
    margin-right: 2rem;
    margin-top: -2px;
    border-radius: 6px;
    background: white;
    padding: 4px;
}

.nav-links ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 6px 14px;
    font-family: "Questrial", sans-serif;
    font-size: 1em;
    position: relative;
}

/* Barre animée sous les liens */
.nav-links ul li a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #4A7FB5;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links ul li a:hover {
    color: white;
}

.nav-links ul li a:hover::after {
    width: 100%;
}

.nav-links ul li a.active {
    color: white;
    font-weight: 500;
}

.nav-links ul li a.active::after {
    width: 100%;
    background-color: white;
}
.links-box {
    margin-top: 1.5em;
    padding: 1em 1.2em;
    background: #f0f4fa;
    border-left: 4px solid #4A7FB5;
    border-radius: 0 8px 8px 0;
}
.links-box p {
    font-size: 0.85em;
    font-weight: 500;
    color: #1B3A6B;
    margin-bottom: 0.5em;
}
.links-box a {
    display: block;
    font-size: 0.85em;
    color: #4A7FB5;
    padding: 3px 0;
    text-decoration: none;
    line-height: 1.5;
}
.links-box a:hover {
    color: #1B3A6B;
    text-decoration: underline;
}

/* Burger menu (caché par défaut) */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 280px;
    background-color: #1B3A6B;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../static/images/imageheaderv4.jpg');
    background-size: cover;
    background-position: center;   /* affiche le haut de l'image (têtes + texte) */
    background-attachment: scroll; 
    opacity: 0.35;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 2em;
    font-family: "Questrial", sans-serif;
    text-shadow: 0 0 15px black;
    border: 3px solid rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    padding: 0.6em 1em;
    background: rgba(27, 58, 107, 0.4);
    display: inline-block;
    color: white;
}

.hero-content p {
    margin-top: 1em;
    font-size: 1.1em;
    opacity: 0.9;
    color: white;
}

/* ===== BANDES DÉCORATIVES ===== */
.bande {
    height: 10px;
    background: linear-gradient(to right, #3a6baa, #4A7FB5, #2C5F9E, #1B3A6B);
    border-bottom: 4px solid #4A7FB5;
}

.bande-bas {
    height: 10px;
    background: linear-gradient(to left, #3a6baa, #4A7FB5, #2C5F9E, #1B3A6B);
}

/* ===== SECTION ARTICLE + VIDÉO ===== */
.section2 {
    display: flex;
    align-items: flex-start;
    padding: 3em;
    gap: 3em;
    background: white;
}

article {
    flex: 1;
    padding: 0;
}

h2 {
    color: #4A7FB5;
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 0.4em;
    line-height: 1.2em;
}

hr.titlehr {
    width: 33em;
    border: 0;
    border-bottom: 6px dotted #1B3A6B;
    opacity: 0.9;
    margin: 0 auto 1.2em;
}

.vaepres {
    font-size: 1.1em;
    line-height: 1.4em;
    margin-bottom: 1em;
    text-align: left;
}

.suite {
    display: inline-block;
    padding: 0.8em 1.2em;
    border-radius: 5px;
    background-color: #1B3A6B;
    margin-top: 0.5em;
}

.suite:hover {
    background-color: #4A7FB5;
}

.suite a {
    color: white;
    font-weight: bold;
    text-decoration: none;
}

.vid {
    margin-top: 0.5em;
    flex-shrink: 0;
}

.video {
    border-radius: 10px;
    display: block;
    width: 440px;
    height: 248px;
}




.intervenons-titre {
    font-size: 1.05em;
    font-weight: 500;
    color: #1B3A6B;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

.intervenons-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.intervenons-list li {
    display: flex;
    align-items: center;
    gap: 0.7em;
    font-size: 1em;
    color: #3D3D3D;
    line-height: 1.4em;
}

.intervenons-list li::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    min-width: 10px;        /* empêche l'icône de rétrécir */
    border-left: 3px solid #4A7FB5;
    border-bottom: 3px solid #4A7FB5;
    transform: rotate(-135deg);
    margin-left: 4px;
}
/* ===== SECTION CARTES ===== */
.cards-section {
    background: #f7f9fc;
    padding: 3em;
    border-top: 4px solid #4A7FB5;
}

.cards-section h2 {
    margin-bottom: 1.5em;
    text-align: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5em;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    display: flex;
    align-items: center;
    gap: 2em;
    background: white;
    border-radius: 12px;
    border: 1px solid #dde6f0;
    padding: 1.5em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    border-color: #4A7FB5;
    box-shadow: 0 4px 12px rgba(74, 127, 181, 0.15);
}

.card-reverse {
    flex-direction: row-reverse;
}

.card-img {
    width: 250px;
    height: 200px;
    flex-shrink: 0;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.card-img img:hover {
    transform: scale(1.05);
}

.card-texte {
    flex: 1;
}

.card-texte h3 {
    color: #1B3A6B;
    font-size: 1.1em;
    margin-bottom: 0.6em;
}

.card-texte p {
    font-size: 0.9em;
    line-height: 1.4em;
    color: #555;
    margin-bottom: 1em;
}

.card-lien {
    color: #4A7FB5;
    font-weight: 500;
    text-decoration: none;
}

.card-lien:hover {
    color: #1B3A6B;
}

/* ===== FOOTER ===== */
.footer {
    background: #1B3A6B;
    color: rgba(255, 255, 255, 0.8);
    font-family: "Questrial", sans-serif;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3em;
    padding: 3em 3em 2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}



.footer-logo-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1em;
}

.footer-logo {
    height: 52px;
    width: auto;
    background: white;
    border-radius: 8px;
    padding: 4px;
    flex-shrink: 0;
}

.org-name {
    font-size: 0.95em;
    font-weight: 500;
    color: white;
    line-height: 1.4;
}

.footer-desc {
    font-size: 0.85em;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.2em;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    transition: background 0.15s;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Colonnes navigation et contact */
.footer-col h4 {
    font-size: 0.82em;
    font-weight: 500;
    color: white;
    margin-bottom: 1.2em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 0.6em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.footer-col ul li a {
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.15s, padding-left 0.15s;
    display: block;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 4px;
}

/* Contact */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0.9em;
}

.contact-icon {
    font-size: 1em;
    color: #4A7FB5;
    flex-shrink: 0;
    margin-top: 1px;
}

.contact-item span,
.contact-item a {
    font-size: 0.88em;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.15s;
}

.contact-item a:hover {
    color: white;
}

/* Bas du footer */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2em 3em;
    flex-wrap: wrap;
    gap: 0.8em;
}

.footer-copy {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.35);
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.8em;
    flex-wrap: wrap;
}

.footer-legal a {
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.footer-dot {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.9em;
}

/* ===== BOUTON RETOUR EN HAUT ===== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 45px;
    height: 45px;
    background: #1a9af0;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(27, 58, 107, 0.4);
}

.scroll-top:hover {
    background: #4A7FB5;
    transform: translateY(-3px);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   MEDIA QUERIES - RESPONSIVE DESIGN
   ===================================================== */

/* Tablette (1024px et moins) */
@media (max-width: 1024px) {
    .section2 {
        flex-direction: column;
        padding: 2em 1.5em;
    }
    
    hr.titlehr {
        width: 100%;
        max-width: 100%;
    }
    
    .video {
        width: 100%;
        height: auto;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 1.5em;
    }
    
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 2em;
    }
    
    .footer-identity {
        grid-column: 1 / -1;
    }
}

/* Mobile (768px et moins) */
@media (max-width: 768px) {
    /* --- Masquer le premier nav-container (menu complet) --- */

    
    
    /* Style du burger */
    .burger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 18px;
        cursor: pointer;
        z-index: 10001; /* z-index plus élevé que le menu */
    }
    
    /* Menu mobile */
    .burger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 18px;
        cursor: pointer;
        z-index: 10001;
    }

    .nav-links ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #1B3A6B;
        padding: 1em 0;
        z-index: 10000;
    }

    .nav-links ul.active {
        display: flex;
    }

    .nav-links ul li a {
        color: white;
        padding: 1em;
        text-align: center;
        display: block;
    }
    
    /* Hero */
    .hero {
        height: 220px;
    }
    
    .hero-content h1 {
        font-size: 1.2em;
    }
    
    /* Sections */
    .cards-section {
        padding: 2em 1em;
    }
    
    .card-img {
        width: 100%;
        height: 200px;
    }
    
    .card {
        flex-direction: column;
    }
    
    .card-reverse {
        flex-direction: column;
    }
    
    /* Footer */
    .footer-top {
        grid-template-columns: 1fr;
        padding: 2em 1.5em;
    }
    
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        padding: 1em 1.5em;
    }
    
    .footer-legal {
        gap: 0.6em;
    }
}

@media (min-width: 769px) {
    .burger {
        display: none;
    }
}
/* Très petit écran (600px et moins) */
@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 1em;
    }
    
    .hero-content p {
        font-size: 0.9em;
    }
    
    .vaepres {
        font-size: 1em;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5em;
    }
}