@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@400;700&display=swap');


/* Styles généraux */
body {
    background: url('/assets/images/départment.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* Fixe l'image de fond */
    font-family: 'Titillium Web', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    position: relative;
    overflow-x: hidden;
}


h2 {
    color: black;
    font-size: 2rem;
    margin: 0 0 2rem;
}

main {
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2);
}

/* Marquee - Banderole */
.marquee {
    background: linear-gradient(90deg, #0056b3, #007bff);
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 0.8rem;
    margin: 2rem auto;
    width: 100%;
    max-width: 200rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    z-index: 10;
    box-sizing: border-box;
    box-shadow: 0 0.4rem 0.6rem rgba(0, 0, 0, 0.1);
    border: 0.2rem solid #004b93;
}

.marquee form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
}

.marquee button {
    width: 100%;
    color: #fff;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
}

.marquee button:hover {
    background-color: #0056b3;
}

.marquee h2 {
    display: inline-block;
    animation: marquee 15s linear infinite;
    white-space: nowrap;
    line-height: 1.5;
    box-sizing: border-box;
    color: white;
}

@keyframes marquee {
    0% {
        transform: translateX(130%);
    }
    100% {
        transform: translateX(-140%);
    }
}

/* Hero Section */
.hero-section {
    color: ghostwhite;
    text-align: center;
    padding: 6rem 2rem;
    border-radius: 0.8rem;
}

.hero-section .hero-content h1 {
    font-size: 3rem;
    margin: 0 0 2rem;
    color: black;
}

.hero-section .hero-content p {
    font-size: 1.25rem;
    margin: 0 0 2rem;
    color: black;
}

.hero-section .btn-scroll {
    background: #007bff;
    color: ghostwhite;
    padding: 1rem 2rem;
    border: none;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.hero-section .btn-scroll:hover {
    background: #0056b3;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(30rem, 1fr));
    gap: 2rem;
    grid-auto-flow: dense;
    align-content: center;
}

.article-preview {
    background: ghostwhite;
    color: #333;
    padding: 2rem;
    border-radius: 0.8rem;
    box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    display: flex;
    flex-direction: column; /* Organisation verticale */
    min-height: 50%; /* Hauteur uniforme pour toutes les cartes */
}

.article-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2);
}

/* Images uniformes */
.article-image {
    width: 100%;  /* Ajustement responsive */
    max-width: 365px;
    height: 300px; /* Hauteur fixe */
    object-fit: cover;
    border-radius: 0.8rem;
    margin-bottom: 1rem;
    align-self: center; /* Centrer l'image */
}

.article-content {
    flex-grow: 1; /* Prend tout l'espace disponible */
}


/* Bouton "En savoir plus" */
.read-more {
    background: #007bff;
    color: ghostwhite;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: auto; /* Force le bouton à rester en bas */
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
}

.article-content p {
    font-size: 1rem;
    margin: 0 0 2rem;
}

/* Menu Panels */
.panel-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.panel-container h2 {
    color: white;
}

.panel {
    flex: 1 1 calc(25% - 0.5rem);
    background: #007bff;
    color: ghostwhite;
    padding: 0.8rem;
    text-align: center;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.panel:hover {
    background: #0056b3;
    transform: scale(1.02);
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2);
}

/* Features Grid */
.features-grid {
    max-width: 125rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40rem, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: ghostwhite;
    border: 0.1rem solid #ddd;
    border-radius: 0.8rem;
    box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: scale(1.05);
    box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.2);
}

.feature img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

/* Boutons d'administration */
button,
form button {
    background: #007bff;
    color: #fff;
    padding: 1rem 1.5rem;
    justify-content: center;
    margin: 1rem;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 1rem;
}

.btn-save {
    background: #28a745;
    max-width: 15%;

}

.btn-diff {
    background: #28a745;
}

.btn-delete {
    background: #dc3545;
    max-width: 15%;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    margin: 0;
}

/* Dropzone */
.dropzone {
    display: block;
    padding: 1rem;
    background: ghostwhite;
    border: 0.2rem dashed #007bff;
    border-radius: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dropzone:hover {
    background: ghostwhite;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section .hero-content h1 {
        font-size: 2rem;
    }

    .articles-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
}




@media (max-width: 480px) {
    .hero-section {
        padding: 3rem 1rem;
    }

    .hero-section .hero-content h1 {
        font-size: 1.5rem;
    }

    .marquee {
        padding: 1rem 0.5rem;
        font-size: 1rem;
    }
    .marqueee {
        padding: 1rem 0.5rem;
        font-size: 1rem;
    }
}

a {
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
}

.gestion {
    background-color: ghostwhite;
    padding: 2rem;
    max-width: 20%;
    margin: auto;
    border-radius: 0.8rem;
}

textarea {
    font-size: 1.25rem;
    width: 100%;
    text-align: center;
    border-color: black;
    border-radius: 0.8rem;
    padding-bottom: 1rem;
}

input {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    border-color: black;
    border-radius: 0.8rem;
}

.departement-content {
    background-color: ghostwhite;
    padding-bottom: 2rem;
    max-width: 20%;
    margin: auto;
    border-radius: 0.8rem;
}

.link {
    font-size: 2rem;
    background-color: ghostwhite;
    border-radius: 0.8rem;
    padding: 0.375rem;
}

.contour {
    padding: 1.5rem;
}

/* Popup */
.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    border: 0.0625rem solid #ccc;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
    padding: 1.25rem;
    z-index: 1000;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Styles pour le conteneur de l'iframe */
.video-container {
    max-width: 50%; /* S'adapte à la taille du conteneur parent */
    max-height: 50%;
    position: relative;
    padding-top: 56.25%; /* Rapport 16:9 */
    margin: 2rem auto;
    overflow: hidden;
}

iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    border: none; /* Supprime la bordure */
    border-radius: 1.5rem; /* Bords arrondis pour l'iframe */
}

/* Mode Sombre */
.dark-mode {
    background: #121212;
    color: #f1f1f1;
}

.dark-mode body {
    background: #121212;
    color: #f1f1f1;
}

.dark-mode h2,
.dark-mode h3,
.dark-mode h1,
.dark-mode p {
    color: #ffffff;
}

.dark-mode main {
    background-color: rgba(40, 40, 40, 0.9);
    color: #ffffff;
}

.dark-mode .marquee {
    background: linear-gradient(90deg, #002d62, #0056b3);
    border-color: #004b93;
}

.dark-mode .hero-section {
    background: rgba(20, 20, 20, 0.9);
}

.dark-mode .hero-section .hero-content h1,
.dark-mode .hero-section .hero-content p {
    color: white;
}

.dark-mode .article-preview {
    background: #1e1e1e;
    color: #ffffff;
}

.dark-mode .read-more {
    background: #333;
}

.dark-mode .panel {
    background: #004b93;
    color: #ffffff;
}

.dark-mode .panel:hover {
    background: #002d62;
}

.dark-mode .feature {
    background: #1e1e1e;
    border-color: #333;
}

.dark-mode .gestion,
.dark-mode .departement-content {
    background: #1e1e1e;
    color: white;
}

.dark-mode .link {
    background: #1e1e1e;
    color: white;
}

.dark-mode button,
.dark-mode .btn-save,
.dark-mode .btn-delete {
    background: #0056b3;
    color: #ffffff;
}

.dark-mode .dropzone {
    background: #1e1e1e;
    border-color: #0056b3;
    color: white;
}

.dark-mode a {
    color: #1e90ff;
}

.dark-mode .popup {
    background: #333;
    border-color: #555;
    color: #ffffff;
}

.dark-mode .overlay {
    background-color: rgba(0, 0, 0, 0.8);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px;
}

.day {
    background-color: #f3f3f3;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.event {
    background-color: lightblue;
    padding: 10px;
    margin: 8px 0;
    border-radius: 5px;
    font-size: 16px;
}

/* Mode responsive pour mobile */
@media (max-width: 768px) {
    .calendar {
        display: flex;
        flex-direction: column;
    }

    .day {
        width: 100%;
    }
}


.dark-mode .day {
    background-color: #4c4c4c;
    border: 1px solid #4c4c4c;
}

.dark-mode .event {
    background-color: #333;
}


.profile {
    /* Centrer le contenu au milieu de la page */

    display: flex;
    justify-content: center;
    align-items: center;
    height: 506px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    padding: 30px;
    text-align: center;
    flex-direction: column;
}




.profile h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
}

.profile-info p {
    font-size: 18px;
    color: #555;
    margin: 10px 0;
}

.profile-info strong {
    color: #007bff;
}



.profile-btn {
    background-color: #dc3545;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.profile-btn:hover {
    background-color: #c82333; /* Rouge plus foncé au survol */
    transform: scale(1.05); /* Effet léger d'agrandissement */
}

.profile-btn:active {
    transform: scale(0.95); /* Effet clic */
}



/* Ajustement général pour le mode sombre */
body.darkmode {
    --bg: #222;
}

/* Réduction de la taille de l'icône pour mobile */
svg {
    width: 50px; /* Taille plus petite pour mobile */
    height: 50px;
}

/* light mode */
.darkmode-icon {
    .moon-shadow {
        transition: cx 400ms ease;
    }

    .rays {
        transition: stroke-dashoffset 400ms ease;
        stroke-dashoffset: 24;
        stroke-dasharray: 12;
    }

    .moon-shadow {
        fill: black;
    }

    .rays, .sun-stroke {
        stroke: #777;
        fill: none;
    }
}

/* dark mode */
.darkmode-checkbox:checked ~ label {
    cursor: pointer;
}

.darkmode-checkbox:checked ~ label .darkmode-icon .moon-shadow {
    cx: 40;
}

.darkmode-checkbox:checked ~ label .darkmode-icon .rays {
    stroke-dashoffset: 12;
    stroke-dasharray: 12;
}

/* Cacher l'input checkbox */
.darkmode-checkbox {
    display: none;
}

/* Styles pour l'icône du soleil et de la lune dans le label */
.darkmode-icon {
    transition: transform 0.4s ease;
}

/* Rotation en mode sombre */
.darkmode-checkbox:checked ~ label .darkmode-icon {
    transform: rotate(180deg);
}

/* Ajustement de la taille et de l'espacement pour mobile */
label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px; /* Réduction du padding */
    cursor: pointer;
}

/* Soleil plus petit */
.sun {
    fill: #ff7;
}

/* Media query pour écrans mobiles */
@media (max-width: 600px) {
    svg {
        width: 40px;
        height: 40px;
    }

    label {
        padding: 3px;
    }
}



.dark-mode .profile {
    background-color: #333;
    color: white;
}

.dark-mode .profile-btn {
    color: #f1f1f1;
}

.dark-mode .profile h1 {
    color: #f1f1f1;
}

.dark-mode .profile-info p {
    color: #f1f1f1;
}

.dark-mode .profile-info strong {
    color: #007bff;
}




.add-article{
    align-content: center;
    text-align: center;
}

/* Marquee - Banderole */
.marqueee {
    background: linear-gradient(90deg, #F6F0F0 , #F6F0F0);
    color: #ffff;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 0.8rem;
    margin: 2rem auto;
    width: 100%;
    max-width: 200rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    z-index: 10;
    box-sizing: border-box;
    box-shadow: 0 0.4rem 0.6rem rgba(0, 0, 0, 0.1);
    border: 0.2rem solid ghostwhite;
}

.marqueee form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0;
}

.marqueee button {
    width: 100%;
    color: #fff;
    padding: 1rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1rem;
}

.marqueee button:hover {
    background-color: #0056b3;
}

.marqueee h2 {
    display: inline-block;
    animation: marquee 15s linear infinite;
    white-space: nowrap;
    line-height: 1.5;
    box-sizing: border-box;
    color: white;
}

@keyframes marqueee {
    0% {
        transform: translateX(130%);
    }
    100% {
        transform: translateX(-140%);
    }
}

.dark-mode .marqueee {
    background: linear-gradient(90deg, #002d62, #0056b3);
    border-color: #004b93;
}

.nommage {
    text-align: left;
    color: #4c4c4c
}

.dark-mode .nommage {
    color: #f1f1f1;
}