/* ***********************************************************************************************************|
                                                 PAGE ARTICLE                                                   |
   Reprise du modèle fourni : image, titre, méta, contenu, tags et partage, navigation,                       |
   formulaire « question », barre latérale.                                                                   |
   Couleurs du site : --primary-color (orange #fd6f02), --second-color (bleu #022659).                         |
   Bannière, CTA, alertes de formulaire : interne.css       Responsive : responsive-actualite.css             |
**************************************************************************************************************/


/* ***********************************************************************************************************|
                                                   utilitaires                                                |
**************************************************************************************************************/
.texte-masque {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bi-titre .title-color1 {
    color: var(--primary-color);
}


/* ***********************************************************************************************************|
                                                   corps de page                                              |
**************************************************************************************************************/
.page-body {
    padding: 70px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-body .container {
    position: relative;
    z-index: 1;
    padding: 0 15px;
}

.layout {
    display: flex;
    gap: 44px;
    align-items: start;
}

article.item-article-left {
    position: relative;
    width: calc(100% - 384px);
}

.sidebar-article {
    position: relative;
    width: 340px;
}

.wrap-sidebar-actualites {
    position: sticky;
    top: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.article-introuvable {
    padding: 40px;
    border: 2px dashed #e1e5ec;
    border-radius: 16px;
    text-align: center;
}

.article-introuvable p {
    max-width: 56ch;
    margin: 0 auto 24px;
    font-size: 16.5px;
    line-height: 1.7;
    color: var(--texte-doux);
}

.article-introuvable .primary-btn {
    display: inline-flex;
}


/* ***********************************************************************************************************|
                                                   formes décoratives                                         |
**************************************************************************************************************/
.shape-form {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.shape-form.shape-1 {
    border: 1px solid #e5e5e5;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    top: -133px;
    left: -133px;
}

.shape-form.shape-2 {
    border: 1px solid #e5e5e5;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    right: -133px;
    bottom: -133px;
}

.shape-form.shape-3 {
    left: 50%;
    top: 51%;
    animation: spin 15s normal infinite linear;
}

.shape-form.shape-4 {
    right: 2px;
    top: 33%;
    animation: float-bob-y 2s normal infinite linear;
}

.shape-form.shape-5 {
    right: 0;
    bottom: 0;
    animation: float-bob-x 2s normal infinite linear;
}

.actualites-shape-1,
.actualites-shape-2 {
    position: absolute;
    width: auto;
    z-index: 0;
    pointer-events: none;
}

.actualites-shape-2 {
    right: 0;
    top: -170px;
}

.actualites-shape-1 {
    bottom: -46px;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes float-bob-y {
    0% {
        transform: translateY(-20px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(-20px);
    }
}

@keyframes float-bob-x {
    0% {
        transform: translateX(-30px);
    }
    50% {
        transform: translateX(-10px);
    }
    100% {
        transform: translateX(-30px);
    }
}


/* ***********************************************************************************************************|
                                                   image et titre                                             |
**************************************************************************************************************/
.article-img {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 10.5;
    margin-bottom: 28px;
    background: linear-gradient(135deg, #e8ebf2, #d7dce8);
    height: 400px;
    width: 100%;
}

.article-img img,
.ir-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 2s ease;
    transform: scale(1);
}

.article-img:hover img,
.ir-img:hover img {
    transform: scale(1.05);
}

/* Reflet lumineux au survol */
.article-img::after,
.article-img::before,
.ir-img::after,
.ir-img::before {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 1;
    z-index: 3;
    transform: rotate(5deg);
}

.article-img::before,
.ir-img::before {
    top: -10%;
    right: 51%;
    bottom: -10%;
    left: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.article-img:hover::before,
.ir-img:hover::before {
    left: 0;
    right: 0;
    opacity: 0;
    transition: all 900ms linear;
}

.article-img::after,
.ir-img::after {
    top: 50%;
    right: -10%;
    bottom: 50%;
    left: -10%;
    background: rgba(255, 255, 255, 0.6);
}

.article-img:hover::after,
.ir-img:hover::after {
    top: 0;
    bottom: 0;
    opacity: 0;
    transition: all 900ms linear;
}

.article-title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 14px;
    color: var(--second-color);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 22px;
    font-size: 14px;
    color: var(--texte-doux);
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.article-meta i {
    color: var(--primary-color);
}


/* ***********************************************************************************************************|
                                                   contenu                                                    |
   Le texte des articles vient de data-actualites.php : h2, p, ul, tableau, encadré « À retenir ».          |
**************************************************************************************************************/
.article-body {
    color: var(--texte);
}

.article-body p {
    font-size: 16px;
    line-height: 1.75;
    color: var(--texte-doux);
    margin-bottom: 18px;
}

.article-body .article-chapo {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.65;
    color: var(--second-color);
}

.article-body h2,
.article-body h3 {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--second-color);
    margin: 34px 0 14px;
    scroll-margin-top: 30px;
}

.article-body h3 {
    font-size: 19px;
}

.article-body strong {
    color: var(--second-color);
}

.article-body ul,
.fast-list {
    margin-bottom: 18px;
}

.article-body ul li,
.fast-list li {
    position: relative;
    padding-left: 20px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--texte-doux);
    margin-bottom: 8px;
}

.article-body ul li::before,
.fast-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-color);
}

/* ---------- tableau ---------- */
.article-body .art-tableau {
    margin: 10px 0 26px;
    border: 1px solid #e5e8ee;
    border-radius: 12px;
    overflow-x: auto;
}

.article-body table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 15px;
}

.article-body thead th {
    padding: 14px 16px;
    background: var(--second-color);
    color: #fff;
    font-weight: 700;
    text-align: left;
}

.article-body tbody th,
.article-body tbody td {
    padding: 13px 16px;
    border-top: 1px solid #e5e8ee;
    text-align: left;
    vertical-align: top;
    color: var(--texte-doux);
}

.article-body tbody th {
    font-weight: 700;
    color: var(--second-color);
    white-space: nowrap;
}

.article-body tbody tr:nth-child(even) {
    background: #f7f8fa;
}

/* ---------- encadré « À retenir » ---------- */
.article-body .art-retenir {
    margin: 30px 0;
    padding: 22px 26px;
    border: 2px dashed var(--primary-color);
    border-left: 6px solid var(--primary-color);
    border-radius: 12px;
    background: #fff7f0;
}

.article-body .art-retenir strong {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary-color);
}

.article-body .art-retenir p {
    margin-bottom: 0;
    color: var(--second-color);
    font-weight: 600;
}

/* ---------- photos (facultatif) ---------- */
.img-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 35px 0 30px;
}

.img-row .ir-img {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8ebf2, #d7dce8);
    height: 230px;
    width: 100%;
}


/* ***********************************************************************************************************|
                                                   tags et partage                                            |
**************************************************************************************************************/
.tags-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 18px 26px;
    margin: 34px 0;
}

.tags-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 700;
    color: var(--second-color);
}

.tag-pill {
    background: rgba(253, 111, 2, .1);
    border-radius: 20px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-color);
}

.tag-pill:hover {
    background: var(--primary-color);
    color: #fff;
}

.share-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--second-color);
}

.share-wrap .soc {
    width: 32px;
    height: 32px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.share-wrap .soc:hover {
    background-color: #fff;
    color: var(--primary-color);
}


/* ***********************************************************************************************************|
                                                   article précédent / suivant                                |
**************************************************************************************************************/
.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 44px;
}

.post-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--second-color);
}

.post-nav a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.post-nav small {
    display: block;
    margin-bottom: 2px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--texte-doux);
}

.post-nav a.next {
    justify-content: flex-end;
    text-align: right;
}

.post-nav i {
    color: var(--primary-color);
}


/* ***********************************************************************************************************|
                                                   formulaire « question »                                    |
**************************************************************************************************************/
.section-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--second-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.section-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.comment-form {
    margin-top: 26px;
    scroll-margin-top: 30px;
}

.cf-note {
    font-size: 14px;
    line-height: 1.6;
    color: var(--texte-doux);
    margin-bottom: 20px;
}

.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.cf-row input,
.comment-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--texte);
    background: #f7f8fa;
    transition: border-color .3s;
}

.cf-row input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    background: #fff;
}

.cf-row input[aria-invalid="true"],
.comment-form textarea[aria-invalid="true"] {
    border-color: #c62828;
}

.comment-form textarea {
    display: block;
    margin-bottom: 18px;
    min-height: 140px;
    resize: vertical;
}

.comment-form .champ-erreur {
    margin: 6px 0 12px;
}

.cf-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--texte-doux);
    margin-bottom: 22px;
    cursor: pointer;
}

.cf-checkbox input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--primary-color);
}

.comment-form .primary-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.comment-form .form-alerte--ok {
    border-left-color: #2fbf71;
    background: #eaf8f0;
}


/* ***********************************************************************************************************|
                                                   barre latérale                                             |
**************************************************************************************************************/
.widget {
    padding: 28px 26px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    box-shadow: 0 0 15px #0000001a;
}

.widget h3 {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 12px;
    font-size: 19px;
    font-weight: 800;
    color: var(--second-color);
}

.widget h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    border-radius: 3px;
    background: var(--primary-color);
}

/* ---------- recherche ---------- */
.search-box {
    display: flex;
    align-items: center;
    height: 52px;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    background: #f7f8fa;
    overflow: hidden;
    transition: border-color .3s;
}

.search-box:focus-within {
    border-color: var(--primary-color);
}

.search-box input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 18px;
    font-size: 14.5px;
    color: var(--texte);
}

.search-box input::placeholder {
    color: #8a93a3;
}

.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-right: 3px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: background-color .3s;
}

.search-box button:hover {
    background: var(--second-color);
}

/* ---------- dans cet article ---------- */
.sommaire-list {
    counter-reset: etape;
}

.sommaire-list li {
    counter-increment: etape;
}

.sommaire-list li:not(:last-child) {
    border-bottom: 1px dashed #e5e5e5;
}

.sommaire-list a {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--second-color);
}

.sommaire-list a::before {
    content: counter(etape, decimal-leading-zero);
    flex-shrink: 0;
    font-weight: 800;
    color: var(--primary-color);
}

.sommaire-list a:hover,
.sommaire-list a.est-visible {
    color: var(--primary-color);
}

/* ---------- catégories ---------- */
.cat-list li:not(:last-child) {
    border-bottom: 1px dashed #e5e5e5;
}

.cat-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    font-size: 15.5px;
    font-weight: 600;
    color: var(--second-color);
}

.cat-list a:hover,
.cat-list a.active {
    color: var(--primary-color);
}

.cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 26px;
    padding: 0 8px;
    border-radius: 20px;
    background: #f1f3f7;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--texte-doux);
    transition: .3s;
}

.cat-list a:hover .cat-count,
.cat-list a.active .cat-count {
    background: var(--primary-color);
    color: #fff;
}

/* ---------- actualités récentes ---------- */
.rn-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.rn-item:not(:last-child) {
    border-bottom: 1px dashed #e5e5e5;
}

.rn-item:nth-child(2) {
    padding-top: 0;
}

.rn-thumb {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 12px;
    background: #eef1f6;
    overflow: hidden;
}

.rn-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.rn-item:hover .rn-thumb img {
    transform: scale(1.08);
}

.rn-title {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--second-color);
    margin-bottom: 4px;
    transition: color .3s;
}

.rn-item:hover .rn-title {
    color: var(--primary-color);
}

.rn-date {
    font-size: 12.5px;
    color: var(--texte-doux);
}

/* ---------- galerie photos ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.g-thumb {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: 10px;
    background: #eef1f6;
    overflow: hidden;
}

.g-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}

.g-thumb::after {
    content: "\f00e";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    background: rgba(2, 38, 89, .65);
    opacity: 0;
    transition: opacity .3s;
}

.g-thumb:hover img {
    transform: scale(1.1);
}

.g-thumb:hover::after {
    opacity: 1;
}


/* ***********************************************************************************************************|
                                                   mouvements réduits                                         |
**************************************************************************************************************/
@media (prefers-reduced-motion: reduce) {

    .shape-form {
        animation: none !important;
    }

    .article-img img,
    .ir-img img,
    .article-img::before,
    .article-img::after,
    .ir-img::before,
    .ir-img::after {
        transition: none !important;
    }

}

/* Photos de l'article (module Actualités) : légende sur l'image ; documents à télécharger */
.img-row .ir-img { margin: 0; }
.img-row .ir-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-row .ir-img figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(2, 38, 89, .85)); }
@media (max-width: 575px) { .img-row { grid-template-columns: 1fr; } }
.article-documents { margin: 30px 0; }
.fp-documents { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.fp-documents a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid #e3e7ef; border-radius: 12px; background: #fff; text-decoration: none; color: inherit; }
.fp-documents a:hover, .fp-documents a:focus-visible { border-color: #fd6f02; }
.fp-doc-icone { width: 44px; height: 44px; border-radius: 10px; background: #fff1e4; color: #c25300; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.fp-doc-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-doc-texte strong { color: #022659; overflow-wrap: anywhere; }
.fp-doc-texte small { color: #5a6679; font-size: 13px; }
.fp-doc-action { font-weight: 700; font-size: 13px; color: #fd6f02; white-space: nowrap; }
