/* Variables */
:root {
    --primary-color: #1a4b84;
    --secondary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #000000;
    --background-color: #faf7f2;
    --card-background: white;
    --border-color: #fcfcfc;
}

/* Styles généraux */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

html, body {
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    overflow-x: hidden;
    background-color: var(--background-color) !important;
}

body {
    font-family: 'Source Sans Pro', 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--background-color);
    z-index: -1;
}

main {
    flex: 1 0 auto;
    width: 100%;
    padding: calc(var(--header-height) + 1rem) 0 2rem 0;
    margin: 0;
    background-color: var(--background-color);
    transition: padding-top 160ms ease;
}

/* Header et Navigation */
/* Header fixé en haut + espace dynamique pour le contenu principal */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
}
.navbar {
    background-color: white !important;
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0;
}

.navbar .container {
    background-color: white !important;
    box-shadow: none;
    padding: 0 5px;
    margin: 0 auto;
    max-width: 1400px;
    width: 100%;
}

.navbar-brand {
    padding: 0;
    margin-right: 0.5rem;
}

.navbar-nav {
    flex-wrap: wrap;
    margin-left: -0.5rem;
}

.navbar-nav .nav-link {
    color: var(--primary-color) !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 1.2rem 0.6rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    background-color: rgba(26, 75, 132, 0.05);
}

@media (max-width: 1200px) {
    .navbar-expand-lg .navbar-toggler {
        display: block;
    }
    .navbar-expand-lg .navbar-collapse {
        display: none !important;
    }
    .navbar-expand-lg .navbar-collapse.show {
        display: block !important;
    }
    .navbar-expand-lg .navbar-nav {
        flex-direction: column;
    }
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Container principal */
.container {
    max-width: 1400px;
    width: 100%;
    padding: 0 15px;
    margin: 2rem auto;
    background-color: transparent !important;
}

.container.mt-4 {
    padding: 0 15px;
    margin: 1.5rem auto;
}

/* Row et Col */
.row {
    margin: 0 -15px !important;
    background-color: transparent !important;
    width: calc(100% + 30px);
    display: flex;
    flex-wrap: wrap;
}

.col-12, .col-md-8, .col-md-4 {
    padding: 0 15px !important;
    background-color: transparent !important;
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Articles */
article {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin: 0 0 2rem 0;
    width: 100%;
    display: block;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: justify;
}

.article-content p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.lead {
    text-align: justify;
}

/* Article complet (page article.php) */
.article-single {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    width: 100%;
    text-align: justify;
}

/* Titres */
h3, .h3 {
    color: var(--primary-color) !important;
    font-weight: 600;
}

article h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

article h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

article .article-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Sidebar */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin: 0 0 2rem 0;
    width: 100%;
    display: block;
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
    width: 100%;
    display: block;
}

.card-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: justify;
    font-size: 1.8rem;
}

.card-text {
    color: var(--text-color);
    text-align: justify;
    margin-bottom: 1.5rem;
}

.card .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.card .btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Formulaire de contact */
.form-container {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 75, 132, 0.15);
}

/* Boutons */
.btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

footer .container {
    background-color: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

footer h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

footer ul li {
    margin-bottom: 0.75rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.page-link {
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 4px;
    background-color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .container, .container.mt-4 {
        padding: 0 1rem;
    }
    
    .row {
        margin: 0 -1rem !important;
        width: calc(100% + 2rem);
    }
    
    .col-12, .col-md-8, .col-md-4 {
        padding: 0 1rem !important;
    }
    
    .navbar-nav {
        flex-direction: column;
        overflow-x: visible;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    article {
        padding: 1rem;
    }
    
    article h2 {
        font-size: 1.5rem;
    }
}

/* Animations */
.nav-link, .card {
    transition: all 0.3s ease;
}

/* Utilitaires */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1) !important;
}

/* Header image */
.header-image-container {
    width: 100%;
    height: 700px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.header-overlay-text {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    font-size: 3.5rem;
    font-weight: 700;
    padding: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    max-width: 80%;
    margin: 0;
    line-height: 1.3;
    transform: translateY(-100px);
}

.header-overlay-text .subtitle {
    font-size: 0.8em;
    display: block;
    margin-top: 0.5rem;
}

@media (max-width: 992px) {
    .header-overlay-text {
        font-size: 2.5rem;
        transform: translateY(-30px);
        line-height: 1.4;
    }
}

@media (max-width: 576px) {
    .header-overlay-text {
        font-size: 2rem;
        transform: translateY(-20px);
        line-height: 1.4;
        max-width: 90%;
    }
    .header-image-container {
        height: 500px;
    }
} 

/* Améliorer les cartes de média avec une ombre et un effet au survol */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Effet d'agrandissement et d'ombre au survol de la carte */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Boutons personnalisés */
.custom-btn {
    background-color: #007bff;
    border: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.custom-btn:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.custom-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 143, 255, 0.5);
}

/* Améliorer l'affichage des images */
.card img {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Augmenter l'espacement des éléments à l'intérieur des cartes */
.card-body {
    padding: 1.5rem;
}

/* Ajouter un espacement entre les éléments du texte et les images/vidéos */
.card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Assurer une taille et une présentation cohérentes pour les vidéos */
.card video {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.image-article {
    float: right; /* Positionne l’image à droite */
    margin-left: 20px; /* Ajoute un espace entre l’image et le texte */
    margin-bottom: 10px; /* Ajoute un espace sous l’image */
    max-width: 600px; /* Définit une largeur max */
    height: auto; /* Ajuste automatiquement la hauteur */
}

