/* ========================================================================= */
/* --- 1. Style Global (Body, Réinitialisation) --- */
/* ========================================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Times New Roman", serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ========================================================================= */
/* --- 2. Header (Navigation) --- */
/* (Style extrait de header.php) */
/* ========================================================================= */

header {
    width: 100%;
    background: linear-gradient(to right, white, #4FBEFF);
    color: black;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 20px;
    flex-wrap: wrap;
}

header img {
    max-height: 100px;
    margin-right: 30px;
}

header .texte-contenu {
    flex-grow: 1;
    text-align: center;
    min-width: 0;
}

header .texte-contenu h1 {
    color: inherit;
    margin: 0;
    font-size: clamp(1.5em, 5vw, 2em);
}

header .texte-contenu span {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
}

header a {
    text-decoration: none;
    color: black;
}

/* ========================================================================= */
/* --- 3. Main (Contenu Principal) --- */
/* ========================================================================= */

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2em;
    text-align: center; /* Centré par défaut pour les boutons et formulaires */
    background-image: url('Fond01.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    gap: 25px;
}


/* ========================================================================= */
/* --- 4. Pied de Page (Footer) --- */
/* Utilise le dégradé inversé de Part.php */
/* ========================================================================= */

footer {
    /* Dégradé de bas en haut (couleur vers blanc) */
    background: linear-gradient(to top, #4FBEFF 5%, white 95%); 
    padding: 1em;
    text-align: center;
    width: 100%;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.5); 
}

footer p {
    font-size: clamp(0.6em, 2vw, 0.8em); /* Utilisation de la taille responsive de Part.php */
    color: black;
    font-family: "Times New Roman", serif;
    word-wrap: break-word;
}

footer a {
    text-decoration: none;
    color: black;
}

/* ========================================================================= */
/* --- 5. Styles de la page Default.php (Boutons Principaux) --- */
/* ========================================================================= */

.promo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 720px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.main-cta-button {
    width: 90%;
    padding: 20px 30px;
    cursor: pointer;
    background: linear-gradient(to right, white, #4FBEFF);
    color: black;
    border: 1px solid black;
    border-radius: 8px;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.button-01 {
    width: 60%;
    padding: 10px 20px;
    cursor: pointer;
    background: linear-gradient(to right, white, #4FBEFF);
    color: black;
    border: 1px solid black;
    border-radius: 8px;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    font-size: clamp(1.2em, 3.5vw, 1.5em);
    font-weight: bold;
    line-height: 1.4;
    margin-top: 15px;
}

.button-01:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}


.main-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.main-cta-button .button-text {
    font-size: clamp(1.2em, 3.5vw, 1.8em);
    font-weight: bold;
    line-height: 1.4;
}

.secondary-cta-button {
    width: 70%;
    padding: 15px 25px;
    border: 1px solid black;
    border-radius: 8px;
    text-align: center;
    background: linear-gradient(white 5%, #ebedef 95%);
    text-decoration: none;
    color: black;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 15px;
    position: relative;
    left: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.secondary-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.secondary-cta-button h2 {
    font-size: clamp(1.3em, 3vw, 1.6em);
    font-weight: bold;
    margin-bottom: 5px;
}

.secondary-cta-button h3 {
    font-size: clamp(1em, 2.5vw, 1.3em);
    font-weight: normal;
    margin-bottom: 5px;
}

.secondary-cta-button p {
    font-style: italic;
    font-size: clamp(0.9em, 2vw, 1.1em);
    line-height: 1.3;
}

.quiz-promo-image {
    width: 100%;
    max-width: 700px;
    height: auto;
    border: 1px solid black;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quiz-promo-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}


/* ========================================================================= */
/* --- 6. Styles des Conteneurs et Formulaires (Mentions_Legales.php / Part.php / succes.php) --- */
/* ========================================================================= */

/* Conteneurs généraux pour les pages à contenu (Mentions Légales, Formulaire, Succès) */
.mentions-container, .success-message-container, .form-container, .contact-form-container {
    width: 90%;
    max-width: 800px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.9); /* Par défaut pour les pages de contenu (Mentions Légales/Succès) */
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: left;

}

/* Styles spécifiques au formulaire pour avoir un fond blanc uni */
.form-container, .contact-form-container {
    max-width: 550px; /* Taille optimale pour un formulaire */
    padding: 30px; /* Légèrement réduit pour le formulaire */
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2); /* Ombre plus marquée */
    margin-bottom: 20px;
}

/* Style spécifique pour le conteneur de message de succès */
.success-message-container {
    max-width: 600px; /* Réduction de la largeur pour un message d'alerte */
    background-color: rgba(255, 255, 255, 0.95); /* Légèrement moins transparent */
    text-align: center; /* Surcharge le text-align: left du bloc général */
}

/* Styles des éléments de la page de succès */
.success-message-container h2 {
    font-size: clamp(2em, 5vw, 2.5em);
    color: #4CAF50; /* Vert pour le succès */
    margin-bottom: 20px;
    /* Suppression des styles hérités de mentions-container h1/h2 */
    border-bottom: none;
    padding-bottom: 0;
}

.success-message-container p {
    font-size: clamp(1em, 3vw, 1.2em);
    line-height: 1.6;
    color: #333;
}


/* Entêtes dans les pages de contenu */
.mentions-container h1, .mentions-container h2 {
    color: #0056b3;
    text-align: center;
}

.mentions-container h2 {
    margin-top: 20px;
    border-bottom: 2px solid #4FBEFF;
    padding-bottom: 5px;
}

.mentions-container p {
    margin-top: 15px;      /* Ajoute l'interligne (marge) AVANT le paragraphe */
    margin-bottom: 15px;   /* Marge APRES le paragraphe */
    color: #333;           /* Couleur du texte */
}

.form-container h3, .contact-form-container h3 {
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    color: #333;
    font-size: clamp(1.5em, 4vw, 2em);
    margin-bottom: 25px;
    font-weight: bold;
}

/* Styles des champs de formulaire */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-family: "Times New Roman", Times, serif;
    color: #444;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px; /* Bords arrondis de Part.php */
    border: 1px solid #ccc;
    font-size: 1em;
    font-family: "Times New Roman", Times, serif;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #4FBEFF;
    box-shadow: 0 0 8px rgba(79, 190, 255, 0.6);
}
    
.form-group .required-star {
    color: red;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-group label {
    font-weight: normal;
    font-family: "Times New Roman", Times, serif;
    font-size: 0.95em;
}

.form-submit-btn {
    background: #4FBEFF;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 25px; /* Bords arrondis de Part.php */
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-submit-btn:hover {
    background-color: #38a5e3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
    
.disclaimer-text {
    font-size: 0.8em;
    color: #555;
    margin-top: 15px;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
}


/* ========================================================================= */
/* --- 7. Media Queries (Réactivité) --- */
/* ========================================================================= */

/* Pour les écrans de taille moyenne (Tablettes et mobile landscape) */
@media screen and (max-width: 768px) {
    /* Styles Header */
    header {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    header img {
        margin-right: 0;
        margin-bottom: 10px;
        max-height: 70px;
    }

    header .texte-contenu {
        min-width: 100%;
    }

    header .texte-contenu h1 {
        font-size: 1.5em;
    }

    header .texte-contenu span {
        font-size: 0.7em;
    }

    /* Styles Footer */
    footer p {
        font-size: 0.7em;
        word-wrap: break-word;
    }

    /* Styles Main */
    main {
        padding: 1em;
    }

    /* Ajustements pour les boutons de Default.php */
    .main-cta-button, .secondary-cta-button {
        width: 95%;
    }

    /* Ajustements pour les conteneurs de contenu/formulaire */
    .mentions-container, .success-message-container, .form-container, .contact-form-container {
        width: 95%;
        padding: 20px;
    }

    .form-group input, .form-group textarea, .form-submit-btn {
        padding: 12px 15px;
    }

    .checkbox-group label {
        font-size: 0.85em;
    }
}

/* Pour les écrans encore plus petits (mobiles très étroits) */
@media screen and (max-width: 480px) {
    header .texte-contenu h1 {
        font-size: 1.3em;
    }
    header .texte-contenu span {
        font-size: 0.8em;
    }
    .form-container h3, .contact-form-container h3 {
        font-size: 1.4em;
    }
    /* Ajout de la règle de succès pour la réactivité sur mobile */
    .success-message-container h2 {
        font-size: 2em;
    }
    .success-message-container p {
        font-size: 1em;
    }
    .form-submit-btn {
        font-size: 1em;
        padding: 12px 20px;
    }
    .return-home-button, .return-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}
