/* rm-compte-offres.css — LES ÉCRANS DES FONCTIONS DE LA GRILLE, DANS /compte (2026-10-30)
   Statistiques, référencement, agenda, ventes, codes promo. Même vocabulaire que la page :
   rouge de marque, noir, blanc, gris neutres, aucune autre couleur. Cible de 44 px au doigt
   sur tout ce qui est neuf. Rien ne déborde à 390 px : les grilles se replient, les textes
   longs (un domaine, un nom de produit) se coupent au lieu de pousser la page. */

.cof-bandeau { display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; margin-bottom:14px; }
.cof-site { min-height:44px; max-width:100%; min-width:0; border:1px solid var(--rm-gray-300); border-radius:9px; background:#fff; color:var(--rm-black); font:inherit; font-size:14px; font-weight:700; padding:0 12px; }
.cof-site-seul { font-size:14px; font-weight:800; min-width:0; overflow-wrap:anywhere; }
.cof-seg { display:inline-flex; border:1px solid var(--rm-gray-300); border-radius:9px; background:#fff; overflow:hidden; margin-left:auto; }
.cof-seg button { min-height:44px; padding:0 14px; border:0; background:none; font:inherit; font-size:13px; font-weight:700; color:var(--rm-gray-600); cursor:pointer; }
.cof-seg button + button { border-left:1px solid var(--rm-gray-200); }
.cof-seg button[aria-pressed="true"] { background:var(--rm-black); color:#fff; }
.cof-seg button:focus-visible { outline:2px solid var(--rm-red); outline-offset:-2px; }

/* Les chiffres d'abord : ils répondent à la question avant le moindre graphique. */
.cof-tuiles { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.cof-tuile { background:#fff; border:1px solid var(--rm-gray-200); border-radius:var(--rm-r-lg); padding:14px 16px; min-width:0; }
.cof-tuile-v { font-size:24px; font-weight:900; letter-spacing:-.5px; color:var(--rm-black); line-height:1.15; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.cof-tuile-l { font-size:12px; color:var(--rm-gray-600); margin-top:4px; line-height:1.4; }

.cof-carte { background:#fff; border:1px solid var(--rm-gray-200); border-radius:var(--rm-r-lg); padding:16px 18px; margin-bottom:14px; min-width:0; }
.cof-carte h3 { font-size:14px; font-weight:800; margin:0 0 12px; letter-spacing:-.1px; }
.cof-deux { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.cof-deux > .cof-carte { margin-bottom:14px; }

/* Les douze mois : une barre par mois, la colonne entière répond au survol et au doigt. */
.cof-mois { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:4px; align-items:end; height:168px; }
.cof-mois-c { position:relative; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; min-width:0; outline:none; }
.cof-mois-b { width:min(100%,26px); background:var(--rm-red); border-radius:4px 4px 0 0; min-height:0; }
.cof-mois-c.vide .cof-mois-b { background:var(--rm-gray-200); height:2px !important; border-radius:1px; }
.cof-mois-v { font-size:11.5px; font-weight:800; color:var(--rm-black); margin-bottom:4px; line-height:1; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cof-mois-l { font-size:11px; color:var(--rm-gray-500); margin-top:6px; line-height:1; white-space:nowrap; }
.cof-mois-c:hover .cof-mois-b, .cof-mois-c:focus .cof-mois-b { background:var(--rm-black); }
.cof-mois-c[data-tip]:hover::after, .cof-mois-c[data-tip]:focus::after { content:attr(data-tip); position:absolute; bottom:calc(100% - 22px); left:50%; transform:translateX(-50%); background:var(--rm-black); color:#fff; font-size:11.5px; font-weight:700; white-space:nowrap; padding:5px 8px; border-radius:6px; z-index:2; pointer-events:none; }
.cof-mois-c:first-child[data-tip]:hover::after, .cof-mois-c:first-child[data-tip]:focus::after, .cof-mois-c:nth-child(2)[data-tip]:hover::after, .cof-mois-c:nth-child(2)[data-tip]:focus::after { left:0; transform:none; }
.cof-mois-c:last-child[data-tip]:hover::after, .cof-mois-c:last-child[data-tip]:focus::after, .cof-mois-c:nth-last-child(2)[data-tip]:hover::after, .cof-mois-c:nth-last-child(2)[data-tip]:focus::after { left:auto; right:0; transform:none; }

/* Classements : le nom, le nombre, et une barre fine pour le rapport entre eux. */
.cof-liste { list-style:none; margin:0; padding:0; }
.cof-liste li { padding:8px 0; border-top:1px solid var(--rm-gray-100); min-width:0; }
.cof-liste li:first-child { border-top:0; padding-top:0; }
.cof-ligne { display:flex; justify-content:space-between; align-items:baseline; gap:10px; font-size:13px; }
.cof-ligne-n { min-width:0; overflow-wrap:anywhere; color:var(--rm-black); font-weight:600; }
.cof-ligne-v { flex:none; font-weight:800; color:var(--rm-black); font-variant-numeric:tabular-nums; }
.cof-ligne-s { flex:none; font-weight:500; color:var(--rm-gray-500); font-size:12px; }
.cof-jauge { height:6px; border-radius:3px; background:var(--rm-gray-100); margin-top:5px; overflow:hidden; }
.cof-jauge i { display:block; height:100%; background:var(--rm-red); border-radius:3px; }
.cof-note { font-size:12px; color:var(--rm-gray-500); line-height:1.55; margin:0 0 14px; }
.cof-vide { color:var(--rm-gray-600); font-size:14px; line-height:1.6; background:var(--rm-gray-50); border:1px dashed var(--rm-gray-300); border-radius:var(--rm-r-lg); padding:22px; text-align:center; }

/* Téléphone ou ordinateur : deux parts d'une même barre, séparées par un filet de surface. */
.cof-parts { display:flex; gap:2px; height:12px; border-radius:6px; overflow:hidden; background:var(--rm-gray-100); margin-bottom:10px; }
.cof-parts i { display:block; height:100%; }
.cof-parts .a { background:var(--rm-red); }
.cof-parts .b { background:var(--rm-black); }
.cof-legende { display:flex; flex-wrap:wrap; gap:6px 18px; font-size:13px; }
.cof-legende span { display:inline-flex; align-items:center; gap:7px; }
.cof-legende i { width:10px; height:10px; border-radius:3px; display:inline-block; }
.cof-legende .a { background:var(--rm-red); }
.cof-legende .b { background:var(--rm-black); }

/* ── Codes promo ── */
.cof-form { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1.5fr) minmax(0,.8fr) minmax(0,1fr) minmax(0,.9fr); gap:12px; align-items:end; }
.cof-champ { min-width:0; }
.cof-champ label, .cof-champ .cof-lib { display:block; font-size:12px; font-weight:700; color:var(--rm-gray-600); margin-bottom:6px; }
.cof-champ input, .cof-champ textarea { width:100%; box-sizing:border-box; min-height:44px; border:1px solid var(--rm-gray-300); border-radius:9px; padding:0 12px; font:inherit; font-size:14px; background:#fff; color:var(--rm-black); }
.cof-champ textarea { padding:10px 12px; min-height:84px; line-height:1.5; resize:vertical; }
.cof-champ input:focus, .cof-champ textarea:focus { outline:2px solid var(--rm-red); outline-offset:-1px; border-color:var(--rm-red); }
.cof-champ .cof-seg { display:flex; margin:0; }
.cof-champ .cof-seg button { flex:1; padding:0 8px; min-height:42px; }
.cof-code-in { text-transform:uppercase; letter-spacing:.4px; font-weight:700; }
.cof-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:12px; }
.cof-actions .cpt-btn { height:44px; }
.cof-msg { font-size:13px; line-height:1.5; color:var(--rm-red); font-weight:600; min-height:0; }
.cof-msg.ok { color:var(--rm-black); }
.cof-code { display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; padding:12px 0; border-top:1px solid var(--rm-gray-100); }
.cof-code:first-child { border-top:0; padding-top:0; }
.cof-code-c { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:14px; font-weight:800; color:var(--rm-black); overflow-wrap:anywhere; min-width:0; }
.cof-code-d { flex:1 1 220px; min-width:0; font-size:12.5px; color:var(--rm-gray-600); line-height:1.5; }
.cof-code .cpt-mini { min-height:44px; }

/* ── Référencement ── */
.cof-seo-liens { display:flex; flex-wrap:wrap; gap:6px 18px; font-size:13px; margin-bottom:12px; }
.cof-seo-liens a { color:var(--rm-red); font-weight:700; text-decoration:none; overflow-wrap:anywhere; }
.cof-seo-liens a:hover { text-decoration:underline; }
.cof-page { border:1px solid var(--rm-gray-200); border-radius:var(--rm-r-lg); background:#fff; margin-bottom:10px; min-width:0; }
.cof-page > summary { list-style:none; cursor:pointer; position:relative; display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; min-height:44px; padding:12px 40px 12px 16px; box-sizing:border-box; }
.cof-page > summary::-webkit-details-marker { display:none; }
.cof-page > summary::after { content:'+'; position:absolute; right:16px; top:13px; font-size:17px; font-weight:800; color:var(--rm-gray-500); line-height:1; }
.cof-page[open] > summary::after { content:'\2212'; }
.cof-page > summary:focus-visible { outline:2px solid var(--rm-red); outline-offset:-2px; border-radius:var(--rm-r-lg); }
.cof-page-n { font-size:14px; font-weight:800; min-width:0; overflow-wrap:anywhere; }
.cof-page-c { font-size:12px; color:var(--rm-gray-500); min-width:0; overflow-wrap:anywhere; }
.cof-page-corps { padding:0 16px 16px; }
.cof-apercu { border-left:3px solid var(--rm-red); padding:2px 0 2px 12px; margin-bottom:14px; min-width:0; }
.cof-apercu-t { font-size:15px; font-weight:800; color:var(--rm-black); line-height:1.35; overflow-wrap:anywhere; }
.cof-apercu-u { font-size:12px; color:var(--rm-gray-500); margin:2px 0; overflow-wrap:anywhere; }
.cof-apercu-d { font-size:13px; color:var(--rm-gray-600); line-height:1.5; overflow-wrap:anywhere; }
.cof-compte { float:right; font-weight:500; color:var(--rm-gray-500); font-variant-numeric:tabular-nums; }
.cof-compte.trop { color:var(--rm-red); font-weight:800; }
.cof-image { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:12px; }
.cof-image img { width:150px; aspect-ratio:1200/630; object-fit:cover; border:1px solid var(--rm-gray-200); border-radius:8px; background:var(--rm-gray-50); display:block; }
.cof-image .cof-sans { width:150px; aspect-ratio:1200/630; border:1px dashed var(--rm-gray-300); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:11.5px; color:var(--rm-gray-500); text-align:center; padding:6px; box-sizing:border-box; }
.cof-image .cpt-mini { min-height:44px; }
.cof-structure { margin:0; display:grid; grid-template-columns:max-content minmax(0,1fr); gap:6px 14px; font-size:13px; }
.cof-structure dt { color:var(--rm-gray-600); }
.cof-structure dd { margin:0; color:var(--rm-black); font-weight:600; overflow-wrap:anywhere; }
.cof-structure dd.manque { color:var(--rm-gray-500); font-weight:500; }

/* ── Agenda ── */
.cof-agenda-barre { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-bottom:12px; }
.cof-agenda-nav { display:inline-flex; align-items:center; gap:6px; min-width:0; }
.cof-agenda-nav button { width:44px; height:44px; border:1px solid var(--rm-gray-300); border-radius:9px; background:#fff; cursor:pointer; font-size:16px; font-weight:800; color:var(--rm-black); flex:none; }
.cof-agenda-nav button:hover { border-color:var(--rm-black); }
.cof-agenda-p { font-size:14px; font-weight:800; min-width:0; padding:0 4px; }
.cof-agenda-barre .cof-seg { margin-left:0; }
.cof-agenda-barre .cof-export { margin-left:auto; height:44px; }
/* Semaine : sept colonnes au bureau, une liste de jours au téléphone. */
.cof-sem { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; margin-bottom:14px; }
.cof-jour { border:1px solid var(--rm-gray-200); border-radius:10px; background:#fff; min-height:120px; padding:8px; min-width:0; }
.cof-jour.auj { border-color:var(--rm-red); box-shadow:inset 0 0 0 1px var(--rm-red); }
.cof-jour-t { font-size:12px; font-weight:800; color:var(--rm-black); margin-bottom:6px; }
.cof-jour-t span { color:var(--rm-gray-500); font-weight:600; }
.cof-rdv { display:block; width:100%; box-sizing:border-box; text-align:left; background:var(--rm-gray-50); border:1px solid var(--rm-gray-200); border-left:3px solid var(--rm-red); border-radius:7px; padding:6px 7px; margin-bottom:6px; font:inherit; cursor:pointer; min-height:44px; min-width:0; color:var(--rm-black); }
.cof-rdv:hover { border-color:var(--rm-black); border-left-color:var(--rm-black); }
.cof-rdv-h { display:block; font-size:12px; font-weight:800; }
.cof-rdv-n { display:block; font-size:12px; color:var(--rm-gray-600); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cof-rdv.done { border-left-color:var(--rm-black); }
.cof-rdv.no_show, .cof-rdv.cancelled { border-left-color:var(--rm-gray-300); opacity:.72; }
.cof-rdv.cancelled .cof-rdv-n { text-decoration:line-through; }
.cof-statut { display:inline-block; font-size:10.5px; font-weight:800; padding:2px 7px; border-radius:5px; background:rgba(185,28,28,.10); color:var(--rm-red); white-space:nowrap; }
.cof-statut.done { background:var(--rm-black); color:#fff; }
.cof-statut.no_show, .cof-statut.cancelled { background:var(--rm-gray-100); color:var(--rm-gray-600); }
/* Mois : une case par jour, le nombre de rendez-vous dans une pastille. */
.cof-moisg { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin-bottom:14px; }
.cof-moisg-t { font-size:11px; font-weight:800; color:var(--rm-gray-500); text-align:center; padding:2px 0; }
.cof-case { min-height:64px; border:1px solid var(--rm-gray-200); border-radius:8px; background:#fff; padding:6px; text-align:left; font:inherit; color:var(--rm-black); min-width:0; display:flex; flex-direction:column; gap:4px; }
button.cof-case { cursor:pointer; }
button.cof-case:hover { border-color:var(--rm-black); }
.cof-case.hors { background:var(--rm-gray-50); color:var(--rm-gray-400); }
.cof-case.auj { border-color:var(--rm-red); box-shadow:inset 0 0 0 1px var(--rm-red); }
.cof-case-j { font-size:12px; font-weight:800; }
.cof-case-n { font-size:11.5px; font-weight:700; color:#fff; background:var(--rm-red); border-radius:99px; padding:1px 7px; align-self:flex-start; }
.cof-jour-liste h4 { font-size:13.5px; font-weight:800; margin:0 0 8px; }

/* Les fenêtres : un rendez-vous, une réponse. */
.cof-ov { position:fixed; inset:0; z-index:2147483600; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; padding:16px; box-sizing:border-box; }
.cof-fen { background:#fff; color:var(--rm-black); max-width:460px; width:100%; border-radius:14px; padding:22px; max-height:calc(100dvh - 32px); overflow:auto; box-sizing:border-box; }
.cof-fen h3 { font-size:17px; font-weight:900; margin:0 0 4px; letter-spacing:-.2px; overflow-wrap:anywhere; }
.cof-fen-s { font-size:13px; color:var(--rm-gray-600); margin:0 0 12px; line-height:1.5; overflow-wrap:anywhere; }
.cof-fen .cpt-msg-lignes { margin:0 0 10px; }
.cof-fen-txt { font-size:13.5px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; background:var(--rm-gray-50); border-radius:8px; padding:10px 12px; margin:0 0 10px; }
.cof-fen .cof-actions .cpt-btn { flex:1 1 130px; justify-content:center; }
.cpt-msg-reponse { margin-top:10px; padding:10px 12px; background:var(--rm-gray-50); border-left:3px solid var(--rm-black); border-radius:0 8px 8px 0; font-size:13px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere; }
.cpt-msg-reponse b { display:block; font-size:11.5px; color:var(--rm-gray-600); margin-bottom:2px; }
/* Les boutons de traitement n'existent que pour les comptes qui y ont droit. Le geste principal
   devient alors « Répondre » : « Marquer comme lu » redescend en neutre, un seul rouge par carte. */
.cof-avec-reponses { display:none; }
body.cof-reponses-ok .cof-avec-reponses { display:inline-flex; }
body.cof-reponses-ok #cpt-devis .cpt-mini.red[data-devis] { background:#fff; border-color:var(--rm-gray-300); color:var(--rm-gray-600); }
body.cof-reponses-ok #cpt-devis .cpt-mini.red[data-devis]:hover { border-color:var(--rm-red); color:var(--rm-red); }

@media (max-width:900px) {
  .cof-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cof-sem { grid-template-columns:1fr; }
  .cof-jour { min-height:0; }
  .cof-jour.vide { display:none; }
}
@media (max-width:640px) {
  .cof-tuiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cof-deux { grid-template-columns:minmax(0,1fr); gap:0; }
  .cof-seg { margin-left:0; }
  /* Une ligne de code se lit pareil, quelle que soit la longueur de son nom. */
  .cof-code-d { flex:1 1 100%; }
  .cof-mois { height:140px; gap:2px; }
  .cof-mois-l { font-size:10px; }
  .cof-case { min-height:52px; padding:4px; }
  .cof-case-n { padding:0 5px; }
  .cof-agenda-barre .cof-export { margin-left:0; width:100%; justify-content:center; }
}
@media (max-width:420px) {
  .cof-form { grid-template-columns:minmax(0,1fr); }
  .cof-tuile-v { font-size:20px; }
  .cof-structure { grid-template-columns:minmax(0,1fr); gap:0; }
  .cof-structure dt { margin-top:8px; }
}
