/**********************************************************************
 * Portail DGDT — feuille de style du front office
 * Base : template ChariTeam (HTML Codex), adapté aux couleurs DGDT.
 * Les couleurs Bootstrap (primary / secondary / dark) sont déjà
 * recompilées dans bootstrap.min.css ; les variables ci-dessous servent
 * aux composants propres au portail.
 **********************************************************************/
:root {
    --primary: #0E7C41;
    --primary-dark: #0A5F31;
    --secondary: #E5F2EB;
    --light: #F6F8F7;
    --dark: #052619;
    --gold: #F2B705;
    --flag-red: #EF2B2D;
    --flag-green: #009E49;
    --overlay: rgba(5, 38, 25, .82);
}

body {
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--primary);
    color: #fff;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100000;
    padding: .75rem 1.25rem;
    background: var(--gold);
    color: var(--dark);
    font-weight: 600;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-outline-primary:hover {
    color: #FFFFFF;
}

.btn.btn-primary:hover {
    color: var(--primary);
    background: transparent;
}

.btn.btn-gold {
    color: var(--dark);
    background: var(--gold);
    border-color: var(--gold);
}

.btn.btn-gold:hover {
    color: var(--gold);
    background: transparent;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Bande aux couleurs nationales ***/
.flag-stripe {
    height: 4px;
    background: linear-gradient(90deg, var(--flag-red) 0 46%, var(--gold) 46% 54%, var(--flag-green) 54% 100%);
}


/*** Navbar ***/
.fixed-top {
    transition: .5s;
}

.top-bar {
    height: 45px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.top-bar a:hover {
    color: #fff !important;
}

.navbar-brand .brand-mark {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.navbar-brand .brand-text {
    line-height: 1.1;
}

.navbar-brand .brand-sigle {
    font-family: 'Saira', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    letter-spacing: .04em;
    color: #fff;
}

.navbar-brand .brand-sigle span {
    color: var(--gold);
}

.navbar-brand .brand-nom {
    display: block;
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .65);
    max-width: 210px;
    white-space: normal;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 26px;
    padding: 25px 0;
    color: #FFFFFF;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--gold);
}

.navbar .dropdown-item.active,
.navbar .dropdown-item:active {
    background: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, .07);
        background: var(--dark);
    }

    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }

    .navbar-collapse .nav-actions {
        padding: 0 1.5rem 1.5rem;
        background: var(--dark);
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu,
    .navbar .nav-item:focus-within .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--overlay);
    z-index: 1;
}

.carousel-caption .hero-kicker {
    display: inline-block;
    padding: .35rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(242, 183, 5, .6);
    border-radius: 50rem;
    color: var(--gold);
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .03em;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--dark);
    border: 12px solid var(--dark);
    border-radius: 3rem;
}

#header-carousel .carousel-item img {
    max-height: 860px;
    object-fit: cover;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 520px;
    }

    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    padding-top: 12rem;
    padding-bottom: 6rem;
    background: linear-gradient(var(--overlay), var(--overlay)), url(../img/page-header.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: #999999;
}

.page-header .page-header-lead {
    max-width: 720px;
    margin: 0 auto 1.5rem;
    color: rgba(255, 255, 255, .7);
}


/*** Accès rapides (sous le carrousel) ***/
.quick-access {
    position: relative;
    margin-top: -90px;
    z-index: 2;
}

.quick-access .quick-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    height: 100%;
    padding: 1.75rem 1.5rem;
    background: #fff;
    border-bottom: 4px solid transparent;
    box-shadow: 0 10px 45px rgba(5, 38, 25, .10);
    color: var(--bs-body-color);
    transition: .4s;
}

.quick-access .quick-item:hover {
    border-bottom-color: var(--gold);
    transform: translateY(-6px);
}

.quick-access .quick-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.35rem;
    transition: .4s;
}

.quick-access .quick-item:hover .quick-icon {
    background: var(--primary);
    color: #fff;
}

.quick-access h5 {
    margin-bottom: .35rem;
}

.quick-access p {
    margin: 0;
    font-size: .92rem;
}


/*** Procédures (ex « causes ») ***/
.causes-item {
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.causes-item .causes-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.causes-item .causes-facts li {
    display: flex;
    gap: .6rem;
    padding: .45rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, .08);
    font-size: .92rem;
}

.causes-item .causes-facts li:last-child {
    border-bottom: 0;
}

.causes-item .causes-facts i {
    color: var(--primary);
    margin-top: .2rem;
}

.causes-item .causes-overlay {
    position: absolute;
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    overflow: hidden;
    opacity: 0;
    transition: .5s;
}

.causes-item:hover .causes-overlay,
.causes-item:focus-within .causes-overlay {
    height: 100%;
    opacity: 1;
}

.causes-item .causes-overlay .btn {
    background: #fff;
}

.causes-item .causes-overlay .btn:hover {
    background: var(--primary);
}


/*** Étapes (ex « service ») ***/
.service-item {
    position: relative;
    box-shadow: 0 0 45px rgba(0, 0, 0, .06);
    transition: .4s;
}

.service-item:hover {
    transform: translateY(-6px);
}

.service-item .step-number {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-family: 'Saira', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--secondary);
}

.service-item .step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    font-size: 2rem;
    transition: .4s;
}

.service-item:hover .step-icon {
    background: var(--primary);
    color: #fff;
}


/*** Bandeau suivi (ex « donate ») ***/
.donate {
    background: var(--overlay);
}

.donate .form-floating > label {
    color: #6c757d;
}


/*** Actualités ***/
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 45px rgba(0, 0, 0, .06);
    transition: .4s;
}

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

.news-card .news-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.news-card .news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s;
}

.news-card:hover .news-img img {
    transform: scale(1.06);
}

.news-card .news-date {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: .4rem .9rem;
    background: var(--primary);
    color: #fff;
    font-size: .85rem;
}

.news-card .news-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.5rem;
}

.news-card h5 a {
    color: var(--dark);
}

.news-card h5 a:hover {
    color: var(--primary);
}

.news-carousel .owl-stage {
    display: flex;
}

.news-carousel .owl-item {
    display: flex;
    padding: 20px 6px 30px;
}

.news-carousel .owl-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.news-carousel .owl-nav .owl-prev,
.news-carousel .owl-nav .owl-next {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.25rem;
    transition: .4s;
}

.news-carousel .owl-nav .owl-prev:hover,
.news-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    color: #fff;
}

.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-cover {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
}


/*** FAQ ***/
.faq-accordion .accordion-item {
    border: 0;
    margin-bottom: 1rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, .05);
}

.faq-accordion .accordion-button {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--dark);
    background: #fff;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--primary);
    background: var(--secondary);
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 .2rem rgba(14, 124, 65, .2);
}

.faq-accordion .accordion-body {
    padding: 1.25rem 1.5rem 1.5rem;
}


/*** Pages procédure ***/
.procedure-nav {
    position: sticky;
    top: 110px;
}

.check-list {
    list-style: none;
    padding: 0;
}

.check-list li {
    position: relative;
    padding: .65rem 0 .65rem 2.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.check-list li:last-child {
    border-bottom: 0;
}

.check-list li::before {
    position: absolute;
    left: 0;
    top: .7rem;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: .7rem;
}

.check-list.check-list-numbered {
    counter-reset: piece;
}

.check-list.check-list-numbered li::before {
    counter-increment: piece;
    content: counter(piece);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .75rem;
}

.timeline {
    position: relative;
    padding-left: 2.5rem;
}

.timeline::before {
    position: absolute;
    left: .95rem;
    top: .5rem;
    bottom: .5rem;
    width: 2px;
    background: var(--secondary);
    content: "";
}

.timeline-item {
    position: relative;
    padding-bottom: 1.75rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item .timeline-dot {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: .8rem;
    box-shadow: 0 0 0 4px #fff;
}

.timeline-item.is-pending .timeline-dot {
    background: #fff;
    border: 2px solid var(--secondary);
    color: #adb5bd;
}

.info-box {
    padding: 1.5rem;
    border-left: 4px solid var(--gold);
    background: #fffaf0;
}

.cta-box {
    padding: 2rem;
    background: var(--dark);
    color: rgba(255, 255, 255, .7);
}

.cta-box h4,
.cta-box h5 {
    color: #fff;
}


/*** Formulaires ***/
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(14, 124, 65, .15);
}

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.contact-info-item:last-child {
    border-bottom: 0;
}

.contact-info-item .icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
}


/*** Suivi ***/
.suivi-card {
    padding: 2.5rem;
    background: #fff;
    box-shadow: 0 10px 45px rgba(5, 38, 25, .08);
}

.suivi-empty {
    padding: 2rem;
    text-align: center;
    background: var(--light);
}

.suivi-empty i {
    font-size: 2.5rem;
    color: #adb5bd;
}


/*** Cadre juridique / missions ***/
.mission-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    height: 100%;
    background: #fff;
    box-shadow: 0 0 45px rgba(0, 0, 0, .05);
}

.mission-item .icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 1.3rem;
}

.law-item {
    padding: 1.5rem;
    height: 100%;
    background: var(--light);
    border-top: 4px solid var(--primary);
}

.law-item .law-ref {
    font-family: 'Saira', sans-serif;
    font-weight: 600;
    color: var(--primary);
}


/*** Footer ***/
.footer .brand-sigle {
    font-family: 'Saira', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: #fff;
    letter-spacing: .04em;
}

.footer .brand-sigle span {
    color: var(--gold);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,0.5);
    font-weight: normal;
    text-transform: none;
    text-decoration: none;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: rgba(255,255,255,0.5);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--light);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .btn.btn-square {
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.5);
}

.footer .btn.btn-square:hover {
    color: var(--secondary);
    border-color: var(--light);
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--secondary);
}

.footer .copyright a:hover {
    color: var(--gold);
}

/*** Pagination ***/
.pagination .page-link {
    color: var(--primary);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/*** Accessibilité : réduire les animations si demandé ***/
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

.page-header .breadcrumb-item.active {
    color: var(--gold) !important;
}

/*** Ajustements mobile du carrousel d'accueil ***/
@media (max-width: 767.98px) {
    #header-carousel .carousel-item {
        min-height: 640px;
    }

    #header-carousel .carousel-caption {
        padding-top: 90px;
        padding-bottom: 1.5rem;
    }

    #header-carousel .display-4 {
        font-size: 1.9rem;
    }

    #header-carousel .fs-5 {
        font-size: 1rem !important;
        margin-bottom: 1.75rem !important;
    }

    #header-carousel .carousel-control-prev,
    #header-carousel .carousel-control-next {
        display: none;
    }

    .quick-access {
        margin-top: 0;
    }

    .page-header {
        padding-top: 9rem;
        padding-bottom: 4rem;
    }

    .page-header .display-4 {
        font-size: 2rem;
    }
}

/* Le bouton « retour en haut » est masqué tant que l'on n'a pas défilé */
.btn.back-to-top {
    display: none;
}
