/* CESA Connect · styles (repris de l'appli Google). © 2026 CLYVIDY */
:root {
    --bleu: #0a93c9; --bleu-fonce: #07709a; --bleu-clair: #e6f4fa;
    --vert: #a8c536; --vert-fonce: #6f8a12; --vert-clair: #f2f7df;
    --texte: #22272b; --gris: #6b737a; --bord: #e1e6ea; --fond: #f5f7f9; --blanc: #fff;
    --rouge: #c0392b; --rouge-clair: #fdecea; --orange: #b25e00; --orange-clair: #fff3e0;
    --ombre: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.08);
  }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  body { margin: 0; font: 15px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--texte); background: var(--fond); }
  header { background: var(--blanc); border-bottom: 1px solid var(--bord); padding: 8px 20px; height: 66px; display: flex; align-items: center; gap: 18px; position: sticky; top: 0; z-index: 5; }
  header .logo { height: 50px; width: auto; flex: none; }
  header .devise { display: flex; flex-direction: column; align-items: center; padding: 0 18px; border-left: 1px solid var(--bord); border-right: 1px solid var(--bord); line-height: 1.5; white-space: nowrap; }
  header .devise strong { font-size: 13px; letter-spacing: 2px; color: #1d2f5e; }
  header .devise span { font-size: 11px; letter-spacing: 2px; font-weight: 700; color: #1d2f5e; }
  header h1 { font-size: 19px; margin: 0; font-weight: 700; color: var(--texte); white-space: nowrap; }
  header .moi { margin-left: auto; font-size: 12px; color: var(--gris); }
  nav { display: flex; gap: 2px; overflow-x: auto; background: var(--bleu); padding: 0 8px; position: sticky; top: 66px; z-index: 4; }
  nav button { border: 0; background: none; padding: 12px 14px; font-size: 14px; color: rgba(255,255,255,.8); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; }
  nav button.actif { color: #fff; border-bottom-color: var(--vert); font-weight: 600; }
  main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 40px; }
  h2 { font-size: 20px; margin: 4px 0 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  h2 .droite { margin-left: auto; display: flex; gap: 8px; }
  h3 { font-size: 15px; margin: 0 0 12px; }
  .grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
  .grille-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
  .carte { background: var(--blanc); border: 1px solid var(--bord); border-radius: 12px; padding: 16px; margin-bottom: 16px; box-shadow: var(--ombre); }
  .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
  .kpi { background: var(--blanc); border: 1px solid var(--bord); border-radius: 12px; padding: 14px 16px; box-shadow: var(--ombre); border-top: 4px solid var(--bleu); }
  .kpi.vert { border-top-color: var(--vert); } .kpi.orange { border-top-color: #f0a030; } .kpi.gris { border-top-color: #9aa5ad; }
  .kpi .valeur { font-size: 28px; font-weight: 700; line-height: 1.1; margin-top: 4px; }
  .kpi .libelle { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--gris); font-weight: 600; }
  .kpi .detail { font-size: 12px; color: var(--gris); margin-top: 2px; }
  .graphique { position: relative; height: 260px; }
  .vide { color: var(--gris); font-style: italic; }
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
  th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--gris); font-weight: 600; }
  tr.cliquable { cursor: pointer; } tr.cliquable:hover { background: var(--bleu-clair); }
  .tableau { overflow-x: auto; }
  .filtres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
  .filtres > * { flex: 1 1 160px; max-width: 280px; }
  label { display: block; font-size: 13px; color: var(--gris); margin-bottom: 4px; }
  input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--bord); border-radius: 8px; font: inherit; background: #fff; color: inherit; }
  textarea { min-height: 180px; resize: vertical; }
  body.role-LECTURE #tb-annuaire, body.role-LECTURE #ad-annuaire, body.role-LECTURE #ad-nouveau, body.role-LECTURE #fi-modif,
  body.role-LECTURE #fi-paiement, body.role-LECTURE #fi-ent, body.role-LECTURE [data-cotis], body.role-LECTURE #m-ok, body.role-LECTURE #e-ok,
  body.role-LECTURE #c-ok, body.role-LECTURE #co-paiement, body.role-LECTURE #co-relancer, body.role-LECTURE #so-reunion, body.role-LECTURE #so-nouvelle,
  body.role-LECTURE #s-ok, body.role-LECTURE #s-inviter, body.role-LECTURE #s-ajout-ajour, body.role-LECTURE #s-ajout-bureau, body.role-LECTURE [data-suppr],
  body.role-LECTURE #pl-reunion, body.role-LECTURE #pl-soiree, body.role-LECTURE .carte:has(#cr-ajouter), body.role-LECTURE #an-chercher,
  body.role-LECTURE #an-valider, body.role-LECTURE #an-refuser-sel, body.role-LECTURE .carte:has(#ml-envoyer), body.role-LECTURE #mod-nouveau,
  body.role-LECTURE #sig-nouvelle, body.role-LECTURE [data-mod-modifier], body.role-LECTURE #mo-ok, body.role-LECTURE #sm-annuler,
  body.role-LECTURE button[onclick*="nouvelleSoiree"], body.role-LECTURE #ml-garder-modele, body.role-LECTURE #s-importer, body.role-LECTURE #s-renvoyer, body.role-LECTURE #s-pres-ajout,
  body:not(.role-ADMIN) #c-suppr, body:not(.role-ADMIN) [data-suppr-cr], body:not(.role-ADMIN) [data-mod-supprimer],
  body:not(.role-ADMIN) #co-import, body:not(.role-ADMIN) #nav [data-vue="acces"] { display: none !important; }
  select.ac-role { min-width: 110px; }
  .banniere { position: relative; height: 245px; border-radius: 18px; overflow: hidden; margin: 0 0 22px; box-shadow: 0 6px 18px rgba(16,24,40,.12);
    background: linear-gradient(120deg, #1d2f5e 0%, #0a93c9 55%, #a8c536 100%); }
  .banniere img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; opacity: 0; transition: opacity .6s; user-select: none; -webkit-user-drag: none; }
  .banniere img.visible { opacity: 1; }
  .banniere .voile { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0) 35%, rgba(10,25,20,.55) 100%); pointer-events: none; }
  .banniere .texte { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); max-width: 42%; color: #fff; font-size: 34px; font-weight: 800; line-height: 1.12;
    text-shadow: 0 2px 10px rgba(0,0,0,.35); text-align: center; }
  .banniere .texte::after { content: ''; display: block; height: 5px; width: 75%; margin: 10px auto 0; border-radius: 5px; background: var(--vert); transform: rotate(-2deg); }
  .banniere .texte:empty { display: none; }
  .banniere .fleche { position: absolute; top: 50%; transform: translateY(-50%); border: 0; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.75); font-size: 22px; cursor: pointer; color: #1d2f5e; }
  .banniere .fleche.g { left: 14px; } .banniere .fleche.d { right: 14px; }
  .banniere .points { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
  .banniere .points button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.55); cursor: pointer; }
  .banniere .points button.actif { background: #fff; }
  .banniere .gerer { position: absolute; top: 12px; right: 12px; border: 1px solid rgba(255,255,255,.6); background: rgba(0,0,0,.55); color: #fff; border-radius: 10px; padding: 7px 12px; font-size: 13px; cursor: pointer; text-align: left; line-height: 1.25; }
  .banniere .gerer small { display: block; opacity: .8; font-size: 11px; }
  body:not(.role-ADMIN) .banniere .gerer { display: none !important; }
  .ban-liste .ligne { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bord); }
  .ban-liste .vignette { width: 120px; height: 52px; object-fit: cover; border-radius: 6px; background: var(--bord); flex: none; }
  .ban-apercu { height: 200px; margin: 0 0 12px; cursor: grab; touch-action: none; }
  .ban-apercu.glisse { cursor: grabbing; }
  .ban-apercu .texte { pointer-events: none; }
  .ban-apercu .texte { font-size: 26px; }
  .logo-accueil { display: block; width: 100%; max-width: 440px; height: auto; margin: 24px auto 0; }

  .signature-apercu { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--bord); font-size: 13px; color: var(--gris); }
  .signature-apercu:empty { display: none; }
  input[type=checkbox] { width: auto; }
  input:focus, select:focus, textarea:focus { outline: 2px solid var(--bleu); border-color: transparent; }
  .champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
  .champs .large { grid-column: 1 / -1; }
  .case { display: flex; align-items: center; gap: 8px; color: var(--texte); font-size: 14px; }
  .bouton { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; background: var(--bleu); color: #fff; text-decoration: none; white-space: nowrap; }
  .bouton:hover { background: var(--bleu-fonce); }
  .bouton.secondaire { background: var(--bleu-clair); color: var(--bleu-fonce); }
  .bouton.vert { background: var(--vert); color: #1f2a00; }
  .bouton.danger { background: var(--rouge-clair); color: var(--rouge); }
  .bouton.petit { padding: 5px 10px; font-size: 13px; }
  .bouton:disabled { opacity: .5; cursor: wait; }
  .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
  .badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
  .s-ajour { background: var(--vert-clair); color: var(--vert-fonce); }
  .s-relancer { background: var(--orange-clair); color: var(--orange); }
  .s-ancien { background: #eceff1; color: var(--gris); }
  .s-prospect { background: var(--bleu-clair); color: var(--bleu-fonce); }
  .s-rouge { background: var(--rouge-clair); color: var(--rouge); }
  .liste-simple { list-style: none; padding: 0; margin: 0; }
  .liste-simple li { padding: 8px 0; border-bottom: 1px solid var(--bord); display: flex; gap: 8px; align-items: center; }
  .liste-simple li:last-child { border-bottom: 0; }
  .date-pastille { background: var(--bleu-clair); color: var(--bleu-fonce); border-radius: 8px; padding: 4px 8px; font-weight: 700; font-size: 12px; text-align: center; min-width: 54px; }
  .selection { max-height: 380px; overflow-y: auto; border: 1px solid var(--bord); border-radius: 8px; }
  .selection label { display: flex; gap: 10px; align-items: center; padding: 7px 10px; margin: 0; border-bottom: 1px solid var(--bord); color: var(--texte); font-size: 14px; cursor: pointer; }
  .selection label:hover { background: var(--bleu-clair); }
  .selection .sans-mail { color: var(--gris); }
  .compteur { font-weight: 700; color: var(--bleu-fonce); }
  .progression { height: 8px; background: var(--bord); border-radius: 99px; overflow: hidden; min-width: 90px; }
  .progression > div { height: 100%; background: var(--vert); }
  .message { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--texte); color: #fff; padding: 11px 16px; border-radius: 8px; max-width: 92vw; z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
  .message.erreur { background: var(--rouge); }
  .chargement { color: var(--gris); padding: 40px; text-align: center; }
  .modal-fond { position: fixed; inset: 0; background: rgba(15,23,30,.4); display: flex; align-items: flex-start; justify-content: center; padding: 30px 12px; z-index: 10; overflow-y: auto; }
  .modal { background: #fff; border-radius: 14px; padding: 20px; width: 100%; max-width: 720px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
  .petit-texte { font-size: 12px; color: var(--gris); }
  footer.clyvidy { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 16px 24px; font-size: 11px; line-height: 1.5; color: var(--gris); text-align: left; }
  footer.clyvidy img { height: 26px; width: auto; flex: none; }
  .info { background: var(--bleu-clair); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--bleu-fonce); margin-bottom: 12px; }
  .lien { color: var(--bleu-fonce); cursor: pointer; text-decoration: underline; }
  dl.fiche { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
  dl.fiche dt { color: var(--gris); }
  dl.fiche dd { margin: 0; word-break: break-word; }
  .calendrier { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--bord); border-left: 1px solid var(--bord); }
  .calendrier .entete-jour { font-size: 11px; text-transform: uppercase; color: var(--gris); font-weight: 600; padding: 6px; border-right: 1px solid var(--bord); border-bottom: 1px solid var(--bord); background: var(--fond); }
  .calendrier .jour { min-height: 104px; padding: 4px; border-right: 1px solid var(--bord); border-bottom: 1px solid var(--bord); cursor: pointer; overflow: hidden; }
  .calendrier .jour:hover { background: #fafcfd; }
  .calendrier .jour.hors-mois { background: var(--fond); }
  .calendrier .jour.hors-mois .num { color: #b5bdc3; }
  .calendrier .jour.aujourdhui .num { background: var(--bleu); color: #fff; border-radius: 99px; display: inline-block; min-width: 22px; text-align: center; }
  .calendrier .jour.survol { background: var(--vert-clair); outline: 2px dashed var(--vert); outline-offset: -3px; }
  .calendrier .num { font-size: 12px; font-weight: 600; margin-bottom: 3px; padding: 1px 4px; }
  .calendrier .evt { color: #fff; font-size: 12px; border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; cursor: grab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .calendrier .evt.annule { opacity: .45; text-decoration: line-through; }
  .calendrier .evt.glisse { opacity: .4; }
  .legende { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--gris); }
  .legende i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
  @media (max-width: 800px) {
    .calendrier .jour { min-height: 64px; padding: 2px; }
    .calendrier .evt { font-size: 10px; padding: 2px 3px; }
    main { padding: 12px; }
    .grille-2 { grid-template-columns: 1fr; }
    header h1 { display: none; }
    th.option, td.option { display: none; }
    dl.fiche { grid-template-columns: 110px 1fr; }
  }
  .liste-pres { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
  .ligne-pres { display: flex; gap: 6px; align-items: center; }
  .ligne-pres input { flex: 1; }
  .champs [hidden] { display: none !important; }

  body.essai { --bleu: #7b2fbf; --bleu-fonce: #5a1f8f; --bleu-clair: #f1e8fa; --vert: #ff8a00; --vert-fonce: #c46a00; --vert-clair: #fff1e0; --fond: #f6f1fb; padding-bottom: 34px; }
  body.essai header { background: #fff4e5; border-bottom: 3px solid #ff8a00; }
  body.essai header h1 { color: #5a1f8f; }
  .bandeau-essai { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px 12px; text-align: center; font-weight: 700; font-size: 13px; letter-spacing: .5px; color: #fff;
    background: repeating-linear-gradient(45deg, #c0392b, #c0392b 18px, #a93226 18px, #a93226 36px); }
  .encadre-prepare { border-left: 5px solid var(--orange); background: var(--orange-clair); }
  .encadre-prepare .lien { margin-left: 6px; }
  .info-essai { background: #fdecea; color: #a93226; border: 1px solid #f5b7b1; }
  .histo-envois { margin: 0 0 14px; padding-left: 18px; font-size: 13px; line-height: 1.7; }
  .deja-envoye { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--orange); }
  .deja-envoye .histo-envois { margin: 4px 0 0; }
.nouveaute h3 { margin: 4px 0 10px; }
.nouveaute .point { margin: 0 0 10px; line-height: 1.5; }
.nouveaute .point div { margin-top: 2px; }
.liste-nouveautes { max-height: 60vh; overflow-y: auto; }
.liste-nouveautes .nouveaute { box-shadow: none; }
