/* Navigation globale et comportement de scroll */
html{
scroll-behavior:smooth;
}

/* --- Général --- */

body{
font-family:Arial,sans-serif;
margin:0;
padding:0;
line-height:1.6;
background:#f7f7f7;
color:#111;
}

.container{
width:90%;
max-width:1000px;
margin:0 auto;
padding:40px 0;
}

h2{
color:#4CAF50;
text-align:center;
margin-bottom:20px;
}


/* Hero d'accueil avec video et appel a l'action */

.hero{
  position:relative;
  color:white;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  height:100vh;
  overflow:hidden; /* important pour que la vidéo ne déborde pas */
}

.hero-video{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0; /* derrière le texte */
}

.hero::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.4); /* filtre sombre pour lisibilité */
  z-index:1;
}

.hero .container{
  position:relative;
  z-index:2;
  padding:20px;
  max-width:900px;
  margin:0 auto;
  animation:fadeIn 1s ease-out;
}

.hero h1{
  font-size:3rem;
  margin-bottom:15px;
  text-shadow:2px 2px 6px rgba(0,0,0,0.7);
}

.subtitle{
  opacity:0.85;
  margin-bottom:30px;
  font-size:1.2rem;
}

.btn{
  display:inline-block;
  padding:14px 36px;
  border-radius:8px;
  background-color:#4CAF50;
  color:white;
  text-decoration:none;
  font-weight:bold;
  transition:all 0.3s;
}

.btn:hover{
  background:#45a049;
  transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(0,0,0,0.3);
}

.back-box{
  display:flex;
  justify-content:center;
  margin:14px 0 24px;
}

.back-link{
  display:inline-block;
  padding:10px 18px;
  border-radius:10px;
  background:#ffffff;
  color:#2f4f2f;
  text-decoration:none;
  font-weight:bold;
  border:2px solid #d9e6d9;
  box-shadow:0 3px 10px rgba(0,0,0,0.06);
  transition:all 0.3s;
}

.back-link:hover{
  background:#f1f7f1;
  transform:translateY(-2px);
}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}

/* Section de presentation du projet sur la page d'accueil */

.about-bubbles{
display:grid;
grid-template-columns:repeat(2,1fr);
gap:25px;
margin-top:30px;
}

.about-bubble{
background:white;
padding:20px;
border-radius:12px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
text-align:center;
}
.about-bubble{
background:white;
padding:20px;
border-radius:12px;
box-shadow:0 4px 12px rgba(0,0,0,0.08);
text-align:center;
}

.bubble-icon{
font-size:2rem;
margin-bottom:10px;
}


/* Mecanisme "Lire plus" des bulles de presentation */

.text-collapse .more-text{
display:none;
}

.text-collapse.expanded .more-text{
display:inline;
}

.read-more-link{
cursor:pointer;
color:#4CAF50;
font-weight:bold;
display:inline-block;
margin-top:5px;
}

.read-more-link:hover{
text-decoration:underline;
}

/* Page d'accueil : carte de navigation vers les differentes rubriques */

.map-page{
max-width:1100px;
margin:auto;
padding:40px 20px;
}

.map-title{
text-align:center;
color:#4CAF50;
margin-bottom:10px;
}

.map-description{
text-align:center;
max-width:700px;
margin:auto;
margin-bottom:25px;
color:#555;
}

#controls{
background:white;
padding:12px;
border-radius:10px;
box-shadow:0 2px 8px rgba(0,0,0,0.1);
margin-bottom:15px;
text-align:center;
}

#controls select{
padding:6px 12px;
border-radius:6px;
border:1px solid #ccc;
}

#map{
height:600px;
width:100%;
border-radius:12px;
box-shadow:0 6px 18px rgba(0,0,0,0.15);
margin-top:10px;
}

.map-legend{
background:white;
padding:12px;
border-radius:10px;
box-shadow:0 3px 10px rgba(0,0,0,0.1);
margin-top:15px;
width:220px;
}

.legend-dot{
display:inline-block;
width:12px;
height:12px;
background:#4CAF50;
border-radius:50%;
margin-right:6px;
}

#stats{
margin-top:15px;
font-weight:bold;
color:#333;
text-align:center;
}
/* CARDS */

.cards{
display:grid;
grid-template-columns:repeat(4,minmax(0,1fr));
grid-template-areas:
"featured featured map map"
"featured featured quiz quiz"
"advice advice profile profile";
gap:22px;
margin-top:24px;
}

.card-link{
text-decoration:none;
color:inherit;
display:block;
}

.card{
background:#f7f9f7;
border-radius:16px;
box-shadow:0 10px 28px rgba(0,0,0,0.12);
transition:all 0.3s;
overflow:hidden;
height:100%;
display:flex;
flex-direction:column;
}

.card:hover{
transform:translateY(-6px);
box-shadow:0 16px 34px rgba(0,0,0,0.18);
}

.card img{
width:100%;
height:220px;
object-fit:cover;
display:block;
}

.card-body{
padding:20px 20px 22px;
text-align:left;
}

.card-body h3{
margin:0 0 10px;
color:#2f7a39;
font-size:1.35rem;
}

.card-body p{
margin:0;
color:#355335;
}

.card-featured{ grid-area:featured; }
.card-map{ grid-area:map; }
.card-quiz{ grid-area:quiz; }
.card-advice{ grid-area:advice; }
.card-profile{ grid-area:profile; }

.card-featured .card{
display:flex;
flex-direction:column;
min-height:100%;
background:#ffffff;
}

.card-featured .card-media{
height:auto;
}

.card-featured .card-media img{
height:320px;
min-height:0;
}

.card-featured .card-body{
display:flex;
flex-direction:column;
justify-content:center;
align-items:center;
padding:32px;
background:#ffffff;
text-align:center;
min-height:220px;
}

.card-featured .card-body h3{
font-size:2.2rem;
margin-bottom:14px;
}

.card-featured .card-body p{
max-width:36ch;
}

.card-kicker{
display:inline-block;
align-self:center;
margin-bottom:14px;
padding:6px 10px;
border-radius:999px;
background:#dff1de;
color:#2f7a39;
font-size:0.82rem;
font-weight:bold;
text-transform:uppercase;
letter-spacing:0.04em;
}

.card-cta{
display:inline-flex;
align-self:center;
margin-top:22px;
padding:11px 16px;
border-radius:10px;
background:#4CAF50;
color:#fff;
font-weight:bold;
box-shadow:0 10px 22px rgba(76,175,80,0.2);
}

/* Images des cartes remplissent tout le cadre */
.choice-card img {
  width: 100%;         /* largeur = largeur du parent */
  height: 100%;        /* hauteur = hauteur du parent */
  object-fit: cover;   /* ajuste l'image sans la déformer, recadrage si nécessaire */
  border-radius: 12px; /* coins arrondis cohérents avec la carte */
  display: block;      /* supprime l'espace blanc sous l'image */
}
/* CONTACT */

#contact a{
color:#4CAF50;
text-decoration:none;
}

#contact a:hover{
text-decoration:underline;
}


/* FOOTER */

footer{
text-align:center;
padding:15px 0;
background:#4CAF50;
color:white;
}


/* BOUTON HAUT */

#topBtn{
position:fixed;
bottom:20px;
right:20px;
padding:10px 15px;
font-size:18px;
border:none;
border-radius:6px;
background:#4CAF50;
color:white;
cursor:pointer;
display:none;
}


/* MOBILE */

@media (max-width:768px){

.hero h1{
font-size:2rem;
}

.subtitle{
font-size:1rem;
}

.btn{
padding:12px 28px;
font-size:1rem;
}

.cards{
grid-template-columns:1fr;
grid-template-areas:
"featured"
"map"
"quiz"
"advice"
"profile";
}

.card-featured .card{
grid-template-columns:1fr;
}

.card-featured .card-media img{
min-height:220px;
}

.card-featured .card-body,
.card-body{
text-align:center;
}

.card-kicker,
.card-cta{
align-self:center;
}

.about-bubbles{
grid-template-columns:1fr;
}

.profile-page{
  padding:40px 20px;
}

.profile-header{
  display:flex;
  align-items:center;
  gap:40px;
  flex-wrap:wrap;
  margin-bottom:30px;
}

.profile-photo{
  text-align:center;
}

.profile-photo img{
  width:120px;
  height:120px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid #4CAF50;
  margin-bottom:10px;
}

.profile-photo button{
  display:block;
  margin:auto;
  padding:6px 12px;
  background:#4CAF50;
  color:white;
  border:none;
  border-radius:6px;
  cursor:pointer;
}

.profile-info h2{
  margin:0 0 5px;
}

.profile-info p{
  margin:0 0 15px;
  color:#555;
}

.profile-badges h3{
  margin-bottom:15px;
  color:#4CAF50;
  text-align:center;
}
/* Tooltip container */
.badge {
  position: relative;
  cursor: pointer;
}

/* Tooltip text */
.badge::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%; /* au-dessus du badge */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 10;
}

/* Flèche du tooltip */
.badge::before {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(0,0,0,0.75) transparent transparent transparent;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Affiche tooltip au survol */
.badge:hover::after,
.badge:hover::before {
  opacity: 1;
}

}

/* SHARED PAGE SYSTEM */

:root{
  --site-bg:#f2f7f1;
  --site-surface:#ffffff;
  --site-surface-soft:#edf5ea;
  --site-text:#19311d;
  --site-muted:#5a6f5e;
  --site-border:#d6e5d4;
  --site-primary:#4CAF50;
  --site-primary-dark:#2f7a39;
  --site-shadow:0 12px 28px rgba(25,49,29,0.10);
  --site-radius:18px;
}

.site-page{
  background:
    radial-gradient(circle at top left, rgba(111,170,117,0.12), transparent 28%),
    linear-gradient(180deg, #f8fbf6 0%, var(--site-bg) 100%);
  color:var(--site-text);
  min-height:100vh;
}

.site-header{
  background:linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-dark) 100%) !important;
  color:#fff !important;
  text-align:center !important;
  padding:28px 20px 22px !important;
  box-shadow:0 8px 24px rgba(47,122,57,0.20) !important;
}

.site-header-inner{
  width:min(1080px, calc(100% - 32px)) !important;
  margin:0 auto !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:12px !important;
  text-align:center !important;
}

.site-header h1{
  margin:0 !important;
  font-size:clamp(2rem, 3vw, 2.7rem) !important;
  text-shadow:1px 1px 4px rgba(0,0,0,0.18) !important;
  text-align:center !important;
  color:#fff !important;
}

.site-header p{
  margin:12px auto 0 !important;
  max-width:760px !important;
  opacity:0.95 !important;
  text-align:center !important;
  color:#fff !important;
}

.site-header .back-box{
  width:100% !important;
  display:flex !important;
  justify-content:center !important;
  margin:4px 0 0 !important;
}

.site-header .back-link,
.site-header .nav-link{
  display:inline-block !important;
  background:rgba(255,255,255,0.14) !important;
  color:#ffffff !important;
  border:1px solid rgba(255,255,255,0.32) !important;
  box-shadow:none !important;
  backdrop-filter:blur(4px);
  text-align:center !important;
}

.site-header .back-link:hover,
.site-header .nav-link:hover{
  background:rgba(255,255,255,0.22) !important;
  color:#ffffff !important;
}

.site-main{
  width:min(1080px, calc(100% - 32px));
  margin:32px auto 48px;
}

.site-panel{
  background:var(--site-surface);
  border:1px solid var(--site-border);
  border-radius:var(--site-radius);
  box-shadow:var(--site-shadow);
  padding:26px;
}

.site-stack{
  display:grid;
  gap:24px;
}

.site-lead{
  text-align:center;
  color:var(--site-muted);
  max-width:760px;
  margin:0 auto;
}

.site-footer{
  text-align:center;
  padding:16px 20px;
  background:linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-dark) 100%);
  color:#fff;
  margin-top:32px;
}

.site-button,
.site-button-secondary{
  display:inline-block;
  padding:12px 18px;
  border-radius:10px;
  text-decoration:none;
  font-weight:bold;
  cursor:pointer;
  border:none;
  transition:all 0.25s;
}

.site-button{
  background:var(--site-primary);
  color:#fff;
  box-shadow:0 10px 22px rgba(76,175,80,0.20);
}

.site-button:hover{
  background:#45a049;
  transform:translateY(-2px);
}

.site-button-secondary{
  background:#fff;
  color:var(--site-text);
  border:2px solid var(--site-border);
}

.site-button-secondary:hover{
  background:#f3f8f1;
  transform:translateY(-2px);
}

.site-field{
  width:100%;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid #c7d7c7;
  box-sizing:border-box;
  background:#fff;
}

.site-card{
  background:var(--site-surface);
  border:1px solid var(--site-border);
  border-radius:16px;
  box-shadow:var(--site-shadow);
}

@media (max-width:768px){
  .site-main{
    width:min(100%, calc(100% - 20px));
    margin:20px auto 32px;
  }

  .site-panel{
    padding:18px;
  }
}
.field-error {
    border: 2px solid #b42318 !important; /* rouge vif */
    background-color: #ffecec;
}

.error-message {
    color: #b42318;
    font-size: 0.9rem;
    margin-top: 4px;
    display: none;
}
