/**
 * BYTV Rennes - Styles Principaux
 * Version: 1.1.8
 * Last Updated: 2024
 */

:root {
    --bg-main: #05093E;
    --bg-main_blc: #F9F6EE; 
    
    --bg-darker: #02041a;
    --primary-purple: rgb(100, 85, 247);
    --text-light: #ffffff;
    --text-muted: #cbd5e1;
    --font-title: 'Righteous', cursive;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    background: radial-gradient(circle at top right, var(--bg-main), var(--bg-darker));
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden; /* Empêche le scroll horizontal accidentel */
}

/* Typographie Adaptative */
h1, h2, h3 {
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

h2, h3 {
    color: var(--bg-main_blc);
}

/* Header & Navigation */
header {
    height: 100vh;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    position: relative;
    border-bottom: 2px solid var(--primary-purple);
    overflow: hidden;
    background-color: #000;
}

/* Vidéo Background */
#video-background {

    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Overlay sombre pour lisibilité */
header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* Menu de navigation */
#div_menu {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

#div_menu_item a {
    color: var(--text-light);
    border: 2px solid var(--primary-purple);
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(168, 85, 247, 0.3);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

#div_menu_item a:hover {
    background: var(--primary-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

/* Contenu Entête */
#div_entete {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 5;
    padding: 0 1rem;
}

#div_entete img {
    width: 100%;
    max-width: 250px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
}

h1 {
    color: #ffffff;
    font-size: clamp(1.2rem, 8vw, 2.8rem);
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0,0,0,1);
}

/* Sections */
section {
    padding: clamp(3rem, 1vh, 6rem) 5%;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    margin-bottom: 2rem;
    background: var(--bg-main_blc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

p {
    color: var(--text-muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
    margin-bottom: 1.5rem;
}

/* Grilles Formations */
#row-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

article {
    background: linear-gradient(145deg, #070c4d, #040733);
    border: 1px solid rgba(168, 85, 247, 0.1);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

article:hover {
    transform: translateY(-5px);
    border-color: var(--primary-purple);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

article h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    min-height: auto;
}

articleBlc {
    background: linear-gradient(145deg, #070c4d, #040733);
    border: 1px solid rgba(168, 85, 247, 0.1);
    padding: 2rem;
    border-radius: 15px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

articleBlc:hover {
    transform: translateY(-5px);
    border-color: var(--primary-purple);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

articleBlc h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    min-height: auto;
}
.photo_article {
    width: 100%;
    height: 200px;
    /* Conserve les proportions de l'image en remplissant le conteneur */
    object-fit: cover;
    /* Aligne l'image sur le bord supérieur (cale le haut de la photo) */
    object-position: top;
    border-radius: 8px;
    margin: 1rem 0;
    opacity: 0.9;
}

.button {
    margin-top: auto;
    background: var(--primary-purple);
    color: white;
    padding: 0.8rem 1rem;
    text-align: center;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--bg-main_blc);
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    
    p {
    color: var(--bg-main);
    font-size: clamp(1rem, 2vw, 1.15rem);
    margin-bottom: 1.5rem;
    }
}

address {
    font-style: normal;
    color: var(--bg-main);
    margin: 1rem 0;
    font-size: 0.9rem;
}

/* MEDIA QUERIES SPÉCIFIQUES SMARTPHONE */

/* Mode Paysage (Landscape) - Écrans courts */
@media screen and (orientation: landscape) and (max-height: 500px) {
    header {
        height: auto;
        padding: 4rem 1rem;
    }
    #div_entete img {
        max-width: 150px;
    }
    #div_menu {
        top: 10px;
        right: 10px;
    }
}

/* Mobile Portrait et petits écrans */
@media screen and (max-width: 600px) {
    header {
        height: 90vh; /* Laisse deviner le contenu en dessous */
    }
    #div_menu {
        width: 100%;
        right: 0;
        text-align: center;
        top: 20px;
    }
    section {
        padding: 3rem 1.5rem;
    }
    #row-container {
        grid-template-columns: 1fr; /* Une seule colonne forcée */
    }
    article {
        padding: 1.5rem;
    }
}