/* Site de ClemalaERP : police du système comme l'appli, mode sombre automatique, aucun dégradé, rien d'externe (CSP, vie privée).
   Direction « Tous vos appareils » choisie par Bruno le 2026-11-26 : couleurs de l'icône (mer, soleil, palmier),
   les cinq appareils posés en ouverture, une bande de couleur par type de fonctions. */
:root {
    --fond: #f5f5f7;
    --surface: #ffffff;
    --texte: #102a3a;
    --secondaire: #6e6e73;
    --trait: rgba(60, 60, 67, .18);
    --bleu: #0a6f93;       /* la mer de l'icône */
    --bleu-texte: #0a6f93; /* contraste 5,6 sur blanc */
    --soleil: #f0b90b;
    --palmier: #8b4a3c;
    --nuit: #102a3a;
    --algue: #2f6f5e;
    --sur-bleu: #ffffff;
    --rayon: 14px;
    --marge: clamp(16px, 5vw, 48px);
    --police: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
    color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
    :root {
        --fond: #000000;
        --surface: #1c1c1e;
        --texte: #f5f5f7;
        --secondaire: #98989d;
        --trait: rgba(84, 84, 88, .6);
        --bleu: #1d8fb8;
        --bleu-texte: #5ec0e8;
    }
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--fond);
    color: var(--texte);
    font: 400 1.0625rem/1.5 var(--police);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}
a { color: var(--bleu-texte); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 700; margin-bottom: 20px; }
h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.01em; }

/* ---- Bandeau du haut, translucide comme une barre de navigation iOS ---- */
.haut {
    position: sticky; top: 0; z-index: 2;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 6px var(--marge);
    background: color-mix(in srgb, var(--fond) 80%, transparent);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--trait);
}
.marque { display: flex; align-items: center; gap: 10px; color: var(--texte); font-weight: 600; font-size: 1.0625rem; }
.marque:hover { text-decoration: none; }
.marque img { background: #fff; border-radius: 22%; }
.langues { display: flex; gap: 2px; }
.langues a { color: var(--secondaire); padding: 10px 8px; min-width: 44px; text-align: center; font-size: .9375rem; }
.langues a[aria-current] { color: var(--texte); font-weight: 600; }

/* ---- Ouverture ---- */
.ouverture { text-align: center; max-width: 760px; margin: 0 auto; padding: clamp(48px, 9vw, 112px) var(--marge) clamp(24px, 4vw, 48px); }
.accroche { font-size: clamp(1.25rem, 2.6vw, 1.625rem); line-height: 1.35; color: var(--secondaire); margin: 16px auto 32px; max-width: 30ch; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.bouton {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 22px;
    border-radius: 980px; background: var(--bleu); color: var(--sur-bleu); font-weight: 500; overflow-wrap: anywhere;
}
.bouton:hover { text-decoration: none; filter: brightness(1.08); }
.bouton-second { background: transparent; color: var(--bleu-texte); box-shadow: inset 0 0 0 1px var(--bleu); }
.note { color: var(--secondaire); font-size: .9375rem; margin: 20px 0 0; }

/* ---- Blocs ---- */
.bloc { max-width: 1040px; margin: 0 auto; padding: clamp(24px, 4vw, 48px) var(--marge); }
.presentation { font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.5; max-width: 62ch; margin: 0 auto; text-align: center; }

.carte { background: var(--surface); border-radius: var(--rayon); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.carte p { margin: 0; color: var(--secondaire); flex: 1; }
.lien { font-weight: 500; align-self: flex-start; display: inline-block; padding: 10px 0; }
.liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--rayon); }
.liste li { padding: 12px 16px; position: relative; }
.liste li + li::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--trait); }
.liste strong { font-weight: 600; }

/* ---- Accueil : fonctions en rangées texte + capture, alternées sur grand écran ---- */
.sur-titre { margin: 0 0 8px; font-weight: 600; color: var(--secondaire); }
.ouverture h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; max-width: 17ch; margin: 0 auto; }
.ouverture .accroche { max-width: 46ch; font-size: clamp(1.125rem, 2vw, 1.3125rem); }
.fonctions { display: grid; gap: clamp(48px, 8vw, 96px); }
.fonction { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.fonction:nth-child(even) { grid-template-columns: 3fr 2fr; }
.fonction:nth-child(even) > div:first-child { order: 2; }
/* Téléphone posé un peu par-dessus la capture de bureau, côté extérieur de la page */
.avec-telephone { position: relative; margin-bottom: 8%; }
.avec-telephone .telephone { position: absolute; right: -3%; bottom: -12%; width: 21%; }
.avec-telephone .telephone .iphone { box-shadow: 0 0 0 1px var(--trait), 0 14px 34px rgba(16, 42, 58, .28); }
.fonction:nth-child(even) .avec-telephone .telephone { right: auto; left: -3%; }
.avec-telephone .tablette { width: 30%; } /* iPad, un peu plus large qu’un téléphone */
@media (max-width: 720px) { .avec-telephone .telephone, .fonction:nth-child(even) .avec-telephone .telephone { right: 0; left: auto; width: 26%; } }
.fonction p { margin: 0; color: var(--secondaire); font-size: 1.1875rem; }
.capture { width: 100%; height: auto; display: block; }
.etroit { max-width: 760px; }
.partout { font-weight: 600; margin: -16px 0 32px; }
.android p { margin: 0 0 1em; font-size: 1.1875rem; } /* Android mis en avant, plus répandu que l'iPhone en Espagne (Bruno, 2026-11-26) */
.pour-qui p { margin: 0 0 1em; font-size: 1.1875rem; }
.plateformes p { margin: 16px 0 0; color: var(--secondaire); }
.iphone { width: 100%; height: auto; display: block; border-radius: 12%/5.5%; box-shadow: 0 0 0 1px var(--trait), 0 8px 24px rgba(0, 0, 0, .12); }
@media (max-width: 720px) {
    .fonction, .fonction:nth-child(even) { grid-template-columns: 1fr; }
    .fonction:nth-child(even) > div:first-child { order: 0; }
}

/* ---- Pages de lecture (assistance, confidentialité, mentions) ---- */
.lecture { max-width: 760px; }
.lecture h1 { font-size: clamp(2rem, 5vw, 3rem); margin: clamp(16px, 3vw, 32px) 0 24px; }
.lecture h2 { font-size: 1.375rem; margin: 40px 0 12px; }
.lecture p { margin: 0 0 1em; }
.lecture .presentation { text-align: left; margin-bottom: 8px; }
.lecture .note { margin: -12px 0 24px; }
.contact { text-align: center; align-items: center; margin-bottom: 16px; }
.contact p:first-child { color: var(--texte); font-size: 1.1875rem; }
.contact h2 { margin: 0; }

.liste-faq { background: var(--surface); border-radius: var(--rayon); }
.faq + .faq { border-top: 1px solid var(--trait); }
.faq summary {
    cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
    min-height: 44px; padding: 14px 16px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "›"; color: var(--secondaire); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
.faq[open] summary::after { transform: rotate(90deg); }
.faq p { margin: 0; padding: 0 16px 16px; color: var(--secondaire); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* ---- Pied ---- */
.bas { border-top: 1px solid var(--trait); margin-top: clamp(32px, 6vw, 64px); padding: 24px var(--marge) 32px; text-align: center; color: var(--secondaire); font-size: .8125rem; }
.bas nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 20px; margin-bottom: 8px; }
.bas nav a { padding: 10px 0; font-size: .875rem; }
.bas p { margin: 4px 0; }

/* ---- Page iPhone et iPad : un écran par rangée, texte puis iPhone et iPad côte à côte ---- */
.titre-page { font-size: clamp(2rem, 5vw, 3rem); margin: clamp(16px, 3vw, 32px) 0 24px; }
.ecran { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.ecran p { margin: 0; color: var(--secondaire); font-size: 1.1875rem; }
.appareils { display: grid; grid-template-columns: 34fr 66fr; gap: 16px; align-items: end; margin: 0; }
.appareils figcaption { grid-column: 1 / -1; text-align: center; color: var(--secondaire); font-size: .9375rem; } /* même dessin sur Android (Bruno, 2026-11-26) */
.appareils.deux-telephones { grid-template-columns: 1fr 1fr; max-width: 440px; margin: 0 auto; } /* onglet Gestion : iPhone et Android côte à côte */
.ipad { width: 100%; height: auto; display: block; border-radius: 4%; box-shadow: 0 0 0 1px var(--trait), 0 8px 24px rgba(0, 0, 0, .12); }
@media (max-width: 720px) { .ecran { grid-template-columns: 1fr; } }

/* ---- Capture agrandie (app.js) ---- */
.agrandir { display: block; cursor: zoom-in; }
.zoom { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; cursor: zoom-out; }
.zoom::backdrop { background: rgba(0, 0, 0, .8); }
.zoom img { display: block; max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 8px; }
.fermer {
    position: fixed; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .9); color: #1d1d1f; font-size: 1.75rem; line-height: 1; cursor: pointer;
}

/* ---- Pages par fonctions : cartes de l'accueil et liens vers les autres pages ---- */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.carte-lien { color: var(--texte); }
.carte-lien:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--bleu); }
.carte-lien h3 { color: var(--bleu-texte); }

/* ---- Accueil : les cinq appareils sur la même ligne, à leur taille relative ---- */
.etagere { display: flex; justify-content: center; align-items: flex-end; max-width: 1340px; margin: 0 auto; padding: 0 var(--marge); }
.etagere figure { margin: 0; padding: 0 12px; text-align: center; border-bottom: 3px solid var(--trait); }
.etagere figcaption { padding: 14px 0 10px; font-size: .9375rem; font-weight: 600; color: var(--secondaire); }
.appareil-windows, .appareil-mac { flex: 0 1 380px; }
.appareil-ipad { flex: 0 1 214px; }
.appareil-tel { flex: 0 1 112px; }
.etagere .capture { border-radius: 10px; box-shadow: 0 18px 40px rgba(16, 42, 58, .16); }
@media (prefers-reduced-motion: no-preference) {
    .etagere figure { animation: pose .7s cubic-bezier(.2, .8, .2, 1) both; }
    .etagere figure:nth-child(2) { animation-delay: .08s; }
    .etagere figure:nth-child(3) { animation-delay: .16s; }
    .etagere figure:nth-child(4) { animation-delay: .24s; }
    .etagere figure:nth-child(5) { animation-delay: .32s; }
    @keyframes pose { from { transform: translateY(40px); opacity: 0; } }
}

/* VeriFactu : « adaptation en cours », jamais « conforme » ni date (clemala-marketing, verifactu.md) */
.verifactu { text-align: center; margin: 28px auto 0; padding: 0 var(--marge); color: var(--secondaire); font-size: .9375rem; font-weight: 500; }
.encart h2 { margin: 0; font-size: 1.375rem; }
.encart p { font-size: 1.0625rem; }

/* ---- Accueil : une bande de couleur par type de fonctions, vers sa page ---- */
.bande { display: flex; flex-wrap: wrap; margin-top: clamp(48px, 8vw, 96px); } /* les blocs se partagent toute la largeur, d'un bord à l'autre */
.bande a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3vw, 40px) clamp(18px, 2.4vw, 32px); min-height: 220px; color: #fff; }
.bande a:hover { text-decoration: none; filter: brightness(1.08); }
.bande a:focus-visible { outline-offset: -6px; outline-color: #fff; }
.bande strong { font-size: clamp(1.375rem, 2.4vw, 1.875rem); letter-spacing: -.02em; line-height: 1.1; }
.bande span { font-size: 1rem; line-height: 1.45; opacity: .92; }
.bande-achats { background: var(--soleil); color: var(--nuit) !important; }
.bande-achats:focus-visible { outline-color: var(--nuit); }
.bande-banque { background: #0a6f93; }
.bande-ventes { background: var(--palmier); }
.bande-comptable { background: var(--nuit); }
.bande-personnel { background: var(--algue); }
.bande-chantiers { background: #4b4f8c; } /* ajouté le 2026-11-26 : chantiers n'est plus présenté comme une option */
@media (max-width: 1100px) and (min-width: 721px) { .bande a { flex-basis: 30%; } }
.autres { padding-bottom: 0; text-align: center; }
.autres + .bande { margin-top: 0; }

/* ---- Accueil : Android ou iPhone, les deux téléphones côte à côte ---- */
.bloc.android { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.android h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); letter-spacing: -.035em; line-height: 1.02; }
.paire { display: flex; justify-content: center; gap: clamp(16px, 3vw, 28px); }
.paire figure { margin: 0; flex: 0 1 200px; text-align: center; }
.paire figcaption { padding-top: 12px; font-weight: 600; color: var(--secondaire); }

@media (max-width: 720px) {
    .etagere { flex-wrap: wrap; row-gap: 24px; padding: 0 16px; }
    .appareil-windows { display: none; }
    .appareil-mac { flex: 1 1 100%; }
    .appareil-ipad { flex: 0 1 140px; }
    .appareil-tel { flex: 0 1 80px; }
    .etagere figure { padding: 0 6px; }
    .bande a { flex-basis: 40%; }
    .bande a { min-height: 0; }
    .bloc.android { grid-template-columns: 1fr; }
    .paire figure { flex-basis: 150px; }
}

/* ---- Vos documents : pages A4 en vignettes, avec une ombre légère, qui s'agrandissent d'un clic ---- */
.centre { text-align: center; margin-left: auto; margin-right: auto; }
.texte { color: var(--secondaire); font-size: 1.1875rem; margin: 0 0 1em; }
.feuilles { display: flex; justify-content: center; gap: clamp(16px, 3vw, 36px); }
.feuilles figure { margin: 0; flex: 0 1 300px; text-align: center; }
.feuilles figcaption { padding-top: 12px; font-weight: 600; color: var(--secondaire); }
.trois { margin-top: clamp(24px, 4vw, 40px); }
.feuilles .paysage { flex-basis: 900px; } /* trésorerie, A4 paysage */
/* Achats, « Rien à saisir » : la facture PDF reçue, à côté de ce que ClemalaERP en a fait */
.facture-lue { display: grid; grid-template-columns: 2fr 2.4fr; gap: clamp(16px, 3vw, 36px); align-items: center; max-width: 1040px; margin: clamp(24px, 4vw, 40px) auto 0; }
.facture-lue > div { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 20px); }
.facture-lue > div > :first-child { grid-column: 1 / -1; } /* la facture enregistrée en grand, les fiches fournisseur dessous côte à côte */
@media (max-width: 720px) { .facture-lue { grid-template-columns: 1fr; } .facture-lue .a4 { max-width: 360px; margin: 0 auto; } }
.a4 { width: 100%; height: auto; display: block; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px var(--trait), 0 12px 30px rgba(16, 42, 58, .14); }
.documents .lien { padding-top: 24px; }
@media (max-width: 720px) { .feuilles { gap: 10px; } .feuilles figcaption { font-size: .875rem; } }
/* Contour d'appareil générique autour des écrans mobiles (téléphone et tablette), dessiné en CSS, images intactes (Bruno, 2026-11-27). */
.agrandir:has(> .iphone), .agrandir:has(> .ipad) { padding: 3.6%; background: #1b1e22; border-radius: 15% / 7%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 0 0 1px var(--trait), 0 12px 30px rgba(16, 42, 58, .22); }
.agrandir:has(> .ipad) { padding: 2.4%; border-radius: 6% / 4.6%; }
.agrandir > .iphone, .agrandir > .ipad { box-shadow: none; }
.agrandir > .iphone { border-radius: 11.5% / 5.3%; }
.agrandir > .ipad { border-radius: 3.6%; }
.avec-telephone .telephone .agrandir { box-shadow: 0 0 0 1px var(--trait), 0 16px 36px rgba(16, 42, 58, .35); }
.avec-telephone .telephone { width: 23%; }
.avec-telephone .tablette { width: 32%; }
@media (max-width: 720px) { .avec-telephone .telephone, .avec-telephone .tablette { width: 28%; } } /* sur téléphone, un peu plus grand pour rester lisible */
/* Tablette en plus du téléphone, dans le coin opposé (Comptable, 2026-11-27). */
.avec-telephone .en-face { right: auto; left: -3%; }
.fonction:nth-child(even) .avec-telephone .en-face { left: auto; right: -3%; }
@media (max-width: 720px) { .avec-telephone .en-face, .fonction:nth-child(even) .avec-telephone .en-face { left: 0; right: auto; } }
.avec-telephone .tablette.paysage { width: 40%; } /* tablette Android, en paysage : plus large pour rester lisible */
@media (max-width: 720px) { .avec-telephone .tablette.paysage { width: 40%; } }

/* « Nos autres activités » (autres_activites() de site-lib/site.php) */
.autres-activites { margin-top: 12px; }
.autres-activites summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
.autres-activites summary::after { content: "▾"; margin-left: 6px; }
.autres-activites[open] summary::after { content: "▴"; }
.autres-activites ul { list-style: none; margin: 8px auto 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; max-width: 480px; text-align: left; }
.autres-activites a { display: block; height: 100%; padding: 10px 14px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 12px; color: inherit; text-decoration: none; }
.autres-activites a:hover { border-color: currentColor; }
.autres-activites strong { display: block; }
.autres-activites span { display: block; font-size: .875em; opacity: .8; }

/* Menu de Clemala en haut, le même sur tous les sites (menu_clemala() de site-lib/site.php) : l'immobilier, puis « Digital » ouvert sous le bandeau */
.haut { flex-wrap: wrap; z-index: 20; } /* la liste « Digital » passe au-dessus des captures de la page */
.menu-clemala { display: flex; align-items: center; gap: 0 18px; margin-left: auto; font-size: .9375rem; }
.menu-clemala > a { color: var(--texte); padding: 10px 0; text-decoration: none; white-space: nowrap; }
.menu-clemala > a:hover { text-decoration: underline; }
.haut .digital { margin: 0; }
.haut .digital summary { min-height: 0; padding: 10px 0; font-weight: inherit; color: var(--texte); white-space: nowrap; }
.haut .digital ul { position: absolute; top: 100%; right: var(--marge); width: min(480px, calc(100vw - 2 * var(--marge))); margin: 0; padding: 12px; background: var(--fond); color: var(--texte); border: 1px solid var(--trait); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
@media (max-width: 820px) { .menu-clemala { order: 3; width: 100%; margin-left: 0; gap: 0 16px; overflow-x: auto; } }
/* Icône de chaque app dans « Digital » et « Nos autres activités » */
.autres-activites a { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; align-items: center; }
.autres-activites a img { grid-row: span 2; width: 32px; height: 32px; object-fit: contain; border-radius: 22%; }
