/* ==========================================================================
   Pharmacie de l'Étoile — Design system
   Palette : ciel nocturne (guide, confiance) + vert pin (santé) + or (étoile)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
	/* Couleurs */
	--ink-navy: #14213D;
	--paper: #F1F3EF;
	--paper-warm: #F7F6F1;
	--pine: #2C5A4E;
	--pine-dark: #1E4038;
	--pine-light: #6FBE9E;
	--star-gold: #C79A46;
	--star-gold-light: #E4C57E;
	--text-body: #2A3038;
	--text-muted: #5B6470;
	--white: #FFFFFF;
	--border-soft: #DDE1DA;

	/* Typographie */
	--font-display: 'Fraunces', Georgia, serif;
	--font-body: 'Inter', -apple-system, sans-serif;
	--font-mono: 'IBM Plex Mono', 'Courier New', monospace;

	/* Rayon / ombre */
	--radius: 14px;
	--shadow-card: 0 4px 24px rgba(20, 33, 61, 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--text-body);
	background: var(--paper);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--pine); text-decoration: none; }
a:hover { color: var(--pine-dark); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--ink-navy);
	line-height: 1.15;
	margin: 0 0 0.5em;
	font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.container {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 24px;
}

/* Focus visible pour l'accessibilité clavier */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--star-gold);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}

/* ---------- Header / Navigation ---------- */

.site-header {
	background: var(--ink-navy);
	color: var(--white);
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-header .container {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding-top: 16px;
	padding-bottom: 14px;
	gap: 10px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--white);
	font-family: var(--font-display);
	font-size: clamp(1.7rem, 3vw, 2.6rem);
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
	animation: heroTitleGlow 9s ease-in-out infinite;
	animation-delay: -3s;
}

.brand .star-mark { color: var(--star-gold); font-size: 1.3rem; }

.main-nav {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}

.lang-switch {
	display: flex;
	gap: 4px;
	margin-inline-start: 14px;
	padding-inline-start: 12px;
	border-inline-start: 1px solid rgba(255,255,255,0.2);
	flex-shrink: 0;
}

.lang-switch a {
	font-size: 0.82rem;
	padding: 6px 10px;
}

.lang-switch a.active {
	background: rgba(255,255,255,0.16);
	color: var(--white);
}

.main-nav a {
	color: rgba(255,255,255,0.82);
	font-size: 0.94rem;
	padding: 8px 12px;
	border-radius: 999px;
	transition: background 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

@media (min-width: 861px) {
	.main-nav { flex-wrap: nowrap; }
}

.main-nav a:hover, .main-nav a.active {
	background: rgba(255,255,255,0.1);
	color: var(--white);
}

.nav-toggle {
	display: none;
	background: none;
	border: 1px solid rgba(255,255,255,0.3);
	color: var(--white);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 1rem;
}

@media (max-width: 860px) {
	.main-nav { display: none; width: 100%; flex-direction: column; gap: 0; padding-top: 10px; }
	.main-nav.open { display: flex; }
	.main-nav a { padding: 12px 6px; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
	.nav-toggle { display: block; }
}

/* ---------- Hero (avec motif étoile) ---------- */

.hero {
	position: relative;
	background: linear-gradient(180deg, var(--ink-navy) 0%, #1C2E52 100%);
	color: var(--white);
	overflow: hidden;
	padding: 46px 0 52px;
}

.hero-star-field {
	position: absolute;
	inset: 0;
	opacity: 0.55;
	pointer-events: none;
}

.hero-content { position: relative; max-width: 100%; text-align: center; }

.hero .eyebrow {
	font-family: var(--font-mono);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.78rem;
	color: var(--star-gold-light);
	margin-bottom: 10px;
	display: block;
}

.hero h1 {
	color: var(--white);
	font-size: 1.55rem;
	white-space: normal;
	max-width: none;
	animation: heroTitleGlow 9s ease-in-out infinite;
}

@keyframes heroTitleGlow {
	0%, 28% { color: var(--white); }
	33%, 61% { color: var(--pine-light); }
	66%, 94% { color: var(--star-gold); }
	100% { color: var(--white); }
}

.hero .lead {
	font-size: 1.08rem;
	color: rgba(255,255,255,0.82);
	max-width: 100%;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; justify-content: center; }

/* ---------- Boutons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 0.95rem;
	padding: 13px 26px;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-gold { background: var(--star-gold); color: var(--ink-navy); }
.btn-gold:hover { background: var(--star-gold-light); color: var(--ink-navy); }

.btn-outline {
	background: transparent;
	border: 1.5px solid rgba(255,255,255,0.5);
	color: var(--white);
}
.btn-outline:hover { border-color: var(--white); color: var(--white); }

.btn-pine { background: var(--pine); color: var(--white); }
.btn-pine:hover { background: var(--pine-dark); color: var(--white); }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-alt { background: var(--white); }

.section-head { max-width: 620px; margin: 0 0 40px; }

.eyebrow-inline {
	font-family: var(--font-mono);
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-size: 0.76rem;
	color: var(--pine);
	display: block;
	margin-bottom: 10px;
}

/* ---------- Cartes ---------- */

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
	.grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
	background: var(--white);
	border-radius: var(--radius);
	padding: 28px;
	box-shadow: var(--shadow-card);
	border: 1px solid var(--border-soft);
}

.card .star-bullet {
	color: var(--star-gold);
	font-size: 1.1rem;
	margin-bottom: 14px;
	display: block;
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- Bandeau horaires (style étiquette) ---------- */

.hours-strip {
	background: var(--pine);
	color: var(--white);
	border-radius: var(--radius);
	padding: 24px 28px;
	font-family: var(--font-mono);
}

.hours-strip .hours-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px dashed rgba(255,255,255,0.25);
	font-size: 0.92rem;
}
.hours-strip .hours-row:last-child { border-bottom: none; }

/* ---------- Formulaires ---------- */

.form-group { margin-bottom: 18px; }

.form-label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--ink-navy);
	margin-bottom: 6px;
}

.form-control {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--border-soft);
	border-radius: 10px;
	font-family: var(--font-body);
	font-size: 0.98rem;
	background: var(--white);
	color: var(--text-body);
}

.form-control:focus {
	border-color: var(--pine);
	outline: none;
	box-shadow: 0 0 0 3px rgba(44, 90, 78, 0.15);
}

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

.alert {
	padding: 14px 18px;
	border-radius: 10px;
	margin-bottom: 20px;
	font-size: 0.95rem;
}
.alert-success { background: #E4F1EA; color: var(--pine-dark); border: 1px solid #BEDDCC; }
.alert-danger { background: #FBEAEA; color: #8A2E2E; border: 1px solid #F1C6C6; }

/* ---------- Footer ---------- */

.site-footer {
	background: var(--ink-navy);
	color: rgba(255,255,255,0.75);
	padding: 56px 0 28px;
	margin-top: 40px;
}

.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,0.75); }
.site-footer a:hover { color: var(--star-gold-light); }

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid rgba(255,255,255,0.12);
}

@media (max-width: 760px) {
	.footer-grid { grid-template-columns: 1fr; }
}

.footer-bottom {
	padding-top: 20px;
	font-size: 0.85rem;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	color: rgba(255,255,255,0.5);
}

/* ---------- Fil d'ariane simple ---------- */

.page-intro {
	background: var(--paper-warm);
	padding: 48px 0;
	border-bottom: 1px solid var(--border-soft);
}
.page-intro h1 { margin-bottom: 8px; }
.page-intro .lead { color: var(--text-muted); max-width: 640px; }

/* ---------- Support RTL (arabe) ---------- */

html[dir="rtl"] body {
	font-family: 'Inter', 'Tahoma', var(--font-body);
}

html[dir="rtl"] .lang-switch {
	border-inline-start: none;
	border-inline-end: 1px solid rgba(255,255,255,0.2);
}

html[dir="rtl"] .page-intro,
html[dir="rtl"] .section-head {
	text-align: right;
}

html[dir="rtl"] .footer-bottom {
	direction: rtl;
}

/* Logique plutôt que gauche/droite : les propriétés margin-inline-*/padding-inline-*
   utilisées ci-dessus s'inversent déjà automatiquement selon la direction du document. */
