html, body {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 100% de la hauteur de la fenêtre */
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #37474f;
    background: #fafafa;
}

/********************************************************************************/
/***************************Affichage des erreurs********************************/
/********************************************************************************/
.alert {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.alert-error {
    background-color: #fdecea;
    color: #611a15;
    border: 1px solid #f5c6cb;
    text-align: center;
}

.alert-success {
    background-color: #edf7ed;
    color: #1e4620;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
}

/********************************************************************************/
/***************************Boite de connexion************************************/
/********************************************************************************/
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #37474f;
}

.form-group input {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1em;
    transition: border 0.3s;
}

.form-group input:focus {
    border-color: #26a69a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(38, 166, 154, 0.2);
}

.form-error {
    color: #d32f2f;
    font-size: 0.9em;
    margin-top: 5px;
}
/********************************************************************************/
/***************************Boite de dialogue************************************/
/********************************************************************************/
.confirmation-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f8f9fa;
    border: 2px solid #28a745; /* Vert moyen */
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 400px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    text-align: center;
}
.confirmation-dialog .buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.confirmation-dialog button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.confirmation-dialog .confirm {
    background-color: #218838; /* Vert foncé */
    color: white;
}
.confirmation-dialog .cancel {
    background-color: #6c757d;
    color: white;
}
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}


/********************************************************************************/
/***************************Header et navigation ********************************/
/********************************************************************************/
header {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    text-decoration: none;
    color: #37474f;
    font-weight: 500;
    font-size: 1.1em;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #26a69a;
}


/********************************************************************************/
/****************************Menu utilisateur************************************/
/********************************************************************************/
.user-status {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    height: 100%;
}

.user-icon {
    font-size: 1.3em;
    color: #37474f;
    cursor: pointer;
}

.user-name {
    font-weight: 500;
    color: #37474f;
    cursor: pointer;
    margin-right: 10px;
}

.user-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 200px;
    z-index: 1000;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-status:hover .user-menu {
    display: block;
}

.user-menu a {
    display: block;
    padding: 12px 20px;
    color: #37474f;
    text-decoration: none;
    border-top: 1px solid #e0e0e0;
    transition: background 0.2s, color 0.2s;
}

.user-menu a:hover {
    background: #f5f5f5;
    color: #26a69a;
}

.btn-connexion,
.btn-inscription {
    padding: 8px 16px;
    border: 1px solid #26a69a;
    background: white;
    text-decoration: none;
    color: #26a69a;
    font-weight: 500;
    border-radius: 4px;
    font-size: 0.95em;
    transition: all 0.3s;
}

.btn-connexion:hover,
.btn-inscription:hover {
    background: #26a69a;
    color: white;
}


/* Authentification */
.auth-container {
    width: 30%;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-title {
    text-align: center;
    color: #1e3d33;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.auth-title:after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: #26a69a;
    margin: 15px auto 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Boutons */

.bouton-details,
.bouton-acheter,
.bouton-remplir {
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s;
}

.bouton-details {
    background: white;
    color: #26a69a;
    border: 1px solid #26a69a;
}

.bouton-details:hover {
    background: #26a69a;
    color: white;
}

.bouton-acheter {
    background: #26a69a;
    color: white;
    border: 1px solid #26a69a;
}

.bouton-acheter:hover {
    background: #1e7d74;
    border-color: #1e7d74;
}

.bouton-remplir {
    background: #4caf50;
    color: white;
    border: 1px solid #4caf50;
}

.bouton-remplir:hover {
    background: #3d8b40;
    border-color: #3d8b40;
}

.credits-insuffisants {
    font-size: 0.8em;
    color: #e74c3c;
    font-weight: normal;
    margin-left: 5px;
}

.bouton-paiement.credits {
    background-color: #ff9800;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bouton-paiement.credits:hover {
    background-color: #e68a00;
}



.auth-button {
    padding: 12px;
    background: #26a69a;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.auth-button:hover {
    background: #1e7d74;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95em;
}

.auth-links a {
    color: #26a69a;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Lien vers l'autre page (inscription/connexion) */
.switch-link {
    text-align: center;
    margin-top: 20px;
    color: #546e7a;
}

.switch-link a {
    color: #26a69a;
    text-decoration: none;
    font-weight: 500;
}

.switch-link a:hover {
    text-decoration: underline;
}

footer {
    flex-shrink: 0; /* Empêche le footer de rétrécir */
    background: #1e3d33;
    color: white;
    padding: 30px 20px;
    text-align: center;
    margin-top: auto; /* Pousse le footer en bas */
}

/* Responsive */
@media (max-width: 600px) {
    .auth-container {
        margin: 20px;
        padding: 20px;
    }
}

/* Bandeau de présentation */
.banniere {
    background: linear-gradient(135deg, #e0f2f1 0%, #99a4f9 100%);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.banniere h1 {
    margin: 0 0 15px 0;
    color: #1e3d33;
    font-size: 2em;
}

.banniere p {
    margin: 0;
    color: #37474f;
    font-size: 1.1em;
}


.bandeau_pied {
    max-width: 1200px;
    margin: 0 auto;
}

.liens_pied ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
    gap: 20px;
}

.liens_pied ul li a {
    color: #b2ebf2;
    text-decoration: none;
    transition: color 0.3s;
}

.liens_pied ul li a:hover {
    color: white;
}

footer p {
    color: #b2ebf2;
    margin: 0;
    font-size: 0.9em;
}


/* Tableau comparatif */
.full-width-section {
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 30px;
}
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 12px;
}
.comparison-table th,
.comparison-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.comparison-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}
/* FAQ */
.faq-title {
    text-align: center;
    color: #2c3e50;
    margin: 0 0 20px;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:after {
    content: '+';
    font-size: 1.5em;
    transition: transform 0.3s;
}

.faq-question.active:after {
    content: '-';
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: white;
}

.faq-answer.active {
    padding: 15px;
    max-height: 500px;
}

/*Mentions legales*/
.mention-container section
{
    padding: 15px 15px;
}

/* Grilles des livres et formulaires */
.grille-livres,
.grille-formulaires {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.carte-livre,
.carte-formulaire {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.carte-livre:hover,
.carte-formulaire:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carte-livre img {
    max-width: 100%;
    height: auto;
    margin-bottom: 12px;
    border-radius: 4px;
}

.carte-livre h3,
.carte-formulaire h3 {
    color: #1e3d33;
    font-size: 1.1em;
    margin-bottom: 10px;
    line-height: 1.3;
}

.carte-livre p,
.carte-formulaire p {
    color: #546e7a;
    margin-bottom: 15px;
    font-size: 0.95em;
}


/* Grille responsive pour les cartes */

.grille-coloriages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.coloriage-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.coloriage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.coloriage-img {

    height: 180px;
    margin: auto;
    display: block;
}

.difficulte {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    color: white;
    margin: 10px 0;
}

.facile { background-color: #4CAF50; }
.moyen { background-color: #FFC107; color: black; }
.difficile { background-color: #F44336; }


.bouton-telecharger {
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    display: block;
    margin: 10px auto;
    font-weight: bold;
    cursor: pointer;
    width: 80%;
    text-align: center;    
}
.bouton-telecharger:hover {
    background: #218838;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    display: block;
}

.modal-image-large {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

/*---------------filtres-----------------*/
 .filtres-container {
    text-align: center;
    margin: 20px auto;
    max-width: 500px;
}

.filtres-container label {
    margin-right: 10px;
    font-weight: bold;
    color: #333;
}

.filtres-container select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: white;
    margin-left: 10px;
}

/* Bandeau de statut utilisateur */
.statut-bandeau {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 15px auto;
    max-width: 1200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.statut-texte {
    font-size: 1.1em;
    margin: 0 10px;
}
.statut-connexion {
    display: flex;
    align-items: center;
}
.abonne-badge {
    background: #28a745;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-left: 10px;
}
.credits-badge {
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-left: 10px;
}
.bouton-connexion {
    background: #28a745;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin-left: 10px;
}
.bouton-connexion:hover {
    background: #218838;
}

/* Message d'offre spéciale */
.offre-speciale {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe9d6 100%);
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px auto;
    max-width: 1200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #ffd7a9;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.offre-texte {
    font-size: 1.1em;
    color: #d35400;
    flex: 1;
    text-align: left;
    margin-right: 15px;
}
.offre-bouton {
    background: #e67e22;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin: 5px;
}
.offre-bouton:hover {
    background: #d35400;
}
.cadeau-icon {
    color: #e67e22;
    font-size: 1.5em;
    margin-right: 10px;
}
@media (max-width: 768px) {
    .statut-bandeau, .offre-speciale {
        flex-direction: column;
        text-align: center;
    }
    .offre-texte {
        text-align: center;
        margin-right: 0;
        margin-bottom: 10px;
    }
}
