/**
 * Quiz Master - Styles communs
 * Fichier CSS centralisé pour toutes les interfaces
 */

 :root {
    --primary: #5478D9;
    --success: #B4E245;
    --danger: #DF5A6B;
}


 @font-face {
    font-family: "Brandon-Black";
    src: url("font/BrandonText-Black.ttf") format("truetype");
    font-weight:bold;
}

@font-face {
    font-family: "Brandon-Regular";
    src: url("font/BrandonText-Regular.ttf") format("truetype")
}

@font-face {
    font-family: "Brandon-Light";
    src: url("font/BrandonText-Light.ttf") format("truetype");
    font-weight:light;
}


/* ===== STYLES GLOBAUX ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #667eea;
    --secondary-color: #F2AE5A;
    --correct-color: #169F93;
    --incorrect-color: #DF5A6B;
    --light-bg: #f8f9fa;
}

body {
    font-family: 'Brandon-regular',Helvetica,Arial,Lucida,sans-serif;
    min-height: 100vh;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Surcharge des styles Bootstrap */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #5a6fd6;
    border-color: #5a6fd6;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.hidden {
    display: none !important;
}

/* ===== INTERFACE DE CONNEXION ===== */
.login-box {
    border-radius: 10px;
}

/* ===== INTERFACE JOUEUR ===== */
/* Écrans */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Boutons de réponse */
/*    .option-btn {
        background-color: #fff;
        border: 2px solid #ddd;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: left;
        font-size: 1rem;
    }*/


.option-btn.correct {
    border-color: var(--correct-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.option-btn.incorrect {
    border-color: var(--incorrect-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.options-container.active .option-btn {
    opacity: 0.5;
}

.options-container.active .option-btn.active,
.body-screen .option.correct {
    opacity:1;
    box-shadow: inset 0 -4px 0 0 rgba(0,0,0,.2), 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    padding-bottom: 19px;
    background:linear-gradient(90deg,rgb(185, 235, 2) 0%, rgba(128, 194, 3, 1) 100%) !important;
    color:white !important;
    overflow:hidden;
    border:0 !important;
}

.options-container.active .option-btn.active::before,
.body-screen .option.correct::before { 
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    height: 400%;
    background: rgba(255, 255, 255, .15);
    z-index: 2;
    aspect-ratio: 1 / 3;
    transform: rotate(-45deg);
    animation: rotating-green 2s linear infinite;
}

@keyframes rotating-green {
    from {
      left:-5%;
    }
    to {
      left:105%;
    }
  }

/* Résultats */
#result-status.correct {
    color: var(--correct-color);
}

#result-status.incorrect {
    color: var(--incorrect-color);
}

/* Timer circulaire */
.circular-timer {
    position: relative;
    width: 100px;
    height: 100px;
}

.body-screen .circular-timer {
    width:80px;
    height:80px;
    position:fixed;
    top:100px;
    right:100px;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: white;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283; /* 2 * π * r = 2 * π * 45 ≈ 283 */
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.3s ease;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 1;
}

/* ===== INTERFACE HÔTE ===== */
/* Gestion des quiz */

.quiz-list-container {
    margin-top: 20px;
}

.quiz-table {
    width: 100%;
    border-collapse: collapse;
}

.quiz-table th, .quiz-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.quiz-table th {
    font-weight: 600;
    color: #495057;
}

.status-active {
    color: var(--correct-color);
    font-weight: 500;
}

.status-inactive {
    color: #6c757d;
}

/* Éditeur de quiz */
.quiz-form {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.question-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.options-container {
    margin-bottom: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.correct-option {
    margin-right: 10px;
}

.quiz-form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.player-list-container {
    margin: 20px 0;
}

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

.player-list li {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
}

.timer {
    font-weight: bold;
    color: var(--incorrect-color);
}

.question-counter {
    font-weight: 500;
}

.correct-answer {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

#explanation-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.score-table-container {
    margin: 20px 0;
}

.winner-display {
    background-color: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

/* Modale de confirmation */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ===== BOUTONS PERSONNALISÉS ===== */
.btn.danger-btn {
    background-color: var(--incorrect-color);
    border-color: var(--incorrect-color);
    color: white;
}

.btn.success-btn {
    background-color: var(--correct-color);
    border-color: var(--correct-color);
    color: white;
}

.btn.secondary-btn {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn.small-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
} 

/* CUSTOM BOOTSTRAP AVI */
.rounded-circle-relative,
.form-control,
.btn {
    border-radius:100rem !important;
}

/* CUSTOM AVI */

.form-control-input {
    background:rgba(0, 0, 0, .06) !important;
}

.bg-custom {
    background:url('https://theparisian.fr/FTP/QUIZZ/src/bg-repeat.jpg') repeat center center #5478D9;
}

.bg-client {
    /*background: url('img/4k0321.mp4') no-repeat center center;
    background-size: cover;*/
}

.bg-client-video {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
 }

 .bg-client-lighter {
    background:rgba(84,120,217,.8) !important;
 }

 #next-question-btn,
 #start-game-btn {
    background:linear-gradient(90deg,rgba(235, 234, 2, 1) 0%, rgba(128, 194, 3, 1) 100%) !important;
 }

 #force-next-question-btn {
    background:linear-gradient(90deg,rgba(235, 234, 2, 1) 0%, rgba(194, 128, 3, 1) 100%) !important;
    color: white !important;
    border: none !important;
    position: relative;
    z-index: 100;
 }

 .bg-blur {
    backdrop-filter:blur(5px);
    background:rgba(255, 255, 255, .08) !important;
 }

 .rounded {
    border-radius:2rem !important;
 }

 .border-extra-light {
    border:1px solid rgba(255, 255, 255, .15) !important;
 }


 /* MENU CUSTOM */

 .nav-tabs .nav-item .nav-link {
    border:0 !important;
    margin:0 5px !important;
    padding:10px 20px !important;
    color:white;
    backdrop-filter:blur(5px);
    background:rgba(0, 0, 0, .08) !important;
    transition:0.2s ease all 0s;
 }

 .nav-tabs .nav-item:hover .nav-link {
    background:rgba(0, 0, 0, .2) !important;
 }

.nav-tabs .nav-item .nav-link.active,
.nav-tabs .nav-item:hover .nav-link.active {
    backdrop-filter:blur(0px);
    background:white !important;
    color:black !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-darker-light {
    background-color: rgba(0, 0, 0, .08) !important;
}

.fw-bold {
    font-family: "Brandon-Black";
}

.fs-100 {
    font-size:1rem !important;
}

.fs-125 {
    font-size:1.25rem !important;
}

.fs-150 {
    font-size:1.5rem !important;
}


/* Animations PLAY */

.body-play #question-screen .options-container {
    position: relative;
}

.body-play #question-screen .options-container .option-btn {
    margin-left:-120%;
}

.body-play #question-screen.active .options-container .option-0 {
    animation-duration: .5s;
    animation-delay: 0s;
    animation-fill-mode: forwards;
  animation-name: animate-option-0;
}

@keyframes animate-option-0 {
    0% {
        margin-left:-100%;
    }
    100% {
        margin-left:0;
    }
}

.body-play #question-screen.active .options-container .option-1 {
    animation-duration: .5s;
    animation-delay: .5s;
    animation-fill-mode: forwards;
  animation-name: animate-option-1;
}

@keyframes animate-option-1 {
    0% {
        margin-left:-100%;
    }
    100% {
        margin-left:0;
    }
}

.body-play #question-screen.active .options-container .option-2 {
    animation-duration: .5s;
    animation-delay: 1.5s;
    animation-fill-mode: forwards;
  animation-name: animate-option-2;
}

@keyframes animate-option-2 {
    0% {
        margin-left:-100%;
    }
    100% {
        margin-left:0;
    }
}

.body-play #question-screen.active .options-container .option-3 {
    animation-duration: .5s;
    animation-delay: 2s;
    animation-fill-mode: forwards;
  animation-name: animate-option-3;
}

@keyframes animate-option-3 {
    0% {
        margin-left:-100%;
    }
    100% {
        margin-left:0;
    }
}


/* Animations SCREEN */

.body-screen .option,
.body-screen .option-0,
.body-screen .option-1,
.body-screen .option-2,
.body-screen .option-3 {
    transition:0.2s ease-out all 0s;
}

.body-screen .option-0,
.body-screen .option-2 {
    margin-left:-100%;
    margin-right:auto;
}

.body-screen .option-0.show,
.body-screen .option-2.show {
    margin-left:0;
}

.body-screen .option-1,
.body-screen .option-3 {
    margin-right:-100%;
    margin-left:auto;
}

.body-screen .option-1.show,
.body-screen .option-3.show {
    margin-right:0;
}

.body-screen .option,
.options-container .option-btn {
    color:white;
    text-align:center;
    background:rgba(255, 255, 255, .03) !important;
    backdrop-filter:blur(5px);
    border:1px solid rgba(255, 255, 255, .15);
    box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    padding:1rem;
    border-radius: 100rem;
    transition:0.2s ease all 0s;
}

/* TABLEAUX DES SCORES */

#score-table,
#final-leaderboard {
    width:100%;
    border-collapse:collapse;
    color:white;
}

#score-table th,
#final-leaderboard th {
    font-weight:bold;
    color:white;
    padding:.5rem .2rem;
}

#score-table tr td,
#final-leaderboard tr td {
    border-top:2px solid rgba(255, 255, 255, 2);
    padding:.5rem .2rem;
}

/* Animations SCREEN */

.explanation-fixed {
    position: fixed;
    top: 150%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 1rem;
    width: 80%;
    max-width: 600px;
    transition:0.2s ease all 0s;
}

.explanation-fixed.active {
    top: 50%;
}









