/* --- Reset & Base --- */
:root {
    --bearn-red: #C62127;
    --bearn-yellow: #FCDD09;
    --mountain-dark: #2C3E50;
    --light-bg: #F8F9FA;
    --white: #FFFFFF;
    --brick-red: #D9534F;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--mountain-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Top Bar --- */
.top-bar {
    background-color: var(--mountain-dark);
    color: var(--white);
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* --- Header Hero --- */
.hero-header {
    background-color: var(--white);
    position: relative;
    padding: 60px 0 100px 0;
    text-align: center;
    background: linear-gradient(180deg, #FFFdf0 0%, #ffffff 100%);
}

.main-logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
}

.hero-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--mountain-dark);
    line-height: 1.2;
}

.hero-header .highlight {
    color: var(--bearn-red);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    font-weight: 300;
}

.btn-cta {
    display: inline-block;
    background-color: var(--bearn-red);
    color: var(--white);
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(198, 33, 39, 0.3);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 33, 39, 0.4);
}

.mountain-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.mountain-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

.mountain-divider .shape-fill {
    fill: var(--light-bg);
}

/* --- Section Mission --- */
.mission {
    padding: 80px 0;
    background-color: var(--light-bg);
    overflow: hidden; 
}

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

.section-tag {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--brick-red);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.mission-text h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--mountain-dark);
}

.mission-values {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}

/* --- LE TABLEAU ET LA TRANSITION --- */

.mission-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.art-showcase {
    position: relative;
    z-index: 2;
    /* On garde la perspective fixe mais on enlève l'animation 3D au survol */
    transform: perspective(1000px) rotateY(-5deg); 
    max-width: 450px; 
    margin: 0 auto;
}

.framed-artwork {
    margin: 0;
    border-radius: 4px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.15);
}

/* GESTION DE LA DOUBLE IMAGE */

/* 1. Le conteneur (la Figure) */
.framed-artwork.swap-on-hover {
    position: relative; /* Indispensable pour l'alignement */
    display: block;
    overflow: visible;   
    cursor: pointer;    /* Indique que c'est interactif */
}

/* 2. Style commun aux images */
.art-img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    /* La transition : tout changement d'opacité prendra 0.6 secondes */
    transition: opacity 0.6s ease-in-out; 
}

/* 3. L'image TRADITIONNELLE (Dessous) */
.img-back {
    position: relative; /* Elle garde sa place physique */
    z-index: 10;
    opacity: 1; /* Visible par défaut */
}

/* 4. L'image MODERNE (Dessus) */
.img-front {
    position: absolute; /* Elle se superpose */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20; /* Elle est au-dessus */
    opacity: 0;  /* Invisible par défaut */
}

/* --- ACTION AU SURVOL --- */

/* Quand on survole le cadre : L'image moderne apparaît */
.framed-artwork.swap-on-hover:hover .img-front {
    opacity: 1;
}

/* Quand on survole le cadre : L'image traditionnelle disparaît */
/* Cela évite le mélange des deux images si elles ont des transparences */
.framed-artwork.swap-on-hover:hover .img-back {
    opacity: 0;
}

/* --- Fin de la transition --- */


/* Le cartel (plaque explicative) */
.art-plaque {
    position: absolute;
    bottom: -25px;
    right: -20px;
    background: var(--white);
    padding: 15px 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-left: 4px solid var(--brick-red);
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    z-index: 30; /* Doit être au-dessus de tout */
}

.art-plaque strong {
    font-size: 1.2rem;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.art-plaque span {
    font-size: 0.8rem;
    color: #777;
    margin-top: 2px;
}

.modern-backdrop {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 80%;
    height: 80%;
    background: linear-gradient(135deg, #fceecb 0%, #ffffff 100%); 
    z-index: -1;
    border-radius: 30px;
}

/* --- Section News --- */
.news-section {
    padding: 60px 0;
    background-color: var(--white);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr; 
    gap: 50px; 
    max-width: 800px; 
    margin: 30px auto 0 auto; 
}

.news-card {
    background: var(--light-bg);
    padding: 30px; 
    border-left: 5px solid var(--bearn-red); 
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

.news-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee; 
    padding-bottom: 10px;
}

.badge {
    background-color: var(--mountain-dark);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-right: 10px;
}

.news-card h4 {
    margin-bottom: 15px;
    color: var(--bearn-red);
    font-size: 1.5rem; 
}

.news-content {
    font-size: 1rem;
    color: #444;
    line-height: 1.8; 
}

.news-image-container {
    width: 100%;
    height: auto; 
    margin-bottom: 20px;
    background-color: #f4f4f4; 
    border-radius: 4px;
    overflow: hidden;
    display: flex; 
    justify-content: center; 
}

.news-img {
    max-width: 100%; 
    max-height: 500px; 
    width: auto; 
    height: auto; 
    display: block;
    object-fit: contain;
}

.news-card:hover .news-img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* --- Section Contact --- */
.contact-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.form-wrapper {
    background-color: var(--white);
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border-top: 5px solid var(--bearn-yellow);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--bearn-red);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--mountain-dark);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: var(--bearn-red);
}

/* --- Footer --- */
footer {
    background-color: var(--mountain-dark);
    color: #bbb;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
    margin-bottom: 40px;
}

footer h4 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

footer a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--bearn-yellow);
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.8rem
}

/* --- Style pour l'Image Unique (Mission) --- */
.simple-mission-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border: 4px solid #fff;
    transition: transform 0.3s ease;
}

.simple-mission-img:hover {
    transform: translateY(-5px);
}
/* --- GESTION MÉDIAS (IMAGES & VIDÉOS) FLEXIBLE --- */
.news-image-container {
    width: 100%;
    height: auto;         /* Le conteneur s'adapte à la taille de l'image */
    text-align: center;   /* Centre l'image si elle est moins large que la colonne */
    margin-bottom: 20px;
    background-color: transparent; /* Plus de fond noir imposé */
    line-height: 0;       /* Évite les petits espaces blancs sous les images */
}

.news-img {
    /* Règle 1 : Largeur max = largeur de la colonne */
    max-width: 100%;
    
    /* Règle 2 : Hauteur max = 300px (ou 400px selon votre goût) */
    /* C'est ce qui empêche l'image d'être géante, SANS la couper */
    max-height: 300px;
    
    /* Règle 3 : On garde les proportions naturelles (ratio) */
    width: auto;
    height: auto;
    
    display: inline-block; /* Permet le centrage */
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Petite ombre esthétique */
    
    /* Sécurité ultime pour ne jamais rogner */
    object-fit: contain; 
}

/* Même logique pour les fichiers vidéos (MP4) */
.news-video-file {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 4px;
    outline: none;
}

/* Pour YouTube, on garde une taille fixe propre */
.news-video-embed {
    width: 100%;
    max-width: 500px; /* On limite la largeur pour ne pas avoir un lecteur immense */
    aspect-ratio: 16 / 9; /* Format cinéma standard */
    margin: 0 auto;
    display: block;
    border-radius: 4px;
}
/* --- Bouton Lire la suite --- */
.read-more-btn {
    background: none;
    border: 2px solid var(--bearn-red);
    color: var(--bearn-red);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
    transition: all 0.3s;
}

.read-more-btn:hover {
    background-color: var(--bearn-red);
    color: white;
}

/* --- Zone de texte étendu (cachée par défaut) --- */
.full-article-content {
    display: none; /* Caché au départ */
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
    animation: fadeIn 0.5s;
}

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