/* =========================================
   ADMIN ACTUALITÉS
   Bootstrap : positionnement et disposition
   CSS personnalisé : apparence
   ========================================= */

/* Titres des pages */

.adminpage h1 {
    font-family: "Merienda", cursive;
    font-size: 2rem;
    color: #333;
}

.adminpage > section > header > p {
    color: #666;
}

/* Cartes de la liste */

.actualite-card {
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 3px 12px rgb(0 0 0 / 6%);
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.actualite-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 18px rgb(0 0 0 / 12%);
}

/* Miniature */

.actualite-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.actualite-card-no-image {
    height: 180px;
    background-color: #f1f1f1;
    color: #777;
    font-size: 0.9rem;
}

/* Titre et date des cartes */

.actualite-card-title {
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.actualite-card-date {
    margin-bottom: 20px;
    color: #777;
    font-size: 0.85rem;
}

/* Actions des cartes */

.actualite-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.actualite-card-actions form {
    margin: 0;
}

.actualite-card-actions .btn {
    font-weight: 600;
}

/* Liste vide */

.actualite-empty-message {
    padding: 35px 15px;
    color: #777;
    font-size: 1.1rem;
}

/* Formulaires */

.actualite-form {
    padding: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 3px 12px rgb(0 0 0 / 5%);
}

.actualite-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #333;
}

.actualite-form .form-control {
    border-radius: 6px;
}

.actualite-form .form-control:focus {
    border-color: #7ca58a;
    box-shadow: 0 0 0 0.2rem rgb(124 165 138 / 20%);
}

/* Boutons des formulaires */

.actualite-form-actions .btn {
    margin: 5px;
    padding: 10px 22px;
}

/* Image actuelle dans le formulaire de modification */

.actualite-current-image {
    max-width: 100%;
    width: 350px;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgb(0 0 0 / 10%);
}

/* Page de consultation */

.actualite-detail {
    max-width: 900px;
    padding: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 3px 12px rgb(0 0 0 / 5%);
}

.actualite-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.actualite-detail-date {
    color: #777;
    font-size: 0.9rem;
}

.actualite-detail-image {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

.actualite-detail-content {
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* Alignement du contenu Quill */
.actualite-detail-content .ql-align-center {
    text-align: center;
}

.actualite-detail-content .ql-align-right {
    text-align: right;
}

.actualite-detail-content .ql-align-justify {
    text-align: justify;
}

/* Adaptation aux petits écrans */

@media (max-width: 576px) {
    .adminpage h1 {
        font-size: 1.5rem;
    }

    .actualite-form,
    .actualite-detail {
        padding: 18px;
    }

    .actualite-detail-title {
        font-size: 1.4rem;
    }

    .actualite-card-actions {
        gap: 6px;
    }
}

/* ==========================================
   ACTUALITÉS PUBLIQUES
   ========================================== */

/* Page de liste */

.actualites-page {
    max-width: 1200px;
    margin: 0 auto;
}

.actualites-header h1 {
    margin-bottom: 15px;
}

.actualites-header p {
    font-size: 1.1rem;
}

/* Cartes des actualités */

.actualite-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.actualite-card-image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.actualite-card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    padding: 20px;
}

.actualite-card-content h2 {
    font-size: 1.35rem;
    margin-bottom: 20px;
}

.actualite-date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.actualite-card-content .btn {
    margin-top: auto;
}

/* Page de détail */

.actualite-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.actualite-detail-header h1 {
    margin-bottom: 15px;
}

/* Image limitée en largeur et en hauteur */

.actualite-detail-image img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 500px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Contenu rédigé avec Quill */

.actualite-detail-content {
    max-width: 850px;
    margin: 30px auto 0;
    font-size: 1,1rem; 
    font-weight: 700;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.actualite-detail-content p {
    margin-bottom: 1rem;
}

.actualite-detail-content img {
    max-width: 100%;
    height: auto;
}

/* Alignements Quill */

.actualite-detail-content .ql-align-center {
    text-align: center;
}

.actualite-detail-content .ql-align-right {
    text-align: right;
}

.actualite-detail-content .ql-align-justify {
    text-align: justify;
}

/* Adaptation aux petits écrans */

@media (max-width: 576px) {
    .actualite-detail {
        padding-left: 15px;
        padding-right: 15px;
    }

    .actualite-detail-header h1 {
        font-size: 1.8rem;
    }

    .actualite-detail-image img {
        max-height: 350px;
    }

    .actualite-detail-content {
        font-size: 0.95rem;
    }
}
