/* ==================================================
Single Campagne Template Styles
================================================== */

/* Variables */
:root {
    --hr-primary: #dca54a;
    --hr-dark: #1c1c1c;
    --hr-grey: #666;
    --hr-light-grey: #f5f5f5;
    --hr-white: #ffffff;
    
    --hr-header-height: 89px;
    
    --hr-section-pad-y-lg: 60px;
    --hr-section-pad-y-md: 40px;

    --hr-gap-xxl: 64px;
    --hr-gap-xl: 48px;
    --hr-gap-lg: 32px;
    --hr-gap-md: 28px;
    --hr-gap-sm: 20px;
    --hr-gap-xs: 8px;
}

/* ==================================================
   FIX FUCKING ASTRA
   ================================================== */
.site-content .ast-container {
    display: block !important;
}

html{
    width: 100dvw;
    overflow-x: hidden;
}

/* to equalize line height between button and a */
button{
    line-height: var(--ast-body-line-height,1.65);
}


/* ==================================================
   Hero Section
   ================================================== */

.hr-section-fh {
    height: fit-content;
}
.hr-hero {
    background-color: var(--hr-light-grey);
    background-size: cover;
    background-repeat: no-repeat;
    backdrop-filter: blur(10px);
    padding: 40px 0;
    height: calc(100dvh - var(--hr-header-height));
}
.hr-hero > .container{
    height: 80%;
}
section.hr-hero > .container > .row {
    margin: auto 0px;
    height: 100%;
    gap: var(--hr-gap-sm);
    flex-wrap: nowrap;
}
section.hr-hero > .container > .row > div {
    margin: auto;
}

.overlay-blur{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: brightness(0.5) blur(8px);
    z-index: 1;
}
.hr-hero > .container{
    position: relative;
    z-index: 2;
}
.hr-hero__info, .hr-hero__info > * {
    color: white;
    margin-bottom: 0px;
}
.hr-hero_caption > *{
    margin-bottom: 0px !important;
    line-height: 1;
}
.hr-hero_caption{
    display: flex;
    flex-direction: column;
    gap: var(--hr-gap-xs);
}

/* Badge brouillon */
.hr-badge-draft {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    color: var(--hr-grey);
    margin-left: 12px;
    vertical-align: middle;
}
.hr-hero__info{
    display: flex;
    gap: var(--hr-gap-sm);
    flex-direction: column;
}
.hr-hero__banniere {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
}



.hr-hero__banniere img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hr-hero__banniere-placeholder {
    width: 100%;
    height: 100%;
    background-color: #ddd;
}

#amount-vs-delay-wrapper{
    display: flex;
    flex-direction: row;
    gap: var(--hr-gap-sm);
    flex-wrap: wrap;
}

.hr-hero__info, .hr-hero__info * {
    color: white !important;
}

.hr-hero__amount {
    line-height: normal;
    font-size: 48px;
    font-weight: 700;
    color: var(--hr-dark);
}

.hr-hero__progressbar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hr-hero__milestone {
    background-color: var(--hr-white);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #ddd;
}

.hr-hero__milestone-label {
    font-weight: 500;
}


.hr-hero__days {
    font-size: 24px;
    font-weight: 600;
    color: var(--hr-dark);
}

.hr-hero__deadline {
    font-size: 14px;
    color: var(--hr-grey);
}

.hr-hero__btn-more {
    background-color: var(--hr-primary);
    color: var(--hr-white);
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    width: fit-content;
}

.hr-hero__btn-more:hover {
    opacity: 0.9;
}

.hr-hero__draft-notice {
    font-size: 15px;
    font-weight: 600;
    color: var(--hr-white);
    opacity: 0.75;
    margin: 0;
    font-style: italic;
}

/* Progress Bar */
.hr-progressbar {
    margin: var(--hr-gap-xxl) 0 calc(2 *var(--hr-gap-xxl));
}

.hr-progressbar__track {
    position: relative;
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 40px;
}

.hr-progressbar__fill {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--progress-fill);
    height: 100%;
    background-color: var(--hr-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.hr-progressbar__milestone {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hr-progressbar__milestone-marker {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 50%;
    background-color: var(--hr-white);
    border: 3px solid rgba(0, 0, 0, .6);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    box-sizing: border-box;
}

.hr-progressbar__milestone--reached .hr-progressbar__milestone-marker {
    border-color: #c7881b;
}

.hr-progressbar__milestone-label {

    transform: rotate(65deg) translate(50%, -50%);
    transform-origin: top;

    position: absolute;
    top: 28px;
    font-size: 12px;
    color: var(--hr-dark);
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hr-progressbar__milestone-value {
    position: absolute;
    bottom: 28px;
    font-size: 11px;
    color: var(--hr-grey);
    white-space: nowrap;
}

/* ==================================================
   Sections communes
   ================================================== */

.hr-section {
    padding: var(--hr-section-pad-y-lg) 0;
}

h2.hr-section__title {
    font-size: 32px;
    font-weight: 700;
    color: var(--hr-dark);
    margin-bottom: var(--hr-section-pad-y-lg) !important;
    text-align: center;
}

/* ==================================================
   Vidéo + Résumé Section
   ================================================== */

.hr-video-resume {
    background-color: var(--hr-white);
}

.hr-video {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.hr-video iframe {
    width: 100%;
    height: 100%;
}

.hr-resume {
    padding: 0px 20px;
}

.hr-resume__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--hr-dark);
    margin-bottom: 20px;
}

.hr-resume__content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--hr-grey);
    overflow: hidden auto;
    height: fit-content;
    max-height: 70dvh;
}

/* ==================================================
   Images Grid + Tabs Section
   ================================================== */

.hr-content {
    background-color: var(--hr-light-grey);
}

/* Images Flex Layout */
.hr-images-flex {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: auto;
    height: 100%;
    max-width: 500px;
}

.hr-images-flex__item {
    flex-shrink: 0;
}

.hr-images-flex__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Countdown Big */
.hr-countdown-big {
    margin-bottom: 32px;
}
.hr-countdown-big > * {
    text-align: right;
}

.hr-countdown-big__days {
    font-size: 36px;
    font-weight: 700;
    color: var(--hr-dark);
    margin-bottom: 8px;
}

.hr-countdown-big__deadline {
    font-size: 28px;
    color: var(--hr-grey);
    line-height: 1.6;
}

/* ==================================================
   Extraits Navigation & Biographie
   ================================================== */

.hr-extraits-nav {
    display: flex;
    justify-content: center;
    gap: var(--hr-gap-xxl);
    margin-bottom: 48px;
    padding-bottom: 16px;
}

.hr-extraits-nav__link {
    font-size: 16px;
    font-weight: 500;
    color: var(--hr-grey);
    text-decoration: none;
    padding-bottom: 8px;
    border-bottom: 2px solid transparent;
    margin-bottom: -18px;
    transition: all 0.3s;
}

.hr-extraits-nav__link:hover {
    color: var(--hr-dark);
}

.hr-extraits-nav__link--active {
    color: var(--hr-primary);
    border-bottom-color: var(--hr-primary);
}

.hr-extrait-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--hr-dark);
    margin-bottom: 24px;
}

.hr-extrait-content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--hr-grey);
    overflow: hidden auto;
    /* height: clamp(60dvh, 500px, 70dvh); */
    height: fit-content;
    max-height: 70dvh;
    padding: 0 20px;
}

.hr-extraits-actions {
    display: flex;
    gap: var(--hr-gap-sm);
    margin-top: var(--hr-gap-xl);
    justify-content: center;
}

.hr-btn {
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    text-decoration: none;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hr-btn:hover {
    opacity: 0.9;
}

.hr-btn--primary {
    background-color: var(--hr-primary);
    color: var(--hr-white);
}

.hr-btn--secondary {
    background-color: transparent;
    color: var(--hr-dark);
    border: 2px solid var(--hr-dark);
}


.hr-btn__icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==================================================
   Avis Section
   ================================================== */

.hr-avis {
    background-color: var(--hr-white);
}

.hr-avis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.hr-avis-card {
    background-color: var(--hr-light-grey);
    padding: 24px;
    border-radius: 8px;
}

.hr-avis-card__name {
    font-size: 18px;
    font-weight: 700;
    color: var(--hr-dark);
    margin-bottom: 12px;
}

.hr-avis-card__content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hr-grey);
}

/* ==================================================
   Contreparties Section
   ================================================== */

.hr-contreparties {
    background-color: var(--hr-light-grey);
}

.hr-contreparties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--hr-gap-sm);
}

.hr-contrepartie-card {
    background-color: var(--hr-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.hr-contrepartie-card:hover {
    transform: translateY(-4px);
}

.hr-contrepartie-card__image {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.hr-contrepartie-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hr-contrepartie-card__image--placeholder {
    background-color: #ddd;
}

.hr-contrepartie-card__info {
    padding: 20px;
}

.hr-contrepartie-card__price {
    font-size: 18px;
    color: var(--hr-grey);
    margin-bottom: 8px;
}

.hr-contrepartie-card__title {
    font-size: 18px;
    word-break: break-word;
    font-weight: 700;
    color: var(--hr-dark);
    margin-bottom: 12px;
}

.hr-contrepartie-card__description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--hr-grey);
}

/* ==================================================
   Responsive
   ================================================== */

@media (min-width: 991px) {
    .hr-contrepartie-card, .hr-avis-card {
        max-width: 500px;
    }
}
@media (max-width: 991px) {
    .hr-contrepartie-card, .hr-avis-card {
        max-width: 50dvw;
    }
    section.hr-hero > .container > .row {
        flex-wrap: wrap;
    }

    .hr-hero__amount {
        font-size: 36px;
    }

    .hr-section h2.hr-section__title {
        font-size: 28px;
        margin-bottom: var(--hr-section-pad-y-md)  !important;
    }

    section.hr-section.hr-video-resume.hr-section-fh .row {
        row-gap: var(--hr-gap-lg);
    }

    .hr-images-flex {
        margin-bottom: 24px;
    }

    .hr-countdown-big__days {
        font-size: 28px;
    }

    .hr-extraits-nav {
        overflow-x: unset;
        flex-wrap: nowrap;
        gap: var(--hr-gap-xxl);
    }

    .hr-extrait-title {
        font-size: 28px;
    }
    .hr-contribuer__goodies{
        border: none;
    }

    .hr-resume{
        padding: 0px;
    }

}

@media (orientation: portrait) {
    /* Progress bar verticale en mode portrait */
    .hr-progressbar {
        --hr-milestone-value-width: 50px;
        --hr-milestone-gap: 12px;
        --hr-milestone-marker-width: 16px;
        --hr-marker-border: 3px;
        --hr-progressbar-margin-left: 70px;
        --hr-milestone-offset: calc(-1 * (var(--hr-milestone-value-width) + var(--hr-milestone-gap) + (var(--hr-milestone-marker-width) / 2)) + var(--hr-marker-border));
        --hr-milestone-label-max-width: calc(100dvw - var(--hr-progressbar-margin-left) - 30px);

        display: flex;
        margin: var(--hr-gap-xxl) 0;
        padding-left: 0;
    }

    .hr-progressbar__track {
        width: 8px;
        height: 400px;
        margin-bottom: 0;
        margin-left: var(--hr-progressbar-margin-left);
        position: relative;
    }

    .hr-progressbar__fill {
        width: 100%;
        height: var(--progress-fill);
        top: auto;
        bottom: 0;
        transition: height 0.3s ease;
    }

    .hr-progressbar__milestone {
        left: auto !important;
        right: auto;
        top: auto;
        transform: translateY(50%) translateX(var(--hr-milestone-offset));
        flex-direction: row;
        align-items: center;
        gap: var(--hr-milestone-gap);
    }

    .hr-progressbar__milestone-marker {
        order: 1;
        flex-shrink: 0;
    }

    .hr-progressbar__milestone-label {
        transform: none;
        transform-origin: unset;
        position: static;
        order: 2;
        margin-left: 0;
        text-align: left;
        max-width: var(--hr-milestone-label-max-width);
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-wrap: break-word;
    }

    .hr-progressbar__milestone-value {
        position: static;
        order: 0;
        margin-right: 0;
        width: var(--hr-milestone-value-width);
        text-align: right;
        flex-shrink: 0;
    }
}

@media (orientation: landscape) {
    .hr-progressbar__milestone-marker {
        transform: translateY(-50%);
    }
}

@media (max-width: 576px) {
    :root{
        /* vu qu'on est en colonne et en flex c'est difficile d'ajuster 
        la position sur Y du contenu de la hero section.
        J'opte pour un usage de margin-top sur les 2 colonne. */
        --decallage-mobile-hero-section-content: 20%;
    }
    /* FIRST SECTION */
    button.hr-hero__btn-more {
        order: 2;
    }
    .hr-hero {
        padding: 24px 0;        
    }
    
    div#amount-vs-delay-wrapper {
        order: 3;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
        margin-top: auto;
    }
    .hr-hero__days {font-size: 20px;}
    .hr-hero__deadline {
        display: none;
    }
    .hr-hero__amount, .hr-hero__countdown * {
        font-size: 20px;
    }

    .hr-hero__info {
        height: 100%;
    }

    section.hr-hero row, .hr-hero .container {
        height: 100%;
        width: 100%;
        position: relative;
        top: 0;
        left: 0;
        margin: 0 !important;
        padding: 0 !important;
    }

    section.hr-hero > .container > .row > div:nth-child(1) {
        /* margin: var(--decallage-mobile-hero-section-content) auto 0; */
        margin: 0 auto 0;
    }

    section.hr-hero > .container > .row > div:nth-child(2) {
        margin: calc(var(--decallage-mobile-hero-section-content) * -1) auto 0;
    }

    /* END FIRST SECTION */
    .hr-section {
        padding: var(--hr-section-pad-y-md) 0;
    }

    .hr-section__title {
        font-size: 24px;
        margin-bottom: var(--hr-section-pad-y-md)  !important;
    }

    .hr-countdown-big__days {
        font-size: 24px;
    }

    .hr-extraits-nav {
        gap: 16px;
    }

    .hr-extrait-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .hr-extrait-content {
        padding: 0 5px;
    }

    .hr-extraits-actions {
        flex-direction: column;
    }

    .hr-contreparties-grid,
    .hr-avis-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hr-contreparties-grid{
        gap: var(--hr-gap-xs);
    }

    .hr-contribuer__goodies{
        border:unset;
    }
    .hr-section-fh{
        height: auto;
    }
    .hr-extrait-content{
        width: 85%;
    }

    
}
/* target fixe colonnes*/
@media (min-width: 567px) and (max-width: 767px) {
    .hr-contreparties-grid, .hr-avis-grid {
        grid-template-columns: 1fr 1fr;
    }
}