@charset "UTF-8";

:root {
    --main-color: #4f46e5;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --text-dark: #111827;
    --text-light: #f3f4f6;
    --success: #10B981;  /* Vert émeraude */
    --danger: #EF4444;     /* Rouge vif */
    --warning: #F59E0B;    /* Jaune foncé */
    --info: #3B82F6;       /* Bleu moyen */
    --gray: #6B7280;       /* Texte secondaire */
    --font-size-base: 0.95rem; /* Base font-size légèrement réduit */
    --font-size-medium: 1.75rem; /* Taille plus petite pour les titres */
    --font-size-large: 2.5rem; /* Taille plus petite pour les titres */
    --font-size-small: 0.85rem; /* Petite taille pour les labels et le texte secondaire */
}
body {
    margin: 0;
    font-family: system-ui, sans-serif;
    font-size: var(--font-size-base);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--main-color);
}
header {
    padding: 1rem;
    display: flex;
    justify-content: center;
    /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05); */
    position: relative;
    width: 100vw;
    flex-direction: row;
    flex-wrap: nowrap;
    /* align-content: center; */
    align-items: center;
}
a,
a:hover,
a:focus,
a:active {
    color: var(--text-light);
}
#logo-quiz {
    width: 75px;
    height: auto;
}
.layout {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}
main {
    padding: 2rem;
    overflow-y: auto;
    width: 60%;
}
h1 {
    font-size: var(--font-size-large);
    text-align: center;
}
.home h1 {
    color: var(--text-light);
}
h2 {
    font-size: var(--font-size-medium);
}
footer {
    width: 100vw;
    color: var(--text-light);
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}
footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
footer ul li {
    padding: 0.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}
footer ul a {
    color: var(--text-light);
}
.button {
    background: var(--main-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    text-decoration: none !important;
    font-family: Arial, Helvetica, sans-serif;
    font-size: var(--font-size-base);
}
.button:hover {
    background: #4338ca;
}

.button:disabled,
.button:disabled:hover {
    background: var(--gray);
    cursor: not-allowed;
}

.button-secondary {
    background: var(--light-bg);
    color: var(--text-dark);
}

.button-secondary:hover,
.button-secondary:active,
.button-secondary:focus {
    background: var(--light-bg);
    color: var(--text-dark);
}
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    nav.sidebar {
        position: absolute;
        top: 112px;
        left: 0;
        height: calc(100vh - 112px);
        transform: translateX(0); /* visible par défaut */
        background: var(--dark-bg);
        width: 250px;
        z-index: 100;
        transition: transform 0.3s ease;
    }
    nav.sidebar.hidden {
        transform: translateX(-100%);
    }
    .layout {
        flex-direction: column;
    }
    main {
        padding: 1rem;
        width: auto;
    }
    aside {
        width: auto;
        padding: 1rem;
    }
}
form {
    max-width: 320px;
    background: var(--light-bg);
    padding: 1rem 2rem;
    border-radius: 8px;
    display: block;
    margin: 1rem auto;
}
form label {
    display: block;
    margin: 1rem 0 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: var(--font-size-small);
}
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: calc(100% - 2rem);
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: border 0.2s, box-shadow 0.2s;
    font-size: 0.95rem; /* Taille réduite des champs de formulaire */
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    outline: none;
}
input[type="checkbox"],
input[type="radio"] {
    transform: scale(1.2);
    margin-right: 0.5rem;
}
input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
}
form .form-group {
    margin-bottom: 1.5rem;
}
form .form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}
form small {
    color: #6b7280;
    display: block;
    margin-top: 0.25rem;
}
form input + .button {
    margin-top: 1rem;
}