/* ==========================================================================
   www.anthonioz.ch – feuille de style commune
   Carte de visite (index.html) et pages annexes : protection des données,
   confirmation d’envoi, pages d’erreur, pages d’échec de mail.php.
   Écrite à la main, sans outil de construction. Après une modification,
   augmenter le numéro ?v= dans toutes les pages et dans mail.php.
   ========================================================================== */

@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/geist-var.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/geist-mono-var.woff2) format('woff2'); }
@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
	--texte: #eef2ff; --doux: rgba(226, 232, 255, .76); --discret: rgba(226, 232, 255, .56);
	--corail: #ff9a8b; --lilas: #c3a6ff; --cyan: #6fe3ff;
	--degrade: linear-gradient(120deg, #ffb4a8 0%, #dcc6ff 45%, #a2efff 100%);
	--police: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
	--objet: 16.5rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; font-family: var(--police); color: var(--texte); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Fond : photo du Jet d’eau et filtre du site d’origine ---------- */
.fond { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #7d86a8; }
.fond img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.fond::after { content: ""; position: absolute; inset: 0; z-index: 1;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.16'/%3E%3C/svg%3E"), linear-gradient(60deg, rgba(255, 165, 150, .5) 5%, rgba(0, 228, 255, .35));
	background-size: 200px 200px, cover; }
/* Voile clair qui s’efface à l’ouverture de la page (effet du site d’origine) */
.fond::before { content: ""; position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none; background: #fff linear-gradient(60deg, rgba(255, 165, 150, .5) 5%, rgba(0, 228, 255, .35)); }

/* ---------- Carte de verre ---------- */
.scene { flex: 1; display: grid; place-items: center; padding: calc(1.5rem + var(--objet) * .42) 1rem 1.25rem; perspective: 1400px; }
.carte { position: relative; width: min(100%, 26.5rem); padding: calc(var(--objet) * .52 + .4rem) 2rem 1.9rem; border-radius: 30px; text-align: center;
	background: linear-gradient(165deg, rgba(30, 35, 62, .56), rgba(10, 12, 28, .74));
	-webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
	box-shadow: 0 50px 110px -40px rgba(3, 6, 20, .85), 0 20px 40px -26px rgba(3, 6, 20, .6), inset 0 1px 0 rgba(255, 255, 255, .14);
	transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
/* Bordure irisée qui tourne lentement */
.carte::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
	background: conic-gradient(from var(--angle), rgba(255, 154, 139, .95), rgba(195, 166, 255, .9), rgba(111, 227, 255, .95), rgba(255, 255, 255, .15) 62%, rgba(255, 255, 255, .15) 80%, rgba(255, 154, 139, .95));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
/* Lumière qui suit le pointeur */
.carte::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
	background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .1), transparent 45%); }

/* ---------- Goutte de verre (WebGL, voir carte.js) ---------- */
.objet-zone { position: absolute; left: 50%; top: 0; z-index: 1; width: var(--objet); height: var(--objet); transform: translate(-50%, -46%); pointer-events: none; }
.objet-zone::before { content: ""; position: absolute; inset: 24%; z-index: -1; border-radius: 50%; filter: blur(26px);
	background: radial-gradient(circle, rgba(111, 227, 255, .42), rgba(255, 154, 139, .26) 50%, transparent 72%); }
.objet { display: block; width: 100%; height: 100%; }
/* Aspect de secours, sans JavaScript ou sans WebGL */
.objet-secours { display: none; position: absolute; inset: 20%; border-radius: 50%;
	background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 16%), radial-gradient(circle at 70% 76%, rgba(111, 227, 255, .85), transparent 46%), radial-gradient(circle at 26% 72%, rgba(255, 154, 139, .8), transparent 50%), radial-gradient(circle, rgba(195, 166, 255, .55), rgba(20, 24, 44, .25) 72%);
	box-shadow: inset 0 0 26px rgba(255, 255, 255, .4), inset 0 -8px 24px rgba(111, 227, 255, .35), 0 24px 50px -12px rgba(111, 227, 255, .5); }
html:not(.js) .objet-secours, html.sans-webgl .objet-secours { display: block; }
html:not(.js) .objet, html.sans-webgl .objet { display: none; }

/* ---------- Textes de la carte ---------- */
.hud { display: inline-flex; align-items: center; gap: .55rem; margin: 0; padding: .4rem .75rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .045);
	font: 500 .68rem/1 var(--mono); letter-spacing: .06em; color: rgba(170, 240, 255, .9); }
.pastille { width: .42rem; height: .42rem; border-radius: 50%; background: var(--cyan); }
h1 { margin: 1.05rem 0 0; font-size: clamp(2rem, 1.6rem + 1.8vw, 2.45rem); font-weight: 600; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance;
	background: linear-gradient(180deg, #ffffff 35%, #c9d4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.qualite { margin: .75rem 0 0; font: 500 .76rem/1.3 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--doux); }

/* ---------- Boutons ---------- */
.actions { display: grid; gap: .65rem; margin-top: 1.8rem; }
.btn-principal { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem .85rem .85rem 1.3rem; border-radius: 18px; text-align: left; text-decoration: none;
	color: #0a0d1a; background: var(--degrade); background-size: 180% 180%; background-position: 0% 50%; font-size: 1.02rem; font-weight: 600; line-height: 1.2;
	box-shadow: 0 16px 36px -16px rgba(162, 239, 255, .7), 0 16px 36px -18px rgba(255, 180, 168, .65); transition: background-position .8s ease, transform .3s ease; }
.btn-principal small { display: block; margin-top: .22rem; font: 500 .72rem/1.2 var(--mono); letter-spacing: .01em; color: rgba(10, 13, 26, .7); }
.btn-principal .fleche { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 12px; background: rgba(10, 13, 26, .1); }
.btn-principal:hover { background-position: 100% 50%; transform: translateY(-2px); }
button.btn-principal { width: 100%; margin: 0; border: 0; font-family: inherit; cursor: pointer; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.btn-verre { display: flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3.1rem; margin: 0; padding: .8rem 1rem; border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .055); color: var(--texte); font: 500 .95rem/1.1 var(--police); text-decoration: none; cursor: pointer;
	transition: background-color .25s, border-color .25s; }
.btn-verre:hover, .btn-verre[aria-expanded="true"] { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .32); }
/* Sans JavaScript, le formulaire est déjà ouvert : le bouton « Écrire » est inutile */
html:not(.js) [aria-controls="contact"] { display: none; }
html:not(.js) .duo { grid-template-columns: 1fr; }

/* ---------- Formulaire repliable ---------- */
.repli { display: grid; grid-template-rows: 1fr; }
html.js .repli { grid-template-rows: 0fr; transition: grid-template-rows .6s cubic-bezier(.2, .7, .2, 1); }
html.js .repli.ouvert { grid-template-rows: 1fr; }
.repli-corps { min-height: 0; overflow: hidden; }
html.js .repli:not(.ouvert) .repli-corps { visibility: hidden; transition: visibility 0s .6s; }
.form { display: grid; gap: .95rem; margin: 0; padding: 1.5rem 0 .3rem; text-align: left; }
.champ label { display: block; margin: 0 0 .4rem; font: 500 .68rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
.champ .opt { text-transform: none; letter-spacing: 0; color: var(--discret); }
.champ input, .champ textarea { display: block; width: 100%; margin: 0; padding: .75rem .9rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(6, 8, 20, .38);
	color: var(--texte); font: 400 1rem/1.4 var(--police); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.champ textarea { min-height: 7.5rem; resize: vertical; }
.champ input:focus, .champ textarea:focus { outline: none; border-color: rgba(162, 239, 255, .85); box-shadow: 0 0 0 4px rgba(111, 227, 255, .2); background: rgba(6, 8, 20, .55); }
.note { margin: 0; font-size: .8rem; line-height: 1.55; color: var(--doux); }
.note a { color: #bff4ff; text-underline-offset: .2em; }
.envoyer { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; min-height: 3.2rem; margin: 0; padding: .9rem 1rem; border: 0; border-radius: 16px; cursor: pointer;
	color: #0a0d1a; background: var(--degrade); background-size: 180% 180%; font: 600 1rem/1 var(--police); transition: background-position .8s ease; }
.envoyer:hover { background-position: 100% 50%; }

/* ---------- Pied de page ---------- */
.pied { padding: .5rem 1rem 1.5rem; text-align: center; font: 500 .7rem/1.9 var(--mono); letter-spacing: .06em; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
.pied a { text-underline-offset: .25em; white-space: nowrap; }
.pied .credit { white-space: nowrap; }
.pied .sep { margin: 0 .35em; opacity: .7; }

/* ---------- Pages annexes : confirmation, erreurs, échecs d’envoi ---------- */
.code { margin: .2rem 0 0; font-size: clamp(4.5rem, 3.5rem + 5vw, 6.5rem); font-weight: 700; line-height: .95; letter-spacing: -.05em;
	background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 14px 28px rgba(111, 227, 255, .2)); }
.code + h1 { margin-top: .6rem; }
.medaille { display: grid; place-items: center; width: 4.4rem; height: 4.4rem; margin: .2rem auto 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); }
.medaille svg { width: 58%; height: 58%; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.texte { max-width: 30rem; margin: .9rem auto 0; font-size: 1rem; line-height: 1.6; color: var(--doux); }
.texte a { color: #bff4ff; text-underline-offset: .2em; }
.carte--annexe .actions { margin-top: 1.6rem; }
.copie { margin: 1.4rem 0 0; text-align: left; }
.copie label { display: block; margin: 0 0 .4rem; font: 500 .68rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--doux); }
.copie textarea { display: block; width: 100%; min-height: 6.5rem; max-height: 14rem; resize: vertical; padding: .75rem .9rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .16);
	background: rgba(6, 8, 20, .38); color: var(--texte); font: 400 .95rem/1.5 var(--police); }
.copier { margin-top: .55rem; padding: .5rem .95rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: var(--texte); font: 500 .85rem/1.2 var(--police); cursor: pointer; }
.copier:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Page de texte : protection des données ---------- */
.carte--texte { width: min(100%, 46rem); text-align: left; padding-left: clamp(1.3rem, 4vw, 3rem); padding-right: clamp(1.3rem, 4vw, 3rem); padding-bottom: 2.4rem; }
.carte--texte > .hud { display: flex; width: max-content; margin: 0 auto; }
.carte--texte h1 { text-align: center; }
.carte--texte .chapeau { max-width: 36rem; margin: 1rem auto 0; text-align: center; font-size: 1.02rem; line-height: 1.6; color: var(--doux); }
.carte--texte section { margin-top: 2.1rem; padding-top: 1.6rem; border-top: 1px solid rgba(255, 255, 255, .1); scroll-margin-top: .5rem; }
.carte--texte h2 { margin: 0 0 .75rem; font-size: 1.2rem; font-weight: 600; letter-spacing: -.015em; color: #fff; }
.carte--texte p, .carte--texte li { font-size: .98rem; line-height: 1.65; color: rgba(236, 240, 255, .86); }
.carte--texte p { margin: .7rem 0 0; }
.carte--texte ul { margin: .7rem 0 0; padding-left: 1.2rem; }
.carte--texte li + li { margin-top: .4rem; }
.carte--texte li::marker { color: var(--cyan); }
.carte--texte a { color: #bff4ff; text-underline-offset: .2em; }
.carte--texte strong { color: #fff; font-weight: 600; }
.bref { margin-top: 1.8rem; padding: 1.1rem 1.3rem; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .045); }
.bref ul { margin: 0; }
.maj { font: 500 .78rem/1.5 var(--mono); letter-spacing: .02em; color: var(--discret) !important; }
.carte--texte .retour { display: flex; justify-content: center; margin-top: 2.2rem; }
.carte--texte .retour .btn-principal { min-width: min(100%, 20rem); }
.scene--texte { --objet: 11rem; }
.hud a { color: inherit; text-decoration: none; }
.hud a:hover { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Petits écrans ---------- */
@media (max-width: 30em) {
	:root { --objet: 13.5rem; }
	.scene--texte { --objet: 9.5rem; }
	.carte { padding-left: 1.3rem; padding-right: 1.3rem; }
}
@media (prefers-reduced-transparency: reduce) {
	.carte { background: rgba(14, 17, 34, .96); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Animations (coupées si le visiteur a demandé moins d’animations) ---------- */
@media (prefers-reduced-motion: no-preference) {
	/* « backwards » : l’état de départ s’applique pendant le délai, puis la règle normale reprend
	   (indispensable pour l’inclinaison de la carte, qui passe par transform) */
	.fond::before { animation: voile 1.8s ease-out .1s backwards; }
	.carte::before { animation: tourne 9s linear infinite; }
	.pastille { animation: pouls 2.4s ease-out infinite; }
	.carte { animation: apparition 1s cubic-bezier(.2, .7, .2, 1) .15s backwards; }
	.objet-zone { animation: flotte 1.4s cubic-bezier(.2, .7, .2, 1) .35s backwards; }
	html.js .repli.ouvert .form > * { animation: monte .5s cubic-bezier(.2, .7, .2, 1) backwards; }
	html.js .repli.ouvert .form > :nth-child(2) { animation-delay: .05s; }
	html.js .repli.ouvert .form > :nth-child(3) { animation-delay: .1s; }
	html.js .repli.ouvert .form > :nth-child(4) { animation-delay: .15s; }
	html.js .repli.ouvert .form > :nth-child(n+5) { animation-delay: .2s; }
	.fleche .ico { transition: transform .3s; }
	.btn-principal:hover .fleche .ico { transform: translate(2px, -2px); }
}
@media (prefers-reduced-motion: reduce) {
	.carte, html.js .repli { transition: none; }
}
@keyframes voile { from { opacity: 1; } to { opacity: 0; } }
@keyframes tourne { to { --angle: 360deg; } }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(111, 227, 255, .6); } 75%, 100% { box-shadow: 0 0 0 .55rem rgba(111, 227, 255, 0); } }
@keyframes apparition { from { opacity: 0; transform: translateY(26px) scale(.98); } }
@keyframes flotte { from { opacity: 0; transform: translate(-50%, -30%) scale(.85); } }
@keyframes monte { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Mode contraste élevé de Windows ---------- */
@media (forced-colors: active) {
	h1, .code { color: CanvasText; background: none; }
	.carte::before { display: none; }
	.carte { border: 1px solid CanvasText; }
}
