/* ====== Base ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Lora', serif;
}

body {
  background-color: #9B1C2F;
  color: #5C5C5C;
  padding: 0 10px;
  overflow-x: hidden;
}

.cadre-total {
  background-color: #D9CBA7;
  max-width: 1100px;
  margin: 20px auto;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ====== Header & Nav ====== */
header {
  background-color: #9B1C2F;
  padding: 20px 0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav a {
  color: #F1E6D6;
  text-decoration: none;
  font-size: 1.2em;
  font-family: 'Playfair Display', serif;
  text-transform: uppercase;
  margin: 10px 20px;
  transition: all 0.3s ease;
}

nav a.active,
nav a:hover {
  color: #FFF;
  text-decoration: underline;
}

/* ========== Section inscription (titre) ======== */
.inscription-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.inscription-section h1 {
    font-family: 'Playfair Display', serif;
    color: #9B1C2F;
    font-size: 1.8em;
    margin-bottom: 5px;
    text-shadow: 0 0 20px #f5f5dc;
    margin-left: 0; /* Réduit la marge à 0 sur petits écrans */
}

/* ========== Formulaire ========== */
form {
    background-color: #F1E6D6;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    max-width: 900px;
    width: 100%; /* Prendre toute la largeur disponible */
    margin: 0 auto;
    border: 3px solid #fff;
}

fieldset {
    border: none;
    margin-bottom: 20px;
}

legend {
    font-weight: bold;
    font-size: 1.2em;
    color: #9B1C2F;
    margin-bottom: 10px;
}

/* Disposition grille pour les champs */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 15px;
    justify-items: center; /* Centrer les champs */
}

/* Formulaire groupé */
.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 15px;
    width: 100%; /* S'assurer que les champs prennent toute la largeur disponible */
    max-width: 350px; /* Limite la largeur des champs */
    margin: 0 auto;  /* Centre les champs */
}

label {
    font-weight: bold;
    color: #9B1C2F;
    margin-bottom: 10px;
    text-align: left;
    width: 100%;
}

input {
    padding: 8px;
    border-radius: 8px;
    border: 1.5px solid #9B1C2F;
    font-size: 1em;
    font-family: 'Roboto', Arial, sans-serif;
    color: #5C5C5C;
    transition: border-color 0.3s ease;
    width: 100%; /* S'assurer que les champs de saisie prennent toute la largeur */
}

input:focus {
    outline: none;
    border-color: #800020;
    box-shadow: 0 0 5px rgba(155, 28, 47, 0.6);
}

.btn-inscrire {
  display: inline-block;
  background-color: #9B1C2F;
  color: #F1E6D6;
  font-size: 1.2em;
  font-family: 'Playfair Display', serif;
  padding: 12px 30px;
  border: 2px solid #9B1C2F;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 300px;
  width: 100%;
  margin: 20px auto;
}

.btn-inscrire:hover {
  background-color: #F1E6D6;
  color: #9B1C2F;
  transform: scale(1.1);
  text-decoration: underline;
}

/* ========== Footer ========== */
footer {
    background-color: #9B1C2F;
    color: #F1E6D6;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    font-family: 'Lora', serif;
    line-height: 1.5;
    margin-top: 40px;
    border-radius: 10px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

footer p {
    color: #F1E6D6;
    font-size: 0.9em;
    margin: 0;
    padding: 0;
}

/* ====== Responsive ====== */

/* Jusqu'à 1024px */
@media (max-width: 1024px) {
    .inscription-section h1 {
        margin-left: 0; /* Pas de marge à gauche pour les écrans moyens */
        font-size: 1.6em; /* Réduit légèrement la taille du titre */
    }

    .form-grid {
        grid-template-columns: 1fr; /* Les champs prennent toute la largeur */
    }
}

/* Jusqu'à 768px */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr; /* Passe à une seule colonne */
        gap: 20px; /* Réduit l'espace entre les champs */
    }

    .form-group {
        max-width: 90%;  /* Les champs prennent une largeur de 90% */
        margin: 0 auto;  /* Centrer les champs */
    }

    .btn-inscrire {
        width: 90%;  /* Le bouton prend 90% de la largeur */
        max-width: none; /* Désactive la limite de largeur */
    }

    .inscription-section h1 {
        font-size: 1.5em; /* Réduit la taille du titre */
    }
}

/* Jusqu'à 600px */
@media (max-width: 600px) {
    .inscription-section h1 {
        font-size: 1.3em;  /* Taille plus petite sur les très petits écrans */
        margin-left: 0; /* Pas de marge à gauche */
    }

    .form-grid {
        grid-template-columns: 1fr;  /* Une seule colonne */
        gap: 15px;  /* Réduit l'espace entre les champs */
    }

    .form-group {
        max-width: 100%;  /* Les champs prennent toute la largeur */
    }

    .btn-inscrire {
        width: 100%;  /* Le bouton prend toute la largeur */
    }
}