/* ==========================================================================
   Avocats des Feuillants — Page d'attente (refonte)
   Feuille autonome : n'hérite ni du thème ni des plugins du site.
   ========================================================================== */

@font-face {
	font-family: 'KefaFeuillants';
	src: url('../fonts/kefa-feuillants-400.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'KefaFeuillants';
	src: url('../fonts/kefa-feuillants-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--green: #3d5a53;
	--green-dark: #263e37;
	--gold: #c18b52;
	--gold-hover: #ca975f;
	--white: #fff;
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { font-synthesis: none; }

body {
	margin: 0;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	background: var(--green);
	color: var(--white);
	font-family: 'KefaFeuillants', serif;
	font-size: 16px;
}
body:has(dialog[open]) { overflow: hidden; }

a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--white); outline-offset: 5px; }
button { font-family: inherit; }
b, strong { font-weight: 700; }

.visually-hidden {
	position: absolute;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --- En-tête -------------------------------------------------------------- */

.masthead {
	height: 175px;
	display: flex;
	justify-content: center;
	align-items: center;
	background: var(--white);
}
.masthead img { width: 319px; height: 125px; object-fit: contain; }

/* --- Bandeau défilant ----------------------------------------------------- */

.marquee {
	height: 30px;
	display: flex;
	align-items: center;
	overflow: hidden;
	background: var(--gold);
}
.marquee-track {
	display: flex;
	width: max-content;
	animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; flex-shrink: 0; }
.marquee-group span {
	display: block;
	flex-shrink: 0;
	width: 240px;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
}
/* 4 groupes identiques : décaler d'un groupe = boucle sans couture. */
@keyframes marquee { to { transform: translateX(-25%); } }

/* --- Contenu ------------------------------------------------------------ */

main {
	flex: 1;
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding-top: 44px;
	display: flex;
	flex-direction: column;
}

/* Intro */
.intro {
	display: grid;
	grid-template-columns: 412px 321px;
	justify-content: space-between;
	gap: 40px;
	padding: 0 7px 0 8px;
}
.intro h1 {
	margin: 0 0 28px;
	font-size: 40px;
	font-weight: 400;
	line-height: 1;
}
.intro h1 em { font-style: normal; color: var(--gold); }
.intro p { margin: 0; font-size: 16px; line-height: 25px; }

.portrait {
	width: 321px;
	height: 322px;
	border-radius: 10px;
	overflow: hidden;
}
.portrait picture { display: block; height: 100%; }
.portrait img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .85s cubic-bezier(.2, .65, .3, 1);
}

/* Cabinets */
.offices {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-height: 198px;
	margin-top: 80px;
}
.offices::after {
	content: "";
	position: absolute;
	top: 0; bottom: 0; left: 50%;
	width: 1px;
	background: #ffffff55;
}
.office {
	position: relative;
	width: 321px;
	padding-top: 4px;
	text-align: center;
}
.office:last-child { justify-self: end; }

.office-logo {
	display: block;
	width: 138px;
	height: 48px;
	margin: 0 auto 14px;
	object-fit: contain;
}
.address-badge {
	position: absolute;
	top: -10px;
	left: 10px;
	display: block;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	transition: transform .4s ease, box-shadow .4s ease;
}
address {
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 14px;
	font-style: normal;
}
.office-city { color: var(--gold); font-weight: 700; }

/* Bouton doré (cabinets + fenêtre RDV) */
.button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	height: 52px;
	border-radius: 9px;
	background: var(--gold);
	font-size: 14px;
	text-decoration: none;
	transition: background .25s, transform .25s, box-shadow .25s;
}
.button:hover {
	background: var(--gold-hover);
	transform: translateY(-3px);
	box-shadow: 0 8px 20px #172f292b;
}
.button:active { transform: translateY(0); }

/* Domaines d'intervention */
.expertise {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin-top: 27px;
	text-align: center;
}
.expertise img {
	display: block;
	width: 70px;
	height: 71px;
	margin: 0 auto;
	border-radius: 50%;
}
.expertise h2 {
	margin: 9px 0 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 14px;
}

/* Réseaux sociaux */
.socials {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
	min-height: 76px;
	margin-top: auto;
	padding-top: 32px;
}
.socials a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	transition: transform .3s, filter .3s;
}
.socials a:hover { transform: translateY(-4px) rotate(-6deg); filter: brightness(1.12); }
.socials a:last-child:hover { transform: translateY(-4px) rotate(6deg); }
.socials a:focus-visible { transform: translateY(-4px); }

/* --- Pied de page ------------------------------------------------------- */

footer {
	padding: 9px 12px;
	background: var(--green-dark);
	color: #ffffff66;
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}
footer a { text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--white); }

/* --- Apparition --------------------------------------------------------- */

.reveal { animation: appear .95s ease both; }
.portrait.reveal { animation-delay: .14s; }
.offices.reveal { animation-delay: .25s; }
.socials.reveal { animation-delay: .42s; }
@keyframes appear {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
	.portrait:hover img { transform: scale(1.045); }
	.address-badge:hover { transform: translateY(-3px) rotate(-5deg) scale(1.05); box-shadow: 0 5px 15px #172f2930; }
}

/* ==========================================================================
   Fenêtres (dialog)
   ========================================================================== */

dialog {
	max-width: min(420px, calc(100% - 40px));
	padding: 32px;
	border: 1px solid #c18b5266;
	border-radius: 14px;
	background: var(--green);
	color: var(--white);
	font-family: inherit;
	box-shadow: 0 24px 80px #0005;
}
dialog::backdrop { background: #142b25aa; backdrop-filter: blur(4px); }
dialog h2 { margin-top: 0; font-size: 24px; }
dialog p { line-height: 1.6; }

.dialog-close {
	position: absolute;
	top: 6px;
	right: 10px;
	border: 0;
	background: none;
	color: var(--white);
	font-size: 26px;
	cursor: pointer;
}
.dialog-ok {
	padding: 12px 25px;
	border: 0;
	border-radius: 7px;
	background: var(--gold);
	color: var(--white);
	cursor: pointer;
}

/* --- Choix de l'avocat -------------------------------------------------- */

.rdv-modal {
	width: 788px;
	max-width: calc(100vw - 32px);
	max-height: calc(100dvh - 32px);
	padding: 18px 0 20px;
	border: 1px solid var(--gold);
	border-radius: 32px;
	overflow-y: auto;
}
.rdv-modal::backdrop {
	background: rgba(15, 39, 32, .30);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.rdv-modal[open] { animation: modal-in .3s ease both; }
@keyframes modal-in {
	from { opacity: 0; transform: translateY(10px) scale(.985); }
	to { opacity: 1; transform: none; }
}
.rdv-modal .dialog-close {
	top: 10px;
	right: 15px;
	width: 30px;
	height: 30px;
	padding: 0;
	font-family: Arial, sans-serif;
	line-height: 1;
	transition: transform .2s;
}
.rdv-modal .dialog-close:hover { transform: rotate(90deg); }

.rdv-heading {
	margin: 0 45px 26px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.1;
	text-align: center;
	text-transform: uppercase;
}
.rdv-choices { display: grid; grid-template-columns: 1fr 1fr; }
.lawyer {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0 28px;
	text-align: center;
}
.lawyer + .lawyer { border-left: 1px solid var(--gold); }
.lawyer h3 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.1;
	text-transform: uppercase;
}
.lawyer h3 span { display: block; }
.lawyer-photo {
	display: block;
	width: 188px;
	height: 212px;
	object-fit: cover;
	border-radius: 12px;
}
.lawyer .button {
	display: block;
	width: 188px;
	height: auto;
	min-height: 44px;
	margin-top: 12px;
	padding: 9px 12px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
}

/* --- Mentions légales --------------------------------------------------- */

.legal-modal {
	width: 820px;
	max-width: calc(100vw - 32px);
	max-height: calc(100dvh - 40px);
	padding: 0;
	border: 1px solid var(--gold);
	border-radius: 20px;
	overflow: auto;
	overscroll-behavior: contain;
}
.legal-bar {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 24px 32px;
	border-bottom: 1px solid #c18b5266;
	background: var(--green);
}
.legal-bar .legal-title { margin: 0; font-size: 28px; font-weight: 400; line-height: 1.2; }
.legal-bar .dialog-close {
	position: static;
	min-width: 44px;
	min-height: 44px;
	font-family: Arial, sans-serif;
	font-size: 28px;
}
.legal-content {
	padding: 8px 32px 32px;
	font-size: 16px;
	line-height: 1.65;
	overflow-wrap: anywhere;
}
.legal-content h3 { margin: 28px 0 14px; color: var(--gold); font-size: 21px; line-height: 1.3; }
.legal-content p { margin: 0 0 16px; }
.legal-content ul { margin: 0 0 20px; padding-left: 24px; }
.legal-content li { margin: 6px 0; }
.legal-content a { text-underline-offset: 3px; }

/* ==========================================================================
   Tablette (601–900px)
   ========================================================================== */

@media (min-width: 601px) and (max-width: 900px) {
	main { padding: 40px 26px 0; }
	.intro {
		grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
		gap: 32px;
		padding: 0;
	}
	.intro h1 { font-size: 36px; }
	.portrait { width: 100%; }
	.office { width: calc(100% - 25px); }
	.expertise { grid-template-columns: repeat(4, 1fr); row-gap: 26px; }
	.socials { padding-top: 30px; min-height: 74px; }
}
@media (min-width: 601px) and (max-width: 760px) {
	.address-badge { top: -8px; left: -8px; width: 48px; height: 48px; }
}

/* ==========================================================================
   Mobile (≤600px)
   ========================================================================== */

@media (max-width: 600px) {
	.masthead { height: 130px; }
	.masthead img { width: 184px; height: auto; }

	.marquee { height: 27px; }
	.marquee-group span { width: 260px; }

	main { max-width: 460px; padding: 34px 34px 0; }

	.intro {
		display: flex;
		flex-direction: column;
		gap: 28px;
		padding: 0;
		text-align: center;
	}
	.intro h1 { margin: 0 -10px 16px; white-space: nowrap; }

	.portrait,
	.portrait img { height: auto; aspect-ratio: 325.26 / 235.156; }
	.portrait { width: 100%; border-radius: 7px; }

	.offices {
		display: flex;
		flex-direction: column;
		gap: 34px;
		min-height: 0;
		margin-top: 78px;
	}
	.offices::after { display: none; }
	.office { width: 100%; padding: 0; }
	.address-badge { top: -18px; left: 8px; width: 66px; height: 66px; }

	.expertise {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px 4px;
		margin: 50px -20px 0;
	}
	.expertise > div:last-child { grid-column: 2; }
	.expertise h2 { letter-spacing: -.1px; }

	.socials { padding-top: 46px; min-height: 90px; }

	footer { padding: 9px 8px; white-space: nowrap; }

	/* Fenêtre RDV : profils empilés */
	.rdv-modal {
		width: 350px;
		max-height: calc(100dvh - 24px);
		padding: 22px 24px 40px;
		overscroll-behavior: contain;
	}
	.rdv-modal .dialog-close { top: 4px; right: 4px; }
	.rdv-heading { margin: 0 15px 30px; }
	.rdv-heading-city { display: block; }
	.rdv-choices { grid-template-columns: 1fr; }
	.lawyer { padding: 0; }
	.lawyer + .lawyer {
		margin-top: 32px;
		padding-top: 22px;
		border-left: 0;
		border-top: 1px solid var(--gold);
	}
	.lawyer-photo { max-width: 100%; height: auto; aspect-ratio: 188 / 212; }
	.lawyer .button { max-width: 100%; }

	/* Mentions légales */
	.legal-modal { max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
	.legal-bar { padding: 16px 20px; }
	.legal-bar .legal-title { font-size: 24px; }
	.legal-content { padding: 4px 20px 24px; font-size: 15px; }
	.legal-content h3 { font-size: 20px; }
}

@media (max-width: 370px) {
	main { padding-left: 24px; padding-right: 24px; }
	.intro h1 { font-size: 35px; }
	.expertise { row-gap: 22px; }
	.expertise h2 { font-size: 13px; }
	.office .button { font-size: 13px; }
	footer { font-size: 11px; }
}
@media (max-width: 350px) {
	.address-badge { top: -12px; left: -6px; width: 54px; height: 54px; }
}

/* ==========================================================================
   Mouvements réduits
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
	.portrait:hover img,
	.address-badge:hover,
	.button:hover,
	.socials a:hover,
	.socials a:focus-visible,
	.rdv-modal .dialog-close:hover { transform: none !important; filter: none !important; }
}
