/* Variables CSS pour la cohérence */
:root {
    --primary-color: #07251f;
    --secondary-color: #375346;
    --accent-color: #dda15e;
    --light-color: #eaf9e1;
    --background-light: #f9f4f1;
    --text-dark: #333;
    --text-gray: #6b6b6b;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */

/* =================================
   HEADER STYLES
   ================================= */
#header {
    display: flex;
    justify-content: space-between;  /* Met le logo à gauche et le menu à droite */
    align-items: center;  /* Centre le contenu verticalement */
    width: 100%;
    background-color: #07251f;
    height: 5em;
    color: #eaf9e1;   
}

#logo_header {
    width: 5em;
    padding-left: 10em;
}

/* Menu burger */
#menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    transform: translateY(+80%);
    width: 2rem;
    height: 2rem;
    z-index: 1000;
}

.menu-icon span,
.menu-icon span::before,
.menu-icon span::after {
    display: block;
    background-color: white;
    height: 3px;
    width: 2rem;
    border-radius: 2px;
    position: absolute;
    transition: all 0.3s ease-in-out;
}

.menu-icon span::before {
    content: '';
    top: -0.6rem;
}

.menu-icon span::after {
    content: '';
    top: 0.6rem;
}

#menu-toggle:checked + .menu-icon span {
    background-color: transparent;
}

#menu-toggle:checked + .menu-icon span::before {
    transform: rotate(45deg);
    top: 0;
}

#menu-toggle:checked + .menu-icon span::after {
    transform: rotate(-45deg);
    top: 0;
}

#menu {     
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #07251f;
    position: absolute;
    font-family: "Roboto", sans-serif;
    font-style: normal;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 999;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    margin-right: 8em;
}

#menu-toggle:checked ~ #menu {
    transform: translateY(0);
}

#liste {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

#liste li {
    margin: 1rem 0;
}

#liste a {
    text-decoration: none;
    color: #eaf9e1;
    font-size: 1.5rem;
}

#liste a:hover {
    color: #dda15e;
}

.menu > li {
  margin: 0 1rem;
  overflow: hidden;
}

.menu-button-container {
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#menu-toggle {
  display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
  display: block;
  background-color: #fff;
  position: absolute;
  height: 4px;
  width: 30px;
  transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 2px;
}

.menu-button::before {
  content: '';
  margin-top: -8px;
}

.menu-button::after {
  content: '';
  margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
  margin-top: 0px;
  transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
  background: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
  margin-top: 0px;
  transform: rotate(-405deg);
}



/* =================================
   RESPONSIVE DESIGN
   ================================= */

/* Mobile (jusqu'à 767px) */
@media screen and (max-width: 767px) {
    #header {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding: 1em 0;
        position: relative;
    }

    .menu-button-container {
        display: flex;
    }

    .menu {
        position: absolute;
        top: 0;
        margin-top: 50px;
        left: 0;
        flex-direction: column;
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    #menu-toggle ~ .menu li {
        height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    #menu-toggle:checked ~ .menu li {
        border: 1px solid #333;
        height: 2.5em;
        padding: 0.5em;
        transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
    }

    .menu > li {
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 0.5em 0;
        width: 100%;
        color: white;
        background-color: #222;
    }

    .menu > li:not(:last-child) {
        border-bottom: 1px solid #444;
    }

    .menu-icon {
        display: block;
    }

    #menu {
        padding: 0;
        display: flex;
    }

    #liste {
        flex-direction: column;
        display: block;
    }

    #logo_header {
        width: 4rem;
        transform: translate(-30%, 0%);
        padding-left: 0;
    }

    #liste li {
        margin: 0.5em 0;
    }
}

/* Tablette (768px à 1146px) */
@media screen and (min-width: 768px) and (max-width: 1146px) {
    #logo_header {
        width: 4rem;
        padding-left: 5em;
    }

    #menu {
        font-size: 1rem;
    }
}

/* Desktop (769px et plus) */
@media screen and (min-width: 769px) {
    #menu {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        background-color: transparent;
        position: static;
        transform: none;
        height: auto;
        width: auto;
        margin-right: 0;
    }

    .menu-icon {
        display: none;
    }

    #liste {
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 0;
        flex-direction: row;
    }

    #liste li {
        margin: 0 2em;
    }

    #liste a {
        font-size: 1rem;
        color: var(--header-text);
    }
}

/* Large screens (1200px+) */
@media screen and (min-width: 1200px) {
    #header {
        padding: 0 2rem;
    }

    #logo_header {
        padding-left: 5em;
    }
}

/* =================================
   ACCESSIBILITY & INTERACTIONS
   ================================= */

/* Focus visible pour l'accessibilité */
#liste a:focus-visible,
.menu-icon:focus-visible {
    outline: 2px solid var(--header-accent);
    outline-offset: 2px;
}

/* Amélioration des zones de clic */
#liste a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation douce pour les transitions */
@media (prefers-reduced-motion: reduce) {
    #menu,
    .menu-icon span,
    .menu-icon span::before,
    .menu-icon span::after,
    #liste a {
        transition: none;
    }
}

/* =================================
   UTILITIES POUR LE HEADER
   ================================= */

/* Classe pour masquer le header */
.header-hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

/* Classe pour le header sticky */
.header-sticky {
    position: sticky;
    top: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Classe pour le header avec backdrop blur */
.header-blur {
    backdrop-filter: blur(10px);
    background-color: rgba(7, 37, 31, 0.9);
}

/* Animation d'entrée pour le header */
@keyframes headerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-animate {
    animation: headerSlideDown 0.5s ease-out;
}

/* =================================
   PRINT STYLES
   ================================= */

@media print {
    #header,
    #menu,
    .menu-icon {
        display: none !important;
    }
}

/* Navigation moderne */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    position: relative;
    z-index: 1001;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--light-color);
    height: 3px;
    width: 100%;
    border-radius: 2px;
    position: absolute;
    transition: var(--transition);
}

.nav-toggle-label span::before {
    content: '';
    top: -8px;
}

.nav-toggle-label span::after {
    content: '';
    top: 8px;
}

.nav-toggle:checked + .nav-toggle-label span {
    background: transparent;
}

.nav-toggle:checked + .nav-toggle-label span::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle:checked + .nav-toggle-label span::after {
    transform: rotate(-45deg);
    top: 0;
}

.navigation {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navigation a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.navigation a:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.navigation .social-link {
    font-size: 1.2rem;
    padding: 0.5rem;
}

/* Message de succès */
.success-message {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 1rem;
    text-align: center;
    border-radius: var(--border-radius);
    margin: 1rem;
    box-shadow: var(--shadow);
    display: none;
}
        
.main-container {        
    flex: 1;
    display: flex;
    align-items: flex-start; /* Alignement en haut au lieu de stretch */
    gap: 0; /* Pas d'espace entre les sections */
}

/* Section image */
.image-section {
    flex: 1;
    background: url('/IMG/IMG_1011.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 400px; /* Hauteur minimale réduite */
    height: auto; /* Hauteur automatique basée sur le contenu adjacent */
    align-self: stretch; /* S'étire pour correspondre à la hauteur du contenu */
}

/* Section contenu */
.content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    background-color: var(--background-light);
    /*overflow-y: auto;*/
}

/* Container pour centrer le contenu sur desktop */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 100%;
}

/* Disclaimer optimisé */
.disclaimer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    line-height: 1.8;
    transition: all 0.3s ease;
}

.disclaimer h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.disclaimer p {
    margin-bottom: 1rem;
}

.disclaimer-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    box-shadow: var(--shadow);
}

.disclaimer-button:hover {
    background: #c8935a;
    transform: translateY(-2px);
}

/* Formulaire modernisé */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.form-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.form-divider {
    width: 4rem;
    height: 3px;
    background: var(--accent-color);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e1e1;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(55, 83, 70, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    appearance: none;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px dashed #ccc;
    border-radius: var(--border-radius);
    background: #f9f9f9;
    cursor: pointer;
    transition: var(--transition);
}

.file-input-label:hover {
    border-color: var(--secondary-color);
    background: #f0f0f0;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.checkbox {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--secondary-color);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--secondary-color);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.submit-button {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    font-family: 'Playfair Display', serif;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.submit-button:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background-color: var(--background-light);
    color: var(--text-dark);
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    border-top: 1px solid #e1e1e1;
    margin-top: auto;
}

.footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Classes utilitaires */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Media Queries optimisées */

/* Mobile (jusqu'à 768px) */
@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }

    .navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .nav-toggle:checked ~ .navigation {
        transform: translateX(0);
    }

    .navigation a {
        font-size: 1.2rem;
        padding: 1rem 2rem;
    }

    .main-container {
        flex-direction: column;
        min-height: auto;
    }

    .image-section {
        display: none;
    }

    .content-section {
        padding: 1rem;
    }

    .disclaimer {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-input,
    .form-textarea,
    .form-select {
        font-size: 16px; /* Évite le zoom sur iOS */
    }

    .footer {
        padding: 1.5rem 1rem;
    }
}

/* Tablette (769px à 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 0 2rem;
    }

    .main-container {
        min-height: auto;
    }

    .content-section {
        padding: 2rem 1.5rem;
    }

    .form-section {
        padding: 2rem 1.5rem;
    }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
    .header-container {
        padding: 0 2rem;
    }

    .main-container {
        min-height: auto;
    }

    .content-section {
        padding: 3rem;
        justify-content: flex-start;
    }

    .content-wrapper {
        justify-content: center;
    }

    .form-section {
        padding: 3rem;
    }

    .image-section {
        background-attachment: fixed;
    }
}

/* Styles pour les écrans plus larges (ordinateurs) */
@media screen and (min-width: 769px) {
    .navigation {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        background-color: transparent;
        position: static;
        transform: none;
        height: auto;
        width: auto;
    }

    .nav-toggle-label {
        display: none;
    }

    .navigation {
        display: flex;
        justify-content: center;
        margin: 0;
        padding: 0;
    }

    .navigation li {
        margin: 0 2em;
    }

    .navigation a {
        font-size: 1rem;
        color: var(--light-color);
    }
}

/* Mode paysage mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .main-container {
        flex-direction: row;
        min-height: auto;
    }

    .image-section {
        display: block;
        flex: 0.4;
    }

    .content-section {
        flex: 0.6;
        padding: 1rem;
    }

    .disclaimer {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 1rem;
    }
}

/* Animations et micro-interactions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section.visible {
    animation: fadeInUp 0.6s ease;
}

/* Styles additionnels pour le drag & drop */
.file-input-wrapper.drag-over .file-input-label {
    border-color: var(--secondary-color);
    background: #f0f8f0;
    transform: scale(1.02);
}

.form-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
}

.form-input:valid:not(:focus):not(:placeholder-shown) {
    border-color: #27ae60;
}

/* Messages d'erreur */
.error-message {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}