/* ==========================================================
   🎯 STYLES GÉNÉRAUX - LE CHEMIN DE LA CANNE À SUCRE
   ========================================================== */

/* Réinitialisation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Police pirate personnalisée */
@font-face {
    font-family: 'Pieces of Eight';
    src: url('/fonts/Pieces of Eight.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Police secondaire */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&display=swap');

/* Corps général */
body {
    font-family: 'IM Fell English SC', serif;
    background-color: #121212;
    background-image: url('/images/fond.jpeg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #f5deb3;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Conteneur principal */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================
   🏴 HEADER & BANNIÈRE
   ========================================================== */

header.bandeau {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url("/images/banccs.png") no-repeat center top;
    background-size: cover;
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 10;
}

header.bandeau h1 {
    font-family: 'Pieces of Eight', cursive;
    font-size: 2.4rem;
    color: #fff;
    text-shadow: 2px 2px 5px #000;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

@media (max-width: 768px) {
    header.bandeau {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
        background-position: center top;
    }

    header.bandeau h1 {
        font-size: 1.3rem;
        padding: 0 10px;
        white-space: nowrap;
    }
}

/* ==========================================================
   🔐 BANDEAU D'AUTHENTIFICATION
   ========================================================== */

.auth-links {
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 0.5rem;
    border-top: 3px solid #daa520;
}

.auth-links a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #daa520;
    color: #121212;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.auth-links a:hover {
    background-color: #f5deb3;
    color: #000;
}

/* ==========================================================
   🧭 NAVIGATION
   ========================================================== */

nav {
    background-color: rgba(0, 0, 0, 0.8);
    border-bottom: 3px solid #daa520;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 5;
    margin-top: 0;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #f5deb3;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
}

nav ul li a:hover {
    background-color: #555;
    border-radius: 4px;
    color: #fff;
}

/* Bouton menu mobile */
.menu-toggle {
    display: none;
    width: 100%;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.8);
    color: #f5deb3;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        display: none;
    }

    nav ul.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* ==========================================================
   🧱 CONTENU PRINCIPAL
   ========================================================== */

main {
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background: transparent !important;
}

section {
    width: 100%;
    max-width: 800px;
    background: rgba(0, 0, 0, 0.95);
    border: 3px solid #daa520;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
}

.no-border {
    border: none !important;
    box-shadow: none !important;
    padding: 1rem;
}

/* ==========================================================
   📋 TABLEAUX
   ========================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    color: #f5deb3;
    margin-top: 1rem;
}

table th, table td {
    border: 2px solid #daa520;
    padding: 15px;
    text-align: center;
}

table th {
    background-color: #daa520;
    color: #121212;
    font-size: 1.2rem;
}

table tbody tr:nth-child(even) { background-color: #1c1c1c; }
table tbody tr:nth-child(odd)  { background-color: #000; }
table tbody tr:hover { background-color: #333; }

.planning-table, .planning-table th, .planning-table td {
    border: none !important;
    padding: 10px;
}

/* ==========================================================
   📝 FORMULAIRES
   ========================================================== */

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

label {
    text-align: left;
    font-weight: bold;
    color: #f5deb3;
}

input, button, select, textarea {
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background-color: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #daa520;
}

button {
    background-color: #daa520;
    color: #000;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #f5deb3;
}

/* Bouton Réinitialiser */
.reset-button {
    margin: 20px auto;
    display: block;
    padding: 10px 20px;
    background-color: red;
    color: white;
    font-size: 1.2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.reset-button:hover { background-color: darkred; }

/* ==========================================================
   ⚓ FOOTER
   ========================================================== */

footer {
    text-align: center;
    padding: 1rem;
    background: transparent !important;
    color: #f5deb3;
    border: none;
    z-index: 100;
    position: relative;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent !important;
}

.footer-container .social-icons {
    margin-bottom: 10px;
}

.footer-container .social-icons img {
    width: 80px;
    height: 80px;
    margin: 0 5px;
    background: none !important;
}

.footer-container .footer-text p { margin: 0; }

/* ==========================================================
   📱 ADAPTATIONS MOBILES
   ========================================================== */

@media (max-width: 768px) {
    header h1 { font-size: 1.5em; letter-spacing: 1px; }
    section { padding: 1rem; margin-bottom: 1rem; }
    main { padding: 0.5rem; }
}

@media (max-width: 480px) {
    header h1 { font-size: 1.2em; letter-spacing: 0.5px; }
    section { padding: 0.5rem; margin-bottom: 0.5rem; }
    main { padding: 0.25rem; }
}

/* ==========================================================
   🧩 PATCH FINAL UNIQUE - FOND GLOBAL + FOOTER TRANSPARENT
   ========================================================== */

html, body {
  background-image: url('/images/fond.jpeg') !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  background-position: center !important;
  background-color: #000 !important;
}

/* Footer toujours transparent */
footer,
footer *,
.footer-container,
.footer-text {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* ==========================================================
   ✅ CORRECTION MENU MOBILE - Hauteur et alignement
   ========================================================== */

@media (max-width: 768px) {
  /* Le menu ne monte plus au-dessus du bandeau */
  nav {
    height: auto;
    padding: 0;
    margin-top: 0;
  }

  /* Le bouton ☰ reste visible, sans excès de fond noir */
  .menu-toggle {
    display: block;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: #f5deb3;
    border: none;
    padding: 12px;
    font-size: 1.5rem;
    text-align: left;
  }

  /* Menu masqué par défaut */
  nav ul {
    display: none;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.9);
    width: 100%;
  }

  /* Menu affiché seulement quand actif */
  nav ul.active {
    display: flex;
    position: relative;
    top: 0;
    z-index: 100;
  }

  /* Empêche le fond du menu de remonter au-dessus du titre */
  nav::before {
    content: "";
    display: block;
    height: 0;
  }
}
