/* ==========================================================================
1. VARIABLES & BASE
========================================================================== */
:root {
	--primary-green: #53AC52;
	--primary-blue: rgb(80, 134, 173);
	--text-gray: #6B7280;
	--light-bg: rgba(80, 134, 173, 0.1);
	--white: #f8f9fa;
	--dark-text: #2c3e50;
	--meidum-text: #546e7a;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	color: var(--text-gray);
	line-height: 1.6;
	overflow-x: hidden;
}

body.menu-open {
	overflow: hidden;
}

h3 {
	margin-bottom: 0.5rem;
	font-size: 1.1rem;
}

/* ==========================================================================
2. NAVIGATION (BURGER & OVERLAY)
========================================================================== */

/* Bouton Toggle */
.burger-toggle {
	position: fixed;
	left: 20px;
	top: 20px;
	z-index: 1001;
	background: white;
	
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 12px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 7px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
	transition: all 0.3s ease;
}

.burger-toggle span {
	display: block;
	width: 25px;
	height: 3px;
	background: var(--primary-blue);
	border-radius: 2px;
	transition: all 0.3s ease;
}

/* Animation Croix */
.burger-toggle.active { background: var(--primary-blue); }
.burger-toggle.active span { background: white;  }
.burger-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(7px, 7px); }
.burger-toggle.active span:nth-child(2) { opacity: 0; }
.burger-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

/* Menu Latéral */
.burger-menu {
	position: fixed;
	left: 0;
	top: 0;
	width: 300px;
	height: 100vh;
	background: #ffffff;
	z-index: 1000;
	transform: translateX(-100%);
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 10px 0 30px rgba(0,0,0,0.05);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow-y: auto;
}

.burger-menu.active { transform: translateX(0); }

.menu-nav {
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-top: 100px;
}

.menu-nav a {
	display: block;
	color: var(--dark-text);
	text-decoration: none;
	padding: 18px 30px;
	font-size: 1.5rem;
	font-weight: 500;
	transition: all 0.3s ease;
	border-left: 5px solid transparent;
}

.menu-nav a:hover, .menu-nav a.active {
	background: #f8f9fa;
	color: var(--primary-green);
	border-left-color: var(--primary-green);
	padding-left: 40px;
}

/* Logo dans le menu */
.menu-logo {
	padding: 2rem;
	border-top: 1px solid #eee;
	text-align: center;
}

.menu-logo img {
	width: 100%;
	max-width: 80%;
	height: auto;
}

/* Voile d'arrière-plan */
.menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.4s ease;
}

.menu-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* ==========================================================================
3. STRUCTURE GENERALE DES SECTIONS
========================================================================== */
section {
	min-height: 60vh;
	padding: 80px 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

section:nth-child(even) { background: var(--white); }
section:nth-child(odd) { background: var(--light-bg); }

.container {
	max-width: 80%;
	width: 100%;
	margin: 0 auto;
}

h2 {
	font-size: 2.5em;
	color: var(--primary-blue);
	margin-bottom: 2rem;
	text-align: center;
	position: relative;
	padding-bottom: 15px;
}

h2::after {
	content: '';
	position: absolute;
	bottom: 0; left: 50%;
	transform: translateX(-50%);
	width: 80px; height: 4px;
	background: var(--primary-green);
	border-radius: 2px;
}

.section-content {
	font-size: 1.1em;
	line-height: 1.8;
	margin: 0 auto;
}

.section-content p { margin-bottom: 20px; }

/* ==========================================================================
4. SECTIONS SPECIFIQUES
========================================================================== */

/* Hero */
#hero {
	background-image: url("../img/bg-mouthiers-3.jpg");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	color: var(--white);
	text-align: center;
}

.hero-container {
	max-width: 80%;
	align-items: center;
	background-color: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(4px);
	padding: 3rem;
	border-radius: 0.5rem;
}

.presentation-container, .valeurs-container {
	max-width: 80%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
}

.hero-text { text-align: left; }

.hero-mini-logo {
	width: 30%;
	margin-bottom: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-title {
	font-size: 2.15rem;
	color: var(--white);
	line-height: 1.2;
	margin-bottom: 20px;
}

.hero-subtitle {
	font-size: 1.15rem;
	color: var(--white);
	border-left: 4px solid var(--primary-green);
	padding-left: 15px;
	margin-bottom: 3rem;
}

.hero-group-photo {
	width: 100%;
	border-radius: 20px;
	box-shadow: 0 20px 40px rgba(0,0,0,0.15);
	transition: transform 0.3s ease;
}

.hero-group-photo:hover { transform: translateY(-5px); }

/* Présentation */
#presentation {
	min-height: 40vh;
	padding: 50px 20px;
}

/* Grille Axes de Travail */
.values-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
}

.value-card {
	width: 31%;
	position: relative;
	padding: 0;
	background: none;
	box-shadow: none;
	border: none;
	transition: transform 0.3s ease;
}

.value-card:hover {
	transform: translateY(-5px);
}

.flip-card {
perspective: 1000px;
cursor: pointer;
}

.flip-inner {
display: grid;                  /* ← clé magique */
transform-style: preserve-3d;
transition: transform .6s;
}

/* Faces superposées mais gardent la hauteur */
.flip-front,
.flip-back {
grid-area: 1 / 1;               /* ← empilement */
padding: 30px;
border-radius: 12px;
background: white;
border-top: 4px solid var(--primary-green);
box-shadow: 0 4px 15px rgba(0,0,0,.1);
backface-visibility: hidden;
box-sizing: border-box;
}

/* verso retourné */
.flip-back {
	display: flex;
	align-items: center;
	transform: rotateY(180deg);
}

.flip-info {
	color: var(--primary-blue);
	font-weight: 600;
	text-align: center;
	margin-top: 1rem;
}

.flip-info:hover {
	color: var(--dark-text);
}

/* activation du flip */
.flip-card.flipped .flip-inner {
transform: rotateY(180deg);
}

/* Portraits */
#equipe {
	background: linear-gradient(180deg, hsla(205, 37%, 50%, 0.7) 0%, hsla(119, 35%, 50%, 0.7) 120%);
}

a {
	text-decoration: none;
}

.h2-v2 {
	color: #ffffff;
}

.map-wrapper {
overflow: hidden;
position: relative;
border-radius: 1rem;
}

.team-map-img {
width: 100%;
height: auto;
display: block;
border-radius: 1rem;
}

.section-intro {
	color:#f8f9fa;
	text-align: center;
	margin-bottom: 1rem;
	font-size: 1.5rem;
}

.team-pin {
	position: absolute;
	width: clamp(37px, 8vw, 75px);
	height: clamp(37px, 8vw, 75px);
	border-radius: 50%;
	border: 2px solid white;
	background: none;
	padding: 0;
	cursor: pointer;
	transform: translate(-50%, -50%);
	overflow: hidden;
}

.team-pin img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 50%;
}

.team-pin:hover {
	transform: translate(-50%, -50%) scale(1.1);
}

/* MODALE */
.modal {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.modal.active {
	display: flex;
}

.modal-content {
	background: white;
	padding: 2rem;
	max-width: 500px;
	width: 90%;
	position: relative;
	border-radius: 8px;
}

.modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 2rem;
	cursor: pointer;
}
#modal-bio p {
	margin: .6rem 0;
	line-height: 1.55;
}

#modal-bio em {
	font-style: italic;
	opacity: .85;
}

#modal-bio .bio-quarter {
	font-weight: 600;
	color: var(--primary-green);
}


/* Rencontres / Événements */
#rencontres {
	position: relative;
	overflow: hidden;
}

.rencontres-pas-monte {
	position: absolute;
    top: 3vw;
    left: 3vw;
    width: clamp(80px, 10vw, 160px);
    scale: 1.5;
	pointer-events: none;
}

.rencontres-pas-monte img {
	width: 100%;
	height: auto;
	display: block;
}

.rencontres-pas-descente {
	position: absolute;
    top: 1vw;
    right: 2vw;
	width: clamp(80px, 10vw, 160px);
	pointer-events: none;
}

.rencontres-pas-descente img {
	width: 100%;
	height: auto;
	display: block;
}

.events-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(24px, 4vw, 64px);
	margin: 60px 0;
}

.events-row.reverse {
  grid-template-columns: 1fr 1fr;
}

.events-row.reverse .events-photos {
  order: 2;
}

.events-row.reverse .events-list {
  order: 1;
}

.events-photos {
  display: flex;
  align-items: center;
  justify-content: center;
}

.events-photos img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
}

.event-item {
	background: white;
	padding: 25px;
	margin-bottom: 20px;
	border-radius: 12px;
	border-left: 5px solid var(--primary-green);
	transition: transform 0.3s ease;
}

.event-item:hover { transform: translateX(5px); }
.event-date { color: var(--primary-blue); font-weight: bold; font-size: 1.2em; }
.event-coffee {color: #2c3e50c5; font-weight: bold}
.event-location a {
	text-decoration: none;
	color: var(--primary-green);
	font-weight: 700;
}

.event-location a:hover {
	text-decoration: underline;
	color: var(--dark-text);
}

.rencontres-mobile {
	display: none;
}

/* Grille calendrier */
.calendar-wrapper{
	max-width: 480px;
	margin: 20px auto;
	background: white;
	border-radius: 14px;
	padding: 15px 18px;
	box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* Header */
.calendar-header{
	display:flex;
	justify-content:space-between;
	align-items:center;
	margin-bottom:10px;
}

.calendar-header h3{
	margin:0;
	color:var(--primary-blue);
}

.calendar-header button{
	border:none;
	background:none;
	font-size:24px;
	cursor:pointer;
	color:#666;
}

/* Week days */
.calendar-weekdays{
	display:grid;
	grid-template-columns: repeat(7,1fr);
	text-align:center;
	font-weight:700;
	color:#6b7280;
	margin:5px 0 8px;
}

/* Days grid */
.calendar-grid{
	display:grid;
	grid-template-columns: repeat(7,1fr);
	gap:4px;
}

.calendar-day {
	aspect-ratio: 1 / 1;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #6b7280;
}

/* Days outside month */
.calendar-day.muted{
	opacity:.35;
}

/* Event days */
.calendar-day.event{
	border:2px solid var(--primary-green);
	color:var(--primary-green);
	font-weight:700;
	cursor:pointer;
	transition:.25s;
}

.calendar-day.event:hover{
	background:var(--primary-blue);
	border-color:var(--primary-blue);
	color:white;
}

/* Selected */
	.calendar-day.active{
	background:var(--primary-green);
	color:white;
}

/* 🖥️ modal */
.event-modal{
position:fixed;
inset:0;
display:none;
align-items:center;
justify-content:center;
background:rgba(0,0,0,.45);
}

.event-modal.active{
display:flex;
}

.event-modal-content{
background:white;
padding:24px;
border-radius:12px;
border-top:5px solid var(--primary-green);
width:min(500px,90%);
}

.event-modal-close{
float:right;
border:none;
background:none;
font-size:28px;
cursor:pointer;
}

.event-modal-block{
padding:10px 0;
border-bottom:1px solid #e6e6e6;
}

.event-modal-block:last-child{
border-bottom:none;
}

.event-modal-block h4{
margin:5px 0;
color:var(--primary-blue);
}

.event-time{
margin:4px 0;
font-weight:600;
}

.event-location a{
font-weight:700;
color:var(--primary-green);
text-decoration:none;
}

.event-location a:hover{
text-decoration:underline;
}

#eventLocation {
	color: var(--primary-green);
	font-weight: 700;
}

#eventMap {
	text-align: center;
	font-weight: 500;
	color: var(--primary-blue);
}

#eventMap:hover {
	color: var(--dark-text);
}

/* Réseaux Sociaux */
#suivre {
	min-height: 0;
}

.social-links {
	display: flex;
	justify-content: center;
	gap: 30px;
}

.social-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 20px;
	background: var(--primary-blue);
	color: white;
	font-weight: 500;
	text-decoration: none;
	border-radius: 0.5rem;
	backdrop-filter: blur(6px);
	transition: all 0.25s ease;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.social-link:hover {
	background: var(--primary-green);
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Formulaire de Contact */
.contact-container {
	max-width: 60%;
}

.contact-form {
	max-width: 70%;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 40px auto 0;
}

.form-group {
	width: 100%;
	margin-bottom: 25px;
}
.form-group label { display: block; margin-bottom: 8px; color: var(--primary-blue); font-weight: 500; }

.form-group input, .form-group textarea {
	width: 100%;
	padding: 12px 15px;
	border: 2px solid #e5e7eb;
	border-radius: 8px;
	font-family: inherit;
}

.form-group textarea {
	min-height: 220px;
	line-height: 1.5;
	resize: vertical;
}

.form-group input:focus, .form-group textarea:focus {
	outline: none;
	border-color: var(--primary-green);
}

.rgpd-group { 
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.rgpd-checkbox {
	width: 3%;
}

.submit-btn {
	background: var(--white);
	border: 1px solid #d1d5db;
	padding: 10px 20px;
	border-radius: 0.5rem;
	color: var(--primary-blue);
	font-weight: 500;
	font-size: 1.1rem;
	cursor: pointer;
	backdrop-filter: blur(6px);
	transition: all 0.25s ease;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.submit-btn:hover {
	background: #ffffffee;
	border-color: var(--primary-green);
	color: var(--primary-green);
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* ==========================================================================
5. FOOTER
========================================================================== */
footer {
	background: #4f7d9b;
	color: #fff;
}

.footer-container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 50px 20px;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr; /* équilibre visuel */
	gap: 3rem;
	align-items: flex-start;
}

/* Colonne identité */

.footer-col.brand p {
	margin-top: 10px;
	line-height: 1.5;
	max-width: 420px;
}

.footer-logo {
	height: 55px;
	margin-bottom: 10px;
	border-radius: 6px;
}

/* Titres */

.footer-col h4 {
	margin-bottom: 12px;
	font-size: 1.1rem;
}

/* Listes */

.footer-col ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-col li {
	rgin: 6px 0;
}

.footer-col a {
	color: #e8f1f6;
	text-decoration: none;
}

.footer-col a:hover {
	text-decoration: underline;
}

/* Ligne du bas */

.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.25);
	text-align: center;
	padding: 18px 0;
	font-size: .9rem;
}

/* ==========================================================================
6. RESPONSIVE (MEDIA QUERIES)
========================================================================== */
@media (max-width: 1100px) {
	/* Flip card */
	.value-card {
		width: 45%;
	}

	.valeurs-container {
		display: flex;
	}

	.valeurs-image-container {
		display: none;
	}

	/* Rencontres */

	.events-row {
		grid-template-columns: 1fr;
	}

	.events-photos {
		display: none;
	}

	/* Footer */
	.footer-container {
		grid-template-columns: 1fr 1fr;
	}

	.footer-col.brand {
		grid-column: span 2;
	}
}

@media (max-width: 768px) {

	section {
		padding: 0;
	}

	/* Menu Mobile Full Width */
	.burger-menu { width: 100vw; padding: 5rem 1.5rem 0; text-align: center; }
	.menu-nav { margin-top: 0; }
	.menu-nav a { border-left: none; font-size: 1.5rem; }
	.menu-logo { display: none; }

	/* Hero Mobile */
	.hero-container { max-width:90%; padding:1.5rem 0.75rem; grid-template-columns: 1fr; text-align: center; }
	.hero-text { display: flex; flex-direction: column; justify-content: center; align-items: center;order: 2; }
	.hero-image-container { order: 1; }
	.hero-title { font-size: 1.4rem; margin-left: 0.5rem; }
	.hero-subtitle { font-size: 1rem; border-left: 3px solid var(--primary-green); margin-right: 0.5rem; margin-left: 0.5rem; }
	.hero-mini-logo { width: 80%; }
	
	/* Flip card */
	.value-card {
		width: 100%;
	}

	/* Team Mobile */
	.team-bio { transform: translateY(100%) !important; }
	.team-member.open .team-bio { transform: translateY(0) !important; }
	.section-intro {
		font-size: 1.2rem;
	}

	.map-wrapper {
		overflow: hidden;
	}

	.map-zoom-layer {
		width: 140%;
		transform: translate(-15%, 0%);
	}

	.modal-content {
		max-width: 90%;
		padding: 15px;
		font-size: .9rem;
		max-height: 85vh;
		overflow-y: auto;
	}

	#modal-name {
		font-size: 1.1rem;
		line-height: 1.3;
	}

	#modal-bio {
		max-height: 55vh;
		overflow-y: auto;
	}

	.modal-close {
		font-size: 1.8rem;
		top: 8px;
		right: 10px;
	}

	/* Calendar */
	.rencontres-mobile {
		display: block;
	}

	.rencontres {
		display: none;
	}

	/* Divers */
	.social-links { flex-direction: column; align-items: center; }
	section { padding: 60px 15px; }
	h2 { font-size: 2rem; }

	.container, .presentation-container, .contact-container {
		max-width: 100%;
	}

	.presentation-container {
		grid-template-columns: none;
	}

	.values-grid {
		grid-template-columns: none;
	}

	/* Contact */
	.contact-form {
		max-width: 90%;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		margin: 0 auto;
	}
	.rgpd-checkbox {
		width: 5%;
	}

	/* Footer */

	.footer-container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.footer-bottom {
		font-size: 0.85rem;
	}

	.footer-col.brand p {
		margin: 0 auto;
	}
}