/* =========================================================
   Conteneur général
   ========================================================= */

.youtube-consent {
    width: 100%;
    max-width: 1000px;
    margin: 2rem auto;
}


/* =========================================================
   Zone de prévisualisation
   ========================================================= */

.youtube-placeholder {
    position: relative;
    overflow: hidden;
    
    background: #eeeeee;
    border-radius: 12px;
}

.youtube-thumbnail {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* =========================================================
   Bouton "Afficher la vidéo"
   ========================================================= */

.youtube-show-button {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    padding: 0.9rem 1.4rem;

    border: 0;
    border-radius: 8px;

    background: #111111;
    color: #ffffff;

    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.15s ease,
        background-color 0.15s ease;
}

.youtube-show-button:hover {
    background: #333333;
    transform: translate(-50%, -50%) scale(1.03);
}


/* =========================================================
   Panneau de consentement
   ========================================================= */

.youtube-consent-panel {
  
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 2rem;

    background: rgba(0, 0, 0, 0.88);

    color: #515151;

   height: max-content;
}

.youtube-consent-content {
    width: 100%;
    max-width: 650px;

    text-align: center;
}

.youtube-consent-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color:#eeeeee;
    font-size: 1.4rem;
}

.youtube-consent-content p {
    margin-bottom: 1rem;

    line-height: 1.6;
}

.youtube-consent-content a {
    color: #ffffff;
    text-decoration: underline;
}


/* =========================================================
   Boutons du consentement
   ========================================================= */

.youtube-consent-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;

    margin-top: 1.5rem;
}

.youtube-button {
    padding: 0.75rem 1.2rem;

    border: 2px solid #ffffff;
    border-radius: 7px;

    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;
}

.youtube-button-accept {
    background: #ffffff;
    color: #111111;
}

.youtube-button-refuse {
    background: transparent;
    color: #949494;
}


/* =========================================================
   Etat après refus
   ========================================================= */

.youtube-refused {
    display: flex;

    align-items: center;
    justify-content: center;

    height: 100%;

    padding: 2rem;

    text-align: center;

    background: #eeeeee;
    color: #222222;
}

.youtube-refused-content {
    max-width: 600px;
}

.youtube-refused-content p {
    line-height: 1.6;
    color:#949494;
}


/* =========================================================
   Vidéo YouTube
   ========================================================= */

.youtube-player {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 12px;
}

.youtube-player iframe {
    display: block;

    width: 100%;
    height: 100%;

    border: 0;
}


/* =========================================================
   Bouton permettant de retirer l'affichage
   ========================================================= */

.youtube-remove-button {
    display: block;

    margin: 0.75rem auto 0;

    padding: 0.5rem 0.8rem;

    border: 1px solid #777777;
    border-radius: 6px;

    background: transparent;
    color: inherit;

    cursor: pointer;

    font-size: 0.9rem;
}


/* =========================================================
   Accessibilité : focus clavier
   ========================================================= */

button:focus-visible,
a:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}


/* =========================================================
   Réduction des animations
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .youtube-show-button {
        transition: none;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

    .youtube-consent-panel {
        padding: 1.25rem;
    }

    .youtube-consent-content h3 {
        font-size: 1.2rem;
    }

    .youtube-consent-content p {
        font-size: 0.95rem;
    }

    .youtube-consent-actions {
        flex-direction: column;
    }

    .youtube-button {
        width: 100%;
    }
}