section[id] {
    scroll-margin-top: 70px; /* Ajustez cette valeur selon la hauteur de votre header */
}
:root {
    --primary-color: #fff;
    --primary-dark: #1260d7;
    --primary-light: #4d94ff;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --light-text: rgb(22, 22, 22);
    --menu-text: #f8f9fa;
    --icon-color: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sansation', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
}

h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 0.6em 0 1rem;
}
section h1,
article h1 {
  font-size: 2.2rem;
  line-height: 1.2;
}

/* === Normalisation du <h1> dans le HERO (une seule source de vérité) === */
.hero h1 {
  font-size: 2rem !important;
  margin-bottom: 0.5rem;
  text-align: left;
}
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem !important; }
}
@media (max-width: 576px) {
  .hero h1 { font-size: 1.4rem !important; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Sansation', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 20px;
}

/* Header */
header {
    background-color: var(--primary-dark);
    color: var(--menu-text);
    padding: 0rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--box-shadow);
}

.header-content {
    display: flex;
    align-items: center;
}

/* Logo */
.logo {
    max-width: 180px;
    height: auto;
}
@media (max-width: 768px) {
    .logo {
        max-width: 120px;
    }
}

nav {
    margin-left: auto;
}
nav ul {
    display: flex;
    list-style: none;
}
nav ul li {
    margin-left: 1rem;
}
nav ul li a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--menu-text);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}
nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-dark);
    bottom: 0;
    left: 0;
    transition: var(--transition);
}
nav ul li a:hover:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1002;
    position: absolute;
    right: 20px;
}

/* Styles pour mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
    }
    nav ul {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--primary-dark);
        flex-direction: column;
        align-items: stretch;
        padding-top: 60px;
        z-index: 1001;
        transition: right 0.3s ease;
    }
    nav ul.active {
        display: block !important;
        right: 0;
    }
    nav ul li a {
        padding: 1rem;
        width: 100%;
        text-align: center;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--light-text);
    padding: 1rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.3" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
    margin: 0 auto;
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: left;
}
.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: var(--light-text);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services {
    background-color: var(--secondary-color);
}
.section-padding {
    padding: 2rem 0;
}
.section-light {
    background-color: var(--secondary-color);
}
.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}
.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-dark);
    margin: 1rem auto 0;
    border-radius: 2px;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.service-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #c0c0c0;
    padding: 0.3rem;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #a0a0a0;
}
.service-icon {
    background-color: var(--primary-light);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    color: var(--icon-color);
    font-size: 3rem;
    padding: 1rem 0;
    text-align: center;
}
.service-mini-text {
    font-size: 0.8rem;
}
.service-content {
    text-align: center;
    margin-top: 0rem;
}

/* About Section */
.about {
    background-color: var(--secondary-color);
}
.about-grid {
    display: flex;
    flex-direction: column;
    align-items: left;
}
.about-image {
    position: relative;
}
.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.about-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}
.about-content h2 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}
.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.about-frame {
    border: 2px solid #0057A0;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 0;
    background-color: rgba(0, 87, 160, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.feature-icon {
    color: var(--primary-dark);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.feature-text {
    margin: 0;
}

/* Partners Section */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
    padding: 1rem 0;
}
.partner-card {
    background: #fff;
    border-radius: 15px;
    padding: 0.1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}
.partner-card:hover {
    transform: translateY(-5px);
}
.partner-logo {
    width: 300px;
    height: 150px;
    margin: 0 auto 0.5rem;
    overflow: hidden;
}
.partner-info {
    margin-top: 0.5rem;
}

/* Contact Section */
.contact {}
.contact-form {
    background-color: #fff;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 800px;
    margin: 0 auto;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Roboto', sans-serif;
    transition: var(--transition);
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    transition: all 0.3s ease;
}
.form-control.input-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}
.input-error {
    border-color: #dc3545 !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--menu-text);
    padding: 3rem 0 1rem;
}
footer a {
    color: var(--menu-text);
    text-decoration: none;
    transition: color 0.2s;
}
footer a:hover {
    color: var(--primary-light);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    header { padding: 0.75rem 1rem; }
    .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .hero h1 { font-size: 1.5rem; }
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}
.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* =============================== */
/* AJOUTS POUR LE LOGO + MOBILE    */
/* =============================== */

/* Images responsives */
img { max-width: 100%; height: auto; }

/* Taille du logo */
#siteLogo,
.hero-logo img {
  width: clamp(110px, 28vw, 180px);
  height: auto;
  display: block;
}

/* Mobile: logo au-dessus du texte */
@media (max-width: 768px) {
  .hero .hero-content > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .hero h1 { font-size: 1.6rem; }
  .hero p  { font-size: 1rem; }
}

/* =============================== */
/* HERO : texte sous le logo mobile */
/* =============================== */

@media (max-width: 768px) {
  /* On surclasse le style inline (display:flex) du conteneur */
  .hero .hero-content > div {
    display: grid !important;           /* remplace le flex inline */
    grid-template-columns: 1fr;         /* une seule colonne => empilé */
    align-items: center !important;
    justify-items: center;               /* centre logo + texte */
    gap: 0.75rem !important;
    text-align: center;                  /* texte centré */
  }

  /* Les blocs logo + texte prennent toute la largeur dispo */
  .hero-logo,
  .hero-text {
    width: 100% !important;
		        display: block;
        margin-left: auto;
        margin-right: auto;
  }

  /* Taille de logo raisonnable sur mobile */
  #siteLogo,
  .hero-logo img,
  .logo {
    width: clamp(90px, 35vw, 140px) !important;
    height: auto !important;
	        display: block;
        margin-left: auto;
        margin-right: auto;
        width: auto;
  }

  /* Typo un peu réduite pour lisibilité */
  .hero h1 { font-size: 1.4rem !important; }
  .hero p  { font-size: 0.95rem !important; line-height: 1.4; }
}
/* === Panneau légal flottant (90% width) === */
.modal-legal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  z-index: 2000;
}
.modal-legal-backdrop.is-open { display: block; }

.modal-legal-panel {
  position: absolute;
  top: 5vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;              /* <= 90% de largeur */
  max-width: 1200px;
  height: 90vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  overflow: auto;
  padding: 1rem 1.25rem 1.25rem;
}

.modal-legal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: inline-block;
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: .25rem .5rem;
}

#legal-content h1 { margin-top: 0.25rem; }
@media (max-width: 768px) {
  .modal-legal-panel { width: 95vw; height: 92vh; padding: .75rem; }
  .modal-legal-close { font-size: 1.6rem; }
}
