:root {
    --primary-color: #000ea4; /* Gris foncé */
    --secondary-color: #d50303; /* Orange vif */
    --accent-color: #0288D1; /* Bleu */
    --text-color: #212121; /* Noir intense */
    --footer-bg: #010038; /* Gris foncé pour le footer */
    --footer-text-color: #FFFFFF; /* Texte blanc pour le footer */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    background-color: #FAFAFA;
    line-height: 1.6;
}

header {
    background-color: var(--primary-color);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

header .logo-container {
    display: flex;
    align-items: center;
}

header .logo-container img {
    height: 50px;
    margin-right: 10px;
    width: 15%;
    height: 15%;
}

header .logo-container .libele-section
{
    display: flex;
    flex-direction: column;
}

header .logo-container .libele-section h2 {
    color: #FFFFFF; /* Couleur blanche pour améliorer la visibilité */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Effet d'ombre légère */
    font-weight: 700; /* Mettre en gras pour plus de lisibilité */
    font-size: 48px;
}

header .logo-container .libele-section h3
{
    color: #FFFFFF; /* Couleur blanche pour améliorer la visibilité */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Effet d'ombre légère */
    font-weight: 700; /* Mettre en gras pour plus de lisibilité */
    font-size: 28px;
}

.navigation
{
    border-bottom: 1px solid black;
    display: flex;
    justify-content: center;
}

.navigation ul
{
    display: flex;
    flex-direction: inline;
}

.navigation ul li
{
    list-style-type: none;
}

.navigation ul li a
{
    text-decoration: none;
    color: rgb(0, 30, 0);
    font-size: 20px;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    padding-left: 30px;
    padding-right: 30px;
    padding-bottom: 4px;
    padding-top: 4px;
    cursor: pointer;
}

.navigation ul li a:hover
{
    color: white;
    background-color: red;
    font-weight: 700;
}

.navigation ul li a.tab-selected
{
    font-weight: 700;
    color: red;
}

.navigation ul li a.tab-selected:hover
{
    background: white;
}

main {
    padding: 20px;
}

/* Général pour les sections */
main section:not([data-tabname]) {
    margin: 40px 0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.hr-spacing-only {
    border: none;          /* désactive la bordure */
    background: none;      /* supprime toute couleur de fond */
    height: 0;             /* aucun trait visible */
    margin: 2rem 0;        /* garde l'espacement logique */
}
  

/* Style pour l'en-tête avec le mois */
#agenda h3 {
    font-size: 2.5rem;
    color: var(--primary-color); /* Couleur principale du site */
    text-align: center;
    margin-bottom: 20px;
}

/* Style pour la grille du calendrier */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin: 0 auto;
    max-width: 600px;
}

.calendar-header {
    display: contents;
}

.calendar-header span {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
}

/* Style pour les jours du calendrier */
.calendar-body {
    display: contents;
}

.day {
    width: 100%;
    padding: 10px 0;
    text-align: center;
    border-radius: 4px;
    background-color: #f0f0f0;
    font-size: 1.2rem;
}

/* Style pour les jours de la semaine (lundi-vendredi) */
.weekday {
    color: gray;
}

/* Style pour les week-ends (samedi et dimanche) */
.weekend {
    color: red;
    font-weight: bold;
}

/* Style pour les cases vides */
.empty {
    background-color: transparent;
}

footer {
    background-color: var(--footer-bg);
    color: var(--footer-text-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
}

.social-media img {
    height: 30px;
    margin: 0 10px;
}

/* Formulaires */
form {
    background-color: #FFF;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

form.resetstyle {
    background-color: #FFF;
    padding: 0px;
    max-width: 400px;
    margin: 0;
    box-shadow: 0;
}

form label, form input, form button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

form input, textarea {
    padding: 10px;
    border: 1px solid #CCC;
    border-radius: 5px;
}

form button, form input[type="submit"] {
    background-color: var(--secondary-color);
    color: #FFF;
    padding: 10px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

form button:hover {
    background-color: #ff0000;
}

form select
{
    padding: 10px;
    border: 1px solid #CCC;
    border-radius: 5px;
    width: 90%;
    text-align: center;
}

.errormessage
{
    color: var(--secondary-color);
    display: none;
}


/* Différencier chaque section avec des couleurs de fond */
#presentation {
    background-color: #FFFFFF; /* Vert clair */
}

#actions-recentes {
    background-color: #FFFFFF; /* Rouge très pâle */
}

/* Amélioration des titres des sections */
section h2, section h1 {
    font-size: 2rem;
    color: var(--primary-color); /* Couleur principale (gris foncé) */
    margin-bottom: 20px;
}

section.eventdate
{
    text-align: center;
}

.titleeventdate
{
    font-size: 24px;
    font-weight: bold;
}

.last-event-image
{
    width: 40%;
}

.selected
{
    border: 2px solid teal;
    border-radius: 10px;
    color: teal;
}

/* Responsive */
@media only screen and (max-width: 740px) {
    .navigation ul {
        flex-direction: column;
        align-items: center;
    }

    .navigation ul li {
        margin: 10px 0;
    }

    

    .logo-container
    {
        flex-direction: column;
    }

    header .logo-container img
    {
        width: 80%;
        height: 80%;
    }

    .last-event-image
    {
        width: 100%;
    }
}

/* ==== Styles spécifiques à la zone d’édition ==== */
main section.edit-component-header
{
    padding: 15px;
    border-radius: 8px;
    box-shadow: none;
}

.edit-component-header {
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.edit-component-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem; /* Un peu plus grand pour le titre */
    font-weight: 700;
    line-height: 1.2;
}

/* Formulaire en colonne, champs prenant toute la largeur */
.edit-component-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

form.edit-component-form {
    background-color: #FFF;
    padding: 45px;
    max-width: none;
    margin: 0 auto;
    box-shadow: 0;
}

/* Tous les champs prennent 100% de la largeur */
.edit-component-form input[type="text"],
.edit-component-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #CCC;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

/* Textarea preview avec hauteur ajustable */
.edit-component-form textarea#preview, .edit-component-form textarea#description {
    min-height: 180px;
    resize: vertical; /* Autorise l'utilisateur à redimensionner verticalement */
}

/* Boutons alignés et espacés */
.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

button.primary {
    background-color: var(--accent-color);
    color: white;
    padding: 12px 25px;
    font-weight: 700;
}

button.secondary {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    font-weight: 700;
}

button.primary:hover {
    background-color: #0277BD;
}

button.secondary:hover {
    background-color: #b80202;
}

/* Conteneur de boutons alignés horizontalement */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;            /* Espace entre les deux boutons */
    flex-wrap: wrap;      /* Les boutons se repositionnent si l'écran est étroit */
    margin-top: 20px;
}
