/**
 * GF Diagnostic Form — CSS fonctionnel (prototype)
 *
 * Gère uniquement la visibilité, les transitions fade et le layout minimal.
 * L'apparence visuelle sera finalisée séparément.
 *
 * @package GF_Diagnostic_Form
 */

/* =========================================================================
 * Transitions — fade-out / fade-in
 * ====================================================================== */

.gf-diagnostic-form__question,
.gf-diagnostic-form__content,
.gf-diagnostic-form__video,
.gf-diagnostic-form__answers {
    opacity: 1;
    transition: opacity 250ms ease;
}

.gf-diagnostic-form__question.is-fading-out,
.gf-diagnostic-form__content.is-fading-out,
.gf-diagnostic-form__video.is-fading-out,
.gf-diagnostic-form__answers.is-fading-out {
    opacity: 0;
}

.gf-diagnostic-form__question.is-before-fade-in,
.gf-diagnostic-form__content.is-before-fade-in,
.gf-diagnostic-form__video.is-before-fade-in,
.gf-diagnostic-form__answers.is-before-fade-in {
    opacity: 0;
    transition: none;
}

.gf-diagnostic-form__content {
    border: 10px solid #F7F7F7;
    padding: 16px;
}
@media (min-width: 1130px) {
    .gf-diagnostic-form__content {
        border-width: 20px;
        padding: 32px;
    }
}

/* =========================================================================
 * Loader — spinner rotatif
 * ====================================================================== */

.gf-diagnostic-form__loader {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.gf-diagnostic-form__spinner {
    animation: gf-spin 0.8s linear infinite;
}

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

/* =========================================================================
 * Historique — pastilles d'étapes
 * ====================================================================== */

.gf-diagnostic-form__history {
    display: inline-flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    position: relative;
}

.gf-diagnostic-form__history:after {
    display: block;
    content: "";
    position: absolute;
    z-index: -1;
    background: #0184B0;
    top: 50%;
    width: 100%;
    height: 1px;
}

.gf-diagnostic-form__history-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #0184B0;
    background: white;
    box-shadow: 0 0 0 8px white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600px;
    color: #0184B0;
    user-select: none;
    transition: 0.2s all ease-out;
}

.gf-diagnostic-form__history-pill.is-current {
    color: white;
    background: #0184B0;
}

.gf-diagnostic-form__history-pill.is-current:hover {
    cursor: default;
}

.gf-diagnostic-form__history-pill:hover:not(.is-current) {
    background: #BFE0EB;
}

/* =========================================================================
 * Choix de réponses — layout boutons
 * ====================================================================== */



.gf-diagnostic-form__answers {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

@media (min-width: 1130px) {
    
    .gf-diagnostic-form__answers:not(.one-column) {
        flex-direction: row;
        flex-wrap: wrap; 
    }
    .gf-diagnostic-form__answers:not(.one-column) .gf-diagnostic-form__answer-btn {
        width: calc(50% - 8px);
    }
    
}

.gf-diagnostic-form__answer-btn {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    cursor: pointer;
    padding: 20px 20px;
    user-select: none;
    background-color: #F0F0F0;
    color: #1D1D1B;
    transition: 0.2s all ease-out;
    
    
}
.gf-diagnostic-form__answer-btn:hover {
    background-color: #BFE0EB;
}
.gf-diagnostic-form__answer-btn:active {
    background-color: #0184B0;
    color: #fff;
}
.gf-diagnostic-form__answer-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gf-diagnostic-form__answer-media {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.gf-diagnostic-form__answer-media-img {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #fff;
    border-radius: 50px;
    overflow: hidden;
}
.gf-diagnostic-form__answer-media-img img {
    max-height: 90px; /*130px;*/
    width: auto;
}

.gf-diagnostic-form__answer-title {
    font-weight: 600;
    font-size: 19px;
    line-height: 120%;
}

.gf-diagnostic-form__answer-desc {
    font-size: 14px;
    font-weight: 400;
    line-height: 150%;
}

@media (min-width: 1130px) {
    .gf-diagnostic-form__answer-btn {
        flex-direction: row;
        justify-content: space-between;
        gap: 40px;
        padding: 40px;
    }
}

@media (min-width: 1250px) {
    .gf-diagnostic-form__answer-media {
          flex-wrap: nowrap;
    }
}

/* =========================================================================
 * Navigation — boutons précédent / début
 * ====================================================================== */

.gf-diagnostic-form__navigation {
    display: flex;
    gap: 0.5em;
    margin-top: 64px;
}

.gf-diagnostic-form__nav-back:after {
    float: left!important;
    rotate: 180deg;
    position: relative;
    top: 2px;
}


/* =========================================================================
 * Hidden attribute support
 * ====================================================================== */

.gf-diagnostic-form [hidden] {
    display: none !important;
}

/* =========================================================================
 * Vignette vidéo YouTube
 * ====================================================================== */

.gf-diagnostic-form__video {
    margin-bottom: 40px;
}

.gf-diagnostic-form__video-link {
    display: block;
    position: relative;
    cursor: pointer;
    line-height: 0;
}

.gf-diagnostic-form__video-thumb {
    width: 100%;
    height: auto;
    display: block;
}

.gf-diagnostic-form__video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 200ms ease;
}

.gf-diagnostic-form__video-link:hover .gf-diagnostic-form__video-play {
    opacity: 0.8;
}
