/* PAGE RESSOURCES */

@font-face {
    font-family: 'PlayfairDisplay';
    src: url('fonts/Playfair_Display/static/PlayfairDisplay-Regular.ttf');
}

@font-face {
    font-family: 'Lato';
    src: url('fonts/Lato/Lato-Regular.ttf');
}

:root {
    /* Palette de couleurs cohérente avec index.html */
    --primary-white: #161616;
    --cream: #faf8f3;
    --light-cream: #f9f6f0;
    --soft-gray: #f5f5f5;
    --medium-gray: #e8e8e8;
    --text-gray: #4a4a4a;
    --text-dark: #2c2c2c;
    
    /* Couleurs dorées */
    --gold-primary: #dcb20a;
    --gold-light: #dcb20a;
    --gold-dark: #dcb20a;
    
    /* Couleurs d'accent claires */
    --light-blue: #f0f8ff;
    --soft-blue: #e6f3ff;
    --accent-blue: #87ceeb;
    
    /* Couleurs d'ombre douces */
    --soft-shadow: rgba(0, 0, 0, 0.1);
    --medium-shadow: rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--light-cream);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'PlayfairDisplay', serif;
}

/* Section principale */
.ressource-img {
    padding-top: 120px;
    min-height: 100vh;
    background: var(--light-cream);
}

/* Section texte d'introduction */
.text {
    color: #fff;
    text-align: center;
    padding: 60px 40px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.text h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--gold-primary);
    font-weight: 700;
}

.text p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--primary-white);
    margin-bottom: 40px;
}

/* Section des liens */
.links-section {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.links-section .card {
    background: var(--primary-white);
    border: 2px solid var(--gold-primary);
    border-radius: 15px;
    padding: 2.5rem;
    box-shadow: 0 8px 25px var(--soft-shadow);
    text-align: center;
    max-width: 350px;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.links-section .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
}

.links-section .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--medium-shadow);
    border-color: var(--gold-dark);
}

.links-section .card p {
    margin-bottom: 2rem;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
}

.links-section .btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    color: var(--primary-white);
    background: var(--gold-primary);
    border: 2px solid var(--gold-primary);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.links-section .btn:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 178, 10, 0.3);
}

/* Styles pour le quiz et checklist */
.quiz, .checklist {
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    max-width: 800px;     
    padding: 40px;
    border-radius: 15px;
    background-color: var(--primary-white);
    border: 2px solid var(--gold-primary);
    box-shadow: 0 8px 25px var(--soft-shadow);
    margin: 120px auto 40px;
    position: relative;
    overflow: hidden;
}

.quiz::before, .checklist::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-primary), var(--gold-light));
}

.quiz h2, .checklist h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--gold-primary);
    font-weight: 700;
    text-align: center;
}

.quiz h3, .checklist h3 {
    padding: 15px;
    color: var(--gold-primary);
    margin-top: 30px;
    font-weight: 600;
}

.quiz p, .checklist p {
    color: #fff;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Cartes de quiz */
.quiz-card {
    border: 1px solid var(--gold-primary);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px var(--soft-shadow);
    background-color: var(--primary-white);
    width: 100%;
}

.quiz-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--gold-primary);
}

.quiz-card .answers {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-card .answers label {
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    flex-direction: row-reverse; /* Inverse l'ordre des éléments */
    justify-content: flex-start; /* Aligne les éléments au début */
    align-items: center;
    padding: 12px;
    background-color: #2A2A2A;
    color: #fff;
    border: 1px solid #DCB20A;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.quiz-card .answers input[type="checkbox"] {
    margin-left: 0; /* Retire la marge à gauche */
    margin-right: 10px; /* Ajoute une marge à droite */
    width: 18px;
    height: 18px;
    accent-color: #DCB20A; /* Couleur de la checkbox */
}
/* Ajuste l'espacement du texte */
.quiz-card .answers label span {
    margin-right: auto; /* Pousse le texte vers la gauche */
}
/* Style spécial pour les zones de texte */
.quiz-card .answers label:has(textarea) {
    display: block;
    background-color: transparent;
    border: none;
    padding: 0;
}
.quiz-card .answers textarea {
    resize: none;
    width: 100%;
    height: 60px;
    border: 2px solid #DCB20A;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    background-color: #2A2A2A;
    color: white;
    box-shadow: 0 4px 10px rgba(220, 178, 10, 0.1);
    margin-top: 12px;
    transition: all 0.3s ease;
}
.quiz-card .answers textarea:focus {
    outline: none;
    border-color: #DCB20A;
    box-shadow: 0 0 0 3px rgba(220, 178, 10, 0.2);
}
/* Animation hover */
.quiz-card .answers label:hover {
    background-color: #DCB20A;
    color: #161616;
    transform: translateX(5px);
}

/* Bouton de soumission */
#submit-quiz {
    background-color: var(--gold-primary);
    color: var(--primary-white);
    border: none;
    padding: 15px 30px;
    margin: 20px 0;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

#submit-quiz:hover {
    background-color: var(--gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 178, 10, 0.3);
}

/* Flèche de retour */
i.fa-arrow-left-long {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gold-primary);
    background-color: var(--primary-white);
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

i.fa-arrow-left-long:hover {
    color: var(--gold-dark);
    transform: translateX(-3px);
}

/* Alertes */
.alert-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--soft-shadow);
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-close {
    padding: 0.25rem 0.75rem;
    margin-left: 1rem;
    border: none;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.3s ease;
}

.alert-close:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media screen and (max-width: 767px) {
    .text {
        padding: 40px 20px 30px;
    }
    
    .text h3 {
        font-size: 2rem;
    }
    
    .text p {
        font-size: 1.1rem;
    }
    
    .links-section {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .links-section .card {
        padding: 2rem;
        max-width: 100%;
    }
    
    .quiz, .checklist {
        margin: 100px 20px 30px;
        padding: 30px 20px;
    }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
    .text {
        padding: 50px 30px 35px;
    }
    
    .links-section {
        padding: 2rem 3rem;
    }
    
    .quiz, .checklist {
        margin: 110px 30px 35px;
        padding: 35px 25px;
    }
}