@font-face {
    font-family: "Accuratist";
    src: url(../font/Accuratist.ttf);
}

body {
    margin: 0;
}

.main-intro {
    position: relative;
    width: 100%;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 50px;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-intro h1 {
    font-size: 3.5em;
    color: #ffffff; /* Blanc pour contraster avec la vidéo */
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    text-transform: uppercase; /* Texte en majuscules */
    font-family: "Comic Neue", sans-serif;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7); /* Ombre portée pour meilleure lisibilité */
}

.main-intro p {
    font-size: 1.3rem;
    color: #ffffff; /* Blanc pour contraste */
    text-align: center;
    padding: 15px;
    font-family: "Comic Neue", sans-serif;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7); /* Ombre portée pour visibilité sur la vidéo */
}

.container {
    display: flex;
    align-items: center;
    gap: 50px;
    padding: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.container-image {
    flex: 0 0 40%;
}

.container-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.container-image img:hover {
    filter: grayscale(0%);
}

.container-text {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.container-text h2 {
    font-weight: 700;
    font-size: 1.5em;
    margin-bottom: 20px;
    font-family: "Accuratist";
}

.container-text p {
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-family: "Roboto";
}

/* Conteneur principal */
.modal {
    display: flex;
    justify-content: space-around;
    padding: 50px 20px;
    gap: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

/* Styles communs */
.little, .ados {
    flex: 1;
    max-width: 450px;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

/* Section Enfants (6-11 ans) */
.little {
    background: linear-gradient(145deg, #fff6e5, #ffe4bc);
    border: 3px solid #ffd699;
    box-shadow: 0 8px 15px rgba(255, 214, 153, 0.3);
}

.little::before {
    content: "6-11 ans";
    background: #ff9933;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    font-weight: bold;
}

.little h2 {
    color: #ff6600;
    font-family: "Comic Neue", sans-serif;
    font-size: 2em;
    margin-bottom: 20px;
}

.little p {
    color: #664400;
    font-size: 1.1em;
    margin-bottom: 25px;
}

.little button {
    background: #ff9933;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.little button:hover {
    background: #ff8000;
    transform: scale(1.05);
}

/* Section Ados (12-15 ans) */
.ados {
    background: linear-gradient(145deg, #e6f3ff, #cce6ff);
    border: 3px solid #99ccff;
    box-shadow: 0 8px 15px rgba(153, 204, 255, 0.3);
}

.ados::before {
    content: "12-15 ans";
    background: #3399ff;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9em;
    font-weight: bold;
}

.ados h2 {
    color: #0066cc;
    font-family: "Accuratist", sans-serif;
    font-size: 2em;
    margin-bottom: 20px;
}

.ados p {
    color: #003366;
    font-size: 1.1em;
    margin-bottom: 25px;
}

.ados button {
    background: #3399ff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.ados button:hover {
    background: #0080ff;
    transform: scale(1.05);
}

/* Effets de survol */
.little:hover, .ados:hover {
    transform: translateY(-10px);
}

.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 800px;
    border-radius: 15px;
    animation: modalOpen 0.3s ease-out;
}

@keyframes modalOpen {
    from {transform: scale(0.7); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    color: #333;
}

.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.risk-card {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.risk-card:hover {
    transform: translateY(-5px);
}

.risk-card img {
    width: 200px;  /* Taille fixe en largeur */
    height: 200px; /* Taille fixe en hauteur */
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.risk-card h3 {
    margin-top: 10px;
    text-align: center;
    font-family: "Comic Neue", sans-serif;
}

.modal-container-ados {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal-content-ados {
    position: relative;
    background-color: #1a1a1a;
    margin: 3% auto;
    padding: 25px;
    width: 90%;
    max-width: 1000px;
    border-radius: 20px;
    color: white;
    animation: modalOpenAdos 0.4s ease-out;
}

@keyframes modalOpenAdos {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.risk-grid-ados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.risk-card-ados {
    background: linear-gradient(145deg, #2a2a2a, #333);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
}

.risk-card-ados:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-content {
    padding: 15px;
}

.risk-card-ados img {
    width: 200px;  /* Taille fixe en largeur */
    height: 200px; /* Taille fixe en hauteur */
    object-fit: cover;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
}

.risk-card-ados h3 {
    color: #fff;
    font-size: 1.4em;
    margin: 15px 0;
    font-family: "Accuratist", sans-serif;
}

.risk-card-ados p {
    color: #ccc;
    font-size: 0.9em;
    line-height: 1.4;
    margin-bottom: 15px;
}

.modal-content-ados .close {
    color: #fff;
    font-size: 35px;
    transition: color 0.3s ease;
}

.modal-content-ados .close:hover {
    color: #ff4444;
}

.info-section-kids {
    text-align: center;
    padding: 20px;
    background: #fff6e5;
    border-radius: 20px;
}

.rules-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.rule-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    width: 200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rule-card img {
    display: block;
    margin: 0 auto;
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    object-fit: contain;
}

.game-section {
    margin-top: 30px;
    background: #e6f3ff;
    padding: 20px;
    border-radius: 20px;
}

.info-section-kids img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin: 20px auto;
}

/* Rendre les modales scrollables */
.modal-content, .modal-content-ados {
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
}

/* Améliorer la disposition du memory game */
.memory-game {
    display: grid;
    grid-template-columns: repeat(2, 120px);
    gap: 15px;
    justify-content: center;
    margin: 20px auto;
    perspective: 1000px;
}

.memory-card {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.memory-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    border-radius: 10px;
    backface-visibility: hidden;
    border: 2px solid #ddd;
    background-color: white;
    padding: 5px;
}

.memory-card .front-face {
    transform: rotateY(180deg);
}

.memory-card .back-face {
    transform: rotateY(0);
}

.memory-card.flipped .front-face {
    transform: rotateY(0);
}

.memory-card.flipped .back-face {
    transform: rotateY(-180deg);
}

.memory-card.matched {
    animation: matchedAnimation 0.4s ease-in-out;
}

@keyframes matchedAnimation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.memory-game {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    margin: 0 auto;
    max-width: 250px;
}
.info-section-ados {
    background: #2a2a2a;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.info-section-ados img {
    width: 530px;
    height: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px;
    border-radius: 10px;
}

.info-section-ados h3 {
    color: #4a90e2;
    font-size: 1.8em;
    margin: 20px 0;
    text-align: center;
    font-family: "Accuratist", sans-serif;
}

.info-section-ados ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.info-section-ados li {
    color: #fff;
    padding: 12px 20px;
    margin: 10px 0;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
    font-size: 1.1em;
    line-height: 1.4;
    transition: transform 0.3s ease;
}

.info-section-ados li:hover {
    transform: translateX(10px);
    background: rgba(74, 144, 226, 0.2);
}
.scenario-container {
    background: #050505;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.score-display {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #4a90e2;
    font-weight: bold;
}

.question-container {
    background: #020303;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.4;
}

.actions-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.action-item {
    background: #080707;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: move;
    transition: all 0.2s ease;
}

.action-item:hover {
    background: #0c2a48;
    transform: translateX(5px);
}

.action-item:active {
    background: #0c2a48;
    transform: scale(0.98);
}

.feedback-message {
    margin: 15px 0;
    padding: 10px;
    border-radius: 6px;
}

.success-message {
    background: #0a0b0b;
    color: #2f855a;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.next-scenario {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 1.1em;
    width: 100%;
}

.next-scenario:hover {
    background: #357abd;
}
#ia-chat-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    font-family: "Comic Neue", sans-serif;
}

#ia-chat-section h2 {
    text-align: center;
    color: #4a90e2;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.chat-container {
    background: linear-gradient(145deg, #f0f4ff, #e6eeff);
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ia-chat-box {
    padding: 1rem;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin-bottom: 1rem;
}

.user-message, .ai-message {
    margin: 0.5rem 0;
    padding: 0.8rem 1rem;
    border-radius: 15px;
    max-width: 80%;
    animation: messageAppear 0.3s ease-out;
}

.user-message {
    background: #4a90e2;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.ai-message .big-text {
    font-size: 1.2rem;
    line-height: 1.6;
    display: block;
    padding: 10px;
}

.ai-message .highlight {
    background-color: #fff3cd;
    padding: 0 5px;
    border-radius: 4px;
}

.ai-message strong {
    color: #2c5282;
    font-weight: 700;
}

.ai-message ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-message li {
    margin: 5px 0;
    list-style-type: "🔸";
    padding-left: 10px;
}

/* Emoji styles */
.ai-message .emoji {
    font-size: 1.5rem;
    margin-right: 8px;
    vertical-align: middle;
}

/* Animation for new messages */
.ai-message, .user-message {
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border-radius: 15px;
}

#userInput {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: "Comic Neue", sans-serif;
}

#userInput:focus {
    outline: none;
    border-color: #4a90e2;
}

#sendButton, #stopButton {
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

#sendButton:hover, #stopButton:hover {
    background: #357abd;
}

.typing-indicator {
    color: #666;
    font-style: italic;
    padding: 0.5rem;
    text-align: center;
}
#plugin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Plus foncé pour renforcer le contraste */
    z-index: 1000;
    animation: fadeIn 0.5s;
}


.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 40px;
    color: #333333; /* Couleur sombre */
    cursor: pointer;
    transition: transform 0.3s;
}

.close:hover {
    transform: rotate(90deg);
}

#alerts {
    background: linear-gradient(45deg, #FF4500, #FFD700); /* Orange et jaune pour attirer l'attention */
    padding: 30px;
    border-radius: 20px;
    margin: 20px;
    text-align: center;
}

#alerts h2 {
    color: white;
    font-family: 'Arial', sans-serif;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

#alerts button {
    background-color: #FFA500; /* Jaune-orange pour alerte, légèrement différent du fond */
    color: #333333;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.3s;
    font-family: 'Arial', sans-serif;
    margin: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#alerts button:hover {
    transform: scale(1.1);
    background-color: #FF8C00; /* Orange foncé au survol pour insister sur le bouton */
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.button-click {
    animation: clickEffect 0.3s;
}

@keyframes clickEffect {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

#random-image-grid {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 400px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

.confetti {
    
    width: 10px;
    height: 10px;
    background-color: red;
    animation: fall 5s linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}
.section {
    background: linear-gradient(135deg, #FFE5F1, #E5F1FF);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    margin: 20px;
    font-family: "Comic Sans MS", "Comic Neue", cursive;
}

.section h3 {
    color: #FF6B6B;
    font-size: 2em;
    text-align: center;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.question {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border: 3px solid #87CEEB;
    transition: transform 0.3s ease;
}

.question:hover {
    transform: translateY(-5px);
}

.question p:first-of-type {
    color: #FF6B6B;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
}

.question p:nth-of-type(2) {
    color: #4A90E2;
    font-size: 1.2em;
    margin-bottom: 15px;
}

label {
    display: block;
    padding: 12px;
    margin: 10px 0;
    background: #F0F8FF;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

label:hover {
    background: #E6F3FF;
    transform: scale(1.02);
}

input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.5);
    accent-color: #FF6B6B;
}

button {
    background: #FF6B6B;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    transition: all 0.3s ease;
    font-family: "Comic Sans MS", "Comic Neue", cursive;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

button:hover {
    background: #FF8787;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.result {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    border-radius: 10px;
    font-size: 1.2em;
    min-height: 50px;
}

.result.correct {
    background: #98FB98;
    color: #006400;
    animation: celebrate 0.5s ease;
}

.result.incorrect {
    background: #FFB6C1;
    color: #8B0000;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* For audio element */
audio {
    display: none;
}




/* ==========================================================================
   Your custom CSS styles for smartphones and screens smaller than 480 px
   ========================================================================== */

@media only screen and (max-width: 480px) {
    /* insert styles here */
}


/* ==========================================================================
   Helper classes
   ========================================================================== */

.hidden {
    display: none !important;
    visibility: hidden;
}


/* Clearfix
 * Adding a 'clearfix' class will allow parent elements to contain a floated child element
 */

.clearfix:before,
.clearfix:after {
    content: " ";
    /* 1 */
    display: table;
    /* 2 */
}

.clearfix:after {
    clear: both;
}


/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    zoom: 1;
}
