/* --------- BASE --------- */
/* Général */
body {
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

@font-face {
    font-family: 'Kalam';
    src: url('./fonts/Kalam/Kalam-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Kalam';
    src: url('./fonts/Kalam/Kalam-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Kalam';
    src: url('./fonts/Kalam/Kalam-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./fonts/Montserrat/static/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./fonts/Montserrat/static/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./fonts/Montserrat/static/Montserrat-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./fonts/Montserrat/static/Montserrat-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

/* Enveloppe du contenu */
.content-wrapper {
    max-width: 1200px;
    margin: 2rem auto;
    /* Centre le contenu avec un espace autour */
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    /* Coins arrondis pour un effet moderne */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Texte des éléments dans .content-wrapper */
.content-wrapper p,
.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    color: #333;
    line-height: 1.6;
    text-align: justify;
    /* Texte justifié */
    text-justify: inter-word;
    /* Justification de l'espace entre les mots */
}

/* En-têtes */
.content-wrapper h1 {
    font-size: 2.5rem;
    color: #D53939;
    /* Couleur d'accentuation pour les titres */
    margin-bottom: 1rem;
    text-align: center;
    /* Centrage du titre principal */
    text-transform: uppercase;
    font-weight: bold;
}

.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4 {
    font-size: 1.8rem;
    color: #444;
    margin-bottom: 1rem;
}

/* Liens */
.content-wrapper a {
    color: #D53939;
    /* Couleur d'accentuation des liens */
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-wrapper a:hover {
    color: #A22A2A;
    /* Légère variation de couleur au survol */
}

/* Liste */
.content-wrapper ul {
    list-style-type: disc;
    margin-left: 2rem;
}

.content-wrapper ol {
    list-style-type: decimal;
    margin-left: 2rem;
}

.div-centered iframe {
    width: 100%;
    max-width: 800px;
    height: 450px;
}

.card-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.p-highlight {
    color: #D53939;
}

/* Classe pour centrer un paragraphe */
.p-centered,
.content-wrapper p {
    text-align: justify;
    text-justify: inter-word;
    /* Optionnel pour affiner la justification */
    margin: 1rem auto;
    /* Ajoute de l'espace au-dessus et en dessous */
    max-width: 80%;
    /* Limite la largeur du paragraphe pour un meilleur rendu */
}

.div-centered {
    display: flex;
    justify-content: center;
    /* Centre horizontalement */
    align-items: center;
    /* Centre verticalement */
    margin-top: 15px;
}

.img-rounded {
    border-radius: 50px;
}

/* Formulaires */
form input,
form select,
form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* Erreurs ou messages de validation */
.error,
.success {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
    text-align: center;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
}

.success {
    background-color: #d4edda;
    color: #155724;
}

/* --------- CTA --------- */
.hero-section {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

/* Image de fond */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Filtre gris transparent */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Conteneur des boutons */
.hero-buttons {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    gap: 1rem;
}

/* --------- CARD --------- */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card img {
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h3 {
    font-size: 1.3rem;
    color: #D53939;
    margin-bottom: 0.5rem;
}

.card p {
    text-align: justify;
    color: #333;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 25%;
    height: 100%;
    object-fit: cover;
    transition: opacity 1s ease-in-out;
}

/* La première image est visible par défaut */
#randomPhoto1 {
    opacity: 1;
}

/* La deuxième image est cachée par défaut */
#randomPhoto2 {
    opacity: 0;
}

/* Style pour l'image cachée */
.hidden {
    opacity: 0 !important;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* Cercles de maintenance */
.maintenance-cell {
    text-align: center;
    vertical-align: middle;
}

.maintenance-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    margin: 0 auto;
}

.maintenance-circle[data-maintenance="1"] {
    background-color: #4CAF50;
    /* Vert pour maintenance terminée */
}

.maintenance-circle[data-maintenance="1"]:hover {
    background-color: #3c863e;
}

.maintenance-circle[data-maintenance="2"] {
    background-color: #f44336;
    /* Rouge pour en maintenance */
}

.maintenance-circle[data-maintenance="2"]:hover {
    background-color: #b93127;
}

/* Tooltip */
.maintenance-circle::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
}

.maintenance-circle:hover::after {
    visibility: visible;
    opacity: 1;
}

html,
body {
    height: 100%;
    margin: 0;
}

/* Container principal en colonne */
.page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Le contenu prend tout l'espace disponible */
.content {
    flex: 1;
}

/* Style optionnel pour le footer */
.footer {
    background-color: #f5f5f5;
    padding: 20px;
    text-align: center;
}