/* ============================================================
   Ensemblo - site vitrine
   Aucune police ni ressource externe (RGPD) : tout est local.
   ============================================================ */

:root {
    --encre: #1b2140;
    --encre-douce: #565d7a;
    --papier: #fbfbfd;
    --brume: #eef1f8;
    --trait: #dfe3ee;
    --bleu: #2f5bea;
    --bleu-fonce: #2146c4;
    --corail: #ff6b4a;
    --lagon: #14b8a6;
    --rond: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", "Segoe UI", system-ui, sans-serif;
    --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --largeur: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font-family: var(--texte);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--encre);
    background: var(--papier);
}

img { max-width: 100%; display: block; }
a { color: var(--bleu); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 3px solid var(--bleu);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, h3 { font-family: var(--rond); line-height: 1.12; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 1.5rem; }
.texte-court { max-width: 62ch; }
.doux { color: var(--encre-douce); }

.lien-evitement {
    position: absolute; left: -999px; top: .5rem; background: var(--encre); color: #fff;
    padding: .5rem 1rem; border-radius: 8px; z-index: 10;
}
.lien-evitement:focus { left: .5rem; }

/* ---------- Boutons ---------- */
.bouton {
    display: inline-block; font: 600 1rem/1 var(--texte); text-decoration: none; cursor: pointer;
    background: var(--bleu); color: #fff; border: 0; border-radius: 999px; padding: 1rem 1.6rem;
}
.bouton:hover { background: var(--bleu-fonce); }
.bouton-clair { background: transparent; color: var(--encre); box-shadow: inset 0 0 0 2px var(--trait); }
.bouton-clair:hover { background: var(--brume); }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 5; background: rgba(251, 251, 253, .92); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.entete.defile { border-bottom-color: var(--trait); }
.entete-contenu { display: flex; align-items: center; gap: 2rem; height: 72px; }
.entete .logo img { height: 40px; width: auto; }
.menu { display: flex; gap: 1.75rem; margin-left: auto; }
.menu a { color: var(--encre); text-decoration: none; font-weight: 500; }
.menu a:hover { color: var(--bleu); }
.entete .bouton { padding: .75rem 1.25rem; font-size: .95rem; white-space: nowrap; }

/* ---------- Accueil (hero) : le diagramme des trois cercles ---------- */
.hero { padding: 4.5rem 0 5rem; }
.hero-grille { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .accroche { font-size: 1.25rem; color: var(--encre-douce); max-width: 46ch; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-note { margin-top: 1.25rem; font-size: .95rem; color: var(--encre-douce); }

.venn { position: relative; width: 100%; max-width: 500px; aspect-ratio: 1 / 1; margin-left: auto; }
.venn .cercle {
    position: absolute; width: 58%; aspect-ratio: 1 / 1; border-radius: 50%;
    mix-blend-mode: multiply; display: flex; padding: 12%;
    font-family: var(--rond); font-weight: 700; font-size: clamp(.95rem, 1.6vw, 1.15rem); line-height: 1.25;
    transition: transform 1.1s cubic-bezier(.2, .8, .2, 1);
}
.venn .cercle span { max-width: 10ch; }
.cercle-offres { background: #a9bcf7; left: 4%;  top: 6%;  align-items: flex-start; justify-content: flex-start; }
.cercle-comptes { background: #ffbfaf; right: 4%; top: 6%;  align-items: flex-start; justify-content: flex-end; text-align: right; }
.cercle-info   { background: #9fe3da; left: 21%; bottom: 3%; align-items: flex-end; justify-content: center; text-align: center; }
.venn-centre {
    position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%);
    background: var(--papier); border-radius: 999px; padding: .55rem .9rem;
    display: flex; align-items: center; gap: .45rem; font-family: var(--rond); font-weight: 800;
    box-shadow: 0 6px 24px rgba(27, 33, 64, .14);
}
.venn-centre img { width: 22px; height: 22px; }
/* Le seul mouvement de la page : les cercles se rejoignent au chargement */
.js .venn:not(.rassemble) .cercle-offres  { transform: translate(-14%, -10%); }
.js .venn:not(.rassemble) .cercle-comptes { transform: translate(14%, -10%); }
.js .venn:not(.rassemble) .cercle-info    { transform: translate(0, 16%); }
.js .venn .venn-centre { transition: opacity .5s .8s; }
.js .venn:not(.rassemble) .venn-centre { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
    .venn .cercle, .js .venn .venn-centre { transition: none; }
}

/* ---------- Le constat ---------- */
.constat { background: var(--encre); color: #fff; padding: 4.5rem 0; }
.constat h2 { max-width: 22ch; }
.constat-liste { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.constat-liste li { border-top: 2px solid rgba(255, 255, 255, .25); padding-top: 1rem; color: #d7dbea; }
.constat-liste strong { display: block; color: #fff; font-family: var(--rond); font-size: 1.15rem; margin-bottom: .35rem; }

/* ---------- Fonctionnalités : trois familles, une couleur chacune ---------- */
.section { padding: 5.5rem 0; }
.intro-section { max-width: 60ch; margin-bottom: 3rem; }
.familles { display: grid; gap: 1.5rem; }
.famille {
    display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem;
    padding: 2.25rem; border-radius: 28px; background: var(--brume);
}
.famille-titre { display: flex; flex-direction: column; gap: .9rem; }
.famille-titre .pastille { width: 52px; height: 52px; border-radius: 50%; }
.famille-offres .pastille  { background: var(--bleu); }
.famille-comptes .pastille { background: var(--corail); }
.famille-info .pastille    { background: var(--lagon); }
.famille-titre h3 { font-size: 1.6rem; margin: 0; }
.famille-titre p { margin: 0; color: var(--encre-douce); }
.famille ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; }
.famille li strong { display: block; margin-bottom: .2rem; }
.famille li span { color: var(--encre-douce); font-size: .98rem; }

/* ---------- Aperçu de l'application ---------- */
.apercu { background: var(--brume); }
.apercu-grille { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: center; }
.ecran {
    background: #fff; border-radius: 18px; border: 1px solid var(--trait);
    box-shadow: 0 30px 60px -20px rgba(27, 33, 64, .25); overflow: hidden; font-size: .9rem;
}
.ecran-barre { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--trait); font-weight: 700; }
.ecran-barre img { width: 22px; height: 22px; }
.ecran-corps { padding: 1.25rem; }
.ecran-offre { border: 1px solid var(--trait); border-radius: 12px; padding: 1rem; }
.ecran-fournisseur { color: var(--bleu); font-weight: 700; font-size: .8rem; }
.ecran-titre { font-family: var(--rond); font-weight: 800; font-size: 1.15rem; margin: .1rem 0 .75rem; }
.ecran-ligne { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-top: 1px solid var(--brume); }
.ecran-qte { display: inline-flex; align-items: center; gap: .6rem; background: var(--brume); border-radius: 8px; padding: .15rem .6rem; font-weight: 700; }
.ecran-total { display: flex; justify-content: space-between; font-weight: 800; padding-top: .75rem; border-top: 2px solid var(--trait); margin-top: .25rem; }
.ecran-statuts { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.statut { font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; }
.statut-ok { background: #dcf5ef; color: #0f766e; }
.statut-attente { background: #ffe8e1; color: #c2410c; }
.apercu ul { padding-left: 1.2rem; }
.apercu li { margin-bottom: .5rem; }

/* ---------- Démarrage : c'est une vraie suite d'étapes ---------- */
.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.etapes li { counter-increment: etape; }
.etapes li::before {
    content: counter(etape); display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%; margin-bottom: 1rem;
    font-family: var(--rond); font-weight: 800; font-size: 1.3rem; color: #fff; background: var(--encre);
}

/* ---------- L'histoire ---------- */
.histoire { padding: 5rem 0; }
.citation {
    max-width: 52rem; margin: 0; font-family: var(--rond); font-weight: 700;
    font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.35;
}
.citation-auteur { margin-top: 1.25rem; color: var(--encre-douce); font-size: 1rem; }

/* ---------- Tarifs ---------- */
.tarifs-boite {
    display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center;
    background: var(--encre); color: #fff; border-radius: 32px; padding: 3rem;
}
.tarifs-boite p { color: #d7dbea; }
.tarifs-liste { list-style: none; padding: 0; margin: 0; }
.tarifs-liste li { padding: .6rem 0 .6rem 1.9rem; position: relative; border-bottom: 1px solid rgba(255, 255, 255, .15); }
.tarifs-liste li::before { content: ""; position: absolute; left: 0; top: 1rem; width: 12px; height: 12px; border-radius: 50%; background: var(--lagon); }

/* ---------- Questions ---------- */
.questions { max-width: 50rem; }
.questions details { border-bottom: 1px solid var(--trait); }
.questions summary {
    cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; position: relative;
    font-family: var(--rond); font-weight: 700; font-size: 1.15rem;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
    content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
    font-size: 1.6rem; color: var(--bleu); transition: transform .2s;
}
.questions details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.questions details p { color: var(--encre-douce); padding-bottom: 1rem; margin: 0; max-width: 62ch; }

/* ---------- Contact ---------- */
.contact { background: var(--brume); }
.contact-grille { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3.5rem; align-items: start; }
.formulaire { background: #fff; border-radius: 24px; padding: 2rem; border: 1px solid var(--trait); }
.champ { display: block; margin-bottom: 1.1rem; }
.champ span { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.champ input, .champ textarea, .champ select {
    width: 100%; font: inherit; font-size: 1rem; color: var(--encre);
    padding: .8rem 1rem; border: 1.5px solid var(--trait); border-radius: 12px; background: var(--papier);
}
.champ input:focus, .champ textarea:focus, .champ select:focus { border-color: var(--bleu); outline: none; box-shadow: 0 0 0 3px rgba(47, 91, 234, .18); }
.champs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.piege { position: absolute; left: -9999px; }
.message-envoi { border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; font-weight: 600; }
.message-ok { background: #dcf5ef; color: #0f766e; }
.message-erreur { background: #ffe8e1; color: #c2410c; }
.petit { font-size: .88rem; color: var(--encre-douce); }

/* ---------- Pied de page ---------- */
.pied { padding: 3rem 0; border-top: 1px solid var(--trait); }
.pied-contenu { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: center; }
.pied img { height: 32px; width: auto; }
.pied nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.pied a { color: var(--encre-douce); text-decoration: none; }
.pied a:hover { color: var(--bleu); }

/* ---------- Page simple (mentions légales) ---------- */
.page-simple { padding: 4rem 0 5rem; }
.page-simple h2 { font-size: 1.4rem; margin-top: 2.5rem; }
.page-simple p, .page-simple li { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.sommaire { background: var(--brume); border-radius: 16px; padding: 1.25rem 1.5rem; margin: 1.5rem 0 1rem; }
.sommaire ol { margin: 0; padding-left: 1.4rem; columns: 2; column-gap: 2rem; }
.sommaire li { margin-bottom: .3rem; text-align: left; font-size: .95rem; break-inside: avoid; }
.sommaire a { color: var(--encre); text-decoration: none; }
.sommaire a:hover { color: var(--bleu); text-decoration: underline; }
@media (max-width: 600px) { .sommaire ol { columns: 1; } }
.page-simple .retour-accueil { margin-top: 3rem; text-align: left; }
.page-simple ul { padding-left: 1.25rem; margin: 0 0 1em; }
.page-simple li { margin-bottom: .4rem; }
.a-completer { background: #fff3c4; padding: 0 .3rem; border-radius: 4px; }

/* ---------- Écrans plus petits ---------- */
@media (max-width: 900px) {
    .hero-grille, .apercu-grille, .contact-grille, .tarifs-boite { grid-template-columns: 1fr; }
    .venn { margin: 0 auto; max-width: 420px; }
    .famille { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.75rem; }
    .constat-liste, .etapes { grid-template-columns: 1fr; gap: 1.75rem; }
    .menu { display: none; }
    .entete .bouton { margin-left: auto; }
}
@media (max-width: 600px) {
    .famille ul, .champs-2 { grid-template-columns: 1fr; }
    .tarifs-boite { padding: 2rem; }
    .hero { padding-top: 2.5rem; }
    .entete .logo img { height: 32px; }
    .entete .bouton { padding: .6rem 1rem; font-size: .85rem; }
}
