/* ══════════════════════════════════════════════════════════════
   index.php — tableau de bord d'accueil + écran de connexion
   (le socle vient de style-netextra.css). Préfixe : ac-
   ══════════════════════════════════════════════════════════════ */

.ac-page { padding: 24px 24px 60px; font-family: var(--nx-font); color: var(--nx-texte); }

/* ── Titre de page et actions rapides ── */
.ac-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.ac-tete .nx-sous-titre { margin-bottom: 0; }
.ac-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-fleche { color: var(--nx-inactif); font-size: 14px; flex-shrink: 0; }

/* ══ À TRAITER ══════════════════════════════════════════════ */
.ac-atraiter { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

.ac-alerte { background: white; border-radius: var(--nx-r-carte); box-shadow: var(--nx-ombre); overflow: hidden; display: flex; flex-direction: column; }
.ac-alerte-tete { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--nx-separateur); }
.ac-alerte-ico { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; background: var(--nx-cyan-fond2); color: var(--nx-cyan); }
.ac-alerte.urgent .ac-alerte-ico { background: var(--nx-rouge-fond); color: var(--nx-rouge); }
.ac-alerte.ok .ac-alerte-ico { background: var(--nx-vert-fond); color: var(--nx-vert-texte); }
.ac-alerte-titre { flex: 1; min-width: 0; font-family: var(--nx-font-titre); font-size: 14px; font-weight: 600; color: var(--nx-texte); }
.ac-alerte-titre small { display: block; font-family: var(--nx-font); font-size: 12px; font-weight: 400; color: var(--nx-gris); margin-top: 2px; }
.ac-compteur {
    min-width: 30px; height: 26px; padding: 0 9px; border-radius: 13px;
    background: var(--nx-rouge-fond); color: var(--nx-rouge);
    font-family: var(--nx-font-titre); font-size: 14px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ac-alerte-outils { display: flex; align-items: center; flex-shrink: 0; }
.ac-alerte-corps { padding: 6px 10px 8px; flex: 1; max-height: 360px; overflow-y: auto; }
.ac-alerte-pied { padding: 10px 18px; border-top: 1px solid var(--nx-separateur); background: var(--nx-fond-champ); font-size: 12px; color: var(--nx-texte-3); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ac-alerte-pied a { color: var(--nx-cyan); text-decoration: none; white-space: nowrap; }
.ac-alerte-pied a:hover { text-decoration: underline; }

/* Lignes « un jour = une ligne » dans les blocs à traiter */
.ac-rang { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-top: 1px solid var(--nx-separateur); text-decoration: none; color: inherit; border-radius: 9px; }
.ac-rang:first-child { border-top: 0; }
.ac-rang:hover { background: var(--nx-fond-champ); }
.ac-rang-jour { flex: 1; min-width: 0; font-size: 13px; color: var(--nx-texte); }
.ac-rang-jour small { display: block; font-size: 11px; color: var(--nx-gris); }
.ac-rang:hover .ac-rang-jour { color: var(--nx-cyan); }
.ac-rang-etats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ac-puce-date {
    width: 44px; height: 42px; border-radius: 10px; flex-shrink: 0;
    background: var(--nx-cyan-fond2); color: var(--nx-cyan-dark);
    display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.ac-puce-date.passe { background: var(--nx-rouge-fond); color: var(--nx-rouge); }
.ac-puce-date b { font-family: var(--nx-font-titre); font-size: 15px; font-weight: 700; }
.ac-puce-date span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Détail d'une journée, ouvert au clic */
.ac-jourbloc { border-top: 1px solid var(--nx-separateur); }
.ac-jourbloc:first-child { border-top: 0; }
.ac-jourbloc > summary { cursor: pointer; list-style: none; }
.ac-jourbloc > summary::-webkit-details-marker { display: none; }
.ac-jourbloc > summary::marker { content: ''; }
.ac-jourbloc > summary .ac-fleche { transition: transform var(--nx-tr); }
.ac-jourbloc[open] > summary { background: var(--nx-fond-champ); }
.ac-jourbloc[open] > summary .ac-fleche { transform: rotate(180deg); }
.ac-detail { padding: 2px 8px 10px 60px; display: flex; flex-direction: column; gap: 2px; }
.ac-detail-ligne { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: inherit; }
.ac-detail-ligne:hover { background: var(--nx-cyan-fond2); }
.ac-detail-nom { flex: 1; min-width: 0; font-size: 12.5px; color: var(--nx-texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-detail-nom small { display: block; font-size: 11px; color: var(--nx-gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-detail-ligne:hover .ac-detail-nom { color: var(--nx-cyan); }
.ac-detail-etats { display: flex; gap: 6px; flex-shrink: 0; }
/* En-tête des deux colonnes, affiché une seule fois par journée */
.ac-detail-entete {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px 4px;
    font-family: var(--nx-font-titre); font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--nx-gris);
}
.ac-detail-entete > span:first-child { flex: 1; }
/* Cellules d'état : même largeur que l'en-tête pour rester alignées */
.ac-st-col, .ac-st { width: 84px; text-align: center; flex-shrink: 0; }
.ac-st { display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.ac-st.ok  { color: var(--nx-vert); font-size: 13px; }
.ac-st.ko  { color: var(--nx-rouge); }
.ac-st.att { color: var(--nx-orange); }
.ac-st.ko::before, .ac-st.att::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.ac-etat { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; }
.ac-etat.fait { background: var(--nx-vert-fond); color: var(--nx-vert-texte); }
.ac-etat.attente { background: var(--nx-orange-fond); color: var(--nx-orange); }
.ac-etat.manquant { background: var(--nx-rouge-fond); color: var(--nx-rouge); }

/* Étiquettes d'état, communes à l'agenda et aux blocs à traiter */
.ac-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 20px;
    font-family: var(--nx-font-titre); font-size: 11px; font-weight: 600; white-space: nowrap;
    background: var(--nx-fond-doux); color: var(--nx-texte-3);
}
.ac-tag.rouge  { background: var(--nx-rouge-fond);  color: var(--nx-rouge); }
.ac-tag.orange { background: var(--nx-orange-fond); color: var(--nx-orange); }
.ac-tag.vert   { background: var(--nx-vert-fond);   color: var(--nx-vert-texte); }
.ac-tag.cyan   { background: var(--nx-cyan-fond);   color: var(--nx-cyan-dark); }

.ac-ajour { padding: 26px 20px; text-align: center; color: var(--nx-vert-texte); font-size: 13px; }
.ac-ajour i { display: block; font-size: 26px; margin-bottom: 8px; color: var(--nx-vert); }
.ac-chargement { padding: 32px 20px; text-align: center; color: var(--nx-gris); font-size: 13px; }

/* ══ GRILLE PRINCIPALE ══════════════════════════════════════ */
.ac-grille { display: grid; grid-template-columns: minmax(0,2.1fr) minmax(0,1fr); gap: 20px; align-items: start; }
.ac-colonne { display: flex; flex-direction: column; gap: 20px; }
.ac-carte-tete { padding: 16px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ac-carte-corps { padding: 0 20px 18px; }
.ac-carte-corps.serre { padding: 0 8px 10px; }
.ac-lien-tete { font-size: 12px; color: var(--nx-cyan); text-decoration: none; white-space: nowrap; }
.ac-lien-tete:hover { text-decoration: underline; }

/* ══ AGENDA ═════════════════════════════════════════════════ */
.ac-agenda { padding: 0 0 6px; }
.ac-jour { border-top: 1px solid var(--nx-separateur); }
.ac-jour:first-child { border-top: 0; }
.ac-jour.auj { background: var(--nx-cyan-fond2); box-shadow: inset 3px 0 0 var(--nx-cyan); }

.ac-jour-tete { display: flex; align-items: center; gap: 14px; padding: 12px 20px 8px; flex-wrap: wrap; }
.ac-jour-date { text-decoration: none; color: inherit; min-width: 118px; }
.ac-jour-date b { display: block; font-family: var(--nx-font-titre); font-size: 14px; font-weight: 700; color: var(--nx-texte); }
.ac-jour.auj .ac-jour-date b { color: var(--nx-cyan-dark); }
.ac-jour-date small { font-size: 11px; color: var(--nx-gris); }
.ac-jour-date:hover b { color: var(--nx-cyan); }
.ac-jour-chiffres { display: flex; gap: 14px; font-size: 12px; color: var(--nx-texte-3); flex: 1; flex-wrap: wrap; }
.ac-jour-chiffres i { color: var(--nx-inactif); margin-right: 2px; }
.ac-jour-etats { display: flex; gap: 6px; flex-wrap: wrap; }

.ac-jour-evenements { padding: 0 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.ac-eve {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: 10px;
    text-decoration: none; color: inherit;
    border: 1.5px solid transparent; background: var(--nx-fond-champ);
    transition: border-color var(--nx-tr), background var(--nx-tr);
}
.ac-eve:hover { border-color: var(--nx-cyan); background: white; }
.ac-eve-heure {
    width: 48px; flex-shrink: 0; text-align: center;
    font-family: var(--nx-font-titre); font-size: 13px; font-weight: 600; color: var(--nx-cyan-dark);
}
.ac-eve-nom { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; color: var(--nx-texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-eve-nom small { display: block; font-size: 11px; font-weight: 400; color: var(--nx-gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-eve:hover .ac-eve-nom { color: var(--nx-cyan); }
.ac-eve-effectif {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    padding: 4px 10px; border-radius: 20px; background: white; border: 1px solid var(--nx-bordure);
    font-family: var(--nx-font-titre); font-size: 12px; font-weight: 600; color: var(--nx-texte-2);
}
.ac-eve-effectif i { color: var(--nx-inactif); font-size: 11px; }
.ac-eve:hover .ac-eve-effectif { border-color: var(--nx-cyan); color: var(--nx-cyan); }
.ac-eve-etats { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.ac-eve-etats:empty, .ac-rang-etats:empty, .ac-jour-etats:empty { display: none; }

/* ══ CALENDRIER DE CHARGE ═══════════════════════════════════ */
.ac-cal-nav { display: flex; gap: 4px; }
.ac-cal-nav a {
    width: 26px; height: 26px; border-radius: 7px;
    border: 1.5px solid var(--nx-bordure); color: var(--nx-texte-3);
    display: inline-flex; align-items: center; justify-content: center; font-size: 11px; text-decoration: none;
}
.ac-cal-nav a:hover { border-color: var(--nx-cyan); color: var(--nx-cyan); }

.ac-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ac-cal-entete { text-align: center; font-family: var(--nx-font-titre); font-size: 10px; font-weight: 700; color: var(--nx-gris); padding-bottom: 4px; }
.ac-cal-vide { aspect-ratio: 1 / 1; }
.ac-cal-jour {
    aspect-ratio: 1 / 1; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; line-height: 1.1; position: relative;
    background: var(--nx-fond-champ); color: var(--nx-texte-2);
    border: 1.5px solid transparent;
    transition: border-color var(--nx-tr);
}
.ac-cal-jour:hover { border-color: var(--nx-cyan); }
.ac-cal-jour.we { background: var(--nx-fond-doux); }
.ac-cal-num { font-size: 11px; }
.ac-cal-nbr { font-family: var(--nx-font-titre); font-size: 11px; font-weight: 700; }
.ac-cal-jour.niv1 { background: #DFF3F7; color: var(--nx-cyan-dark); }
.ac-cal-jour.niv2 { background: #A9E2EC; color: #06596A; }
.ac-cal-jour.niv3 { background: #4FC6D8; color: white; }
.ac-cal-jour.niv4 { background: var(--nx-cyan); color: white; }
.ac-cal-jour.auj { border-color: var(--nx-texte); }
.ac-cal-jour.auj .ac-cal-num { font-weight: 700; }

.ac-cal-legende { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: 11px; color: var(--nx-gris); }
.ac-cal-echelle { display: flex; gap: 3px; }
.ac-cal-echelle i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.ac-cal-echelle i.niv0 { background: var(--nx-fond-champ); border: 1px solid var(--nx-bordure); }
.ac-cal-echelle i.niv1 { background: #DFF3F7; }
.ac-cal-echelle i.niv2 { background: #A9E2EC; }
.ac-cal-echelle i.niv3 { background: #4FC6D8; }
.ac-cal-echelle i.niv4 { background: var(--nx-cyan); }

/* ══ LISTES DE LA COLONNE DE DROITE ═════════════════════════ */
.ac-liste { display: flex; flex-direction: column; }
.ac-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--nx-separateur); text-decoration: none; color: inherit; border-radius: 8px; }
.ac-item:first-child { border-top: 0; }
.ac-item:hover { background: var(--nx-fond-champ); }
.ac-item-nom { flex: 1; min-width: 0; font-size: 13px; color: var(--nx-texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-item-nom small { display: block; font-size: 11px; color: var(--nx-gris); }
.ac-item:hover .ac-item-nom { color: var(--nx-cyan); }
.ac-puce-age { width: 44px; height: 42px; border-radius: 10px; flex-shrink: 0; background: #F3EDF8; color: #7A4FA5; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.ac-puce-age b { font-family: var(--nx-font-titre); font-size: 15px; font-weight: 700; }
.ac-puce-age span { font-size: 10px; }
.ac-doc { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; color: inherit; border: 1.5px solid var(--nx-bordure); }
.ac-doc:hover { border-color: var(--nx-cyan); color: var(--nx-cyan); }
.ac-doc i { font-size: 15px; color: var(--nx-texte-3); }
.ac-doc:hover i.fa-file-o { color: var(--nx-cyan); }

/* ── Activité récente ── */
.ac-activite { display: flex; gap: 12px; padding: 11px 12px; border-top: 1px solid var(--nx-separateur); }
.ac-activite:first-child { border-top: 0; }
.ac-activite-photo { position: relative; flex-shrink: 0; }
.ac-activite-photo img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; display: block; background: var(--nx-fond-doux); }
.ac-activite-vignette {
    position: absolute; right: -5px; bottom: -5px;
    width: 19px; height: 19px; border-radius: 50%;
    background: var(--nx-cyan); color: white; border: 2px solid white;
    display: flex; align-items: center; justify-content: center; font-size: 9px;
}
.ac-activite-txt { min-width: 0; flex: 1; }
.ac-activite-titre { font-family: var(--nx-font-titre); font-size: 12px; font-weight: 600; color: var(--nx-texte); }
.ac-activite-desc { font-size: 12px; color: var(--nx-texte-3); margin-top: 1px; }
.ac-activite-desc a { color: inherit; text-decoration: none; }
.ac-activite-desc a:hover { color: var(--nx-cyan); }
.ac-activite-quand { font-size: 11px; color: var(--nx-gris); margin-top: 3px; }

/* ══ CONNEXION ══════════════════════════════════════════════ */
.ac-login-fond { position: fixed; inset: 0; background: linear-gradient(140deg, #18262C 0%, #23424C 55%, #00ACC4 160%); z-index: 0; }
.ac-login { position: relative; z-index: 1; min-height: calc(100vh - 40px); display: flex; align-items: center; justify-content: center; padding: 30px 20px; }
.ac-login-boite { width: 100%; max-width: 940px; background: white; border-radius: 20px; box-shadow: 0 18px 50px rgba(9,20,25,0.35); overflow: hidden; display: grid; grid-template-columns: 1.1fr 1fr; }
.ac-login-presentation { padding: 40px 38px; background: linear-gradient(150deg, #18262C 0%, #23424C 100%); color: white; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.ac-login-presentation img { max-width: 150px; display: block; }
.ac-login-logo { display: inline-flex; align-self: flex-start; background: white; border-radius: 12px; padding: 12px 16px; }
.ac-login-titre { font-family: var(--nx-font-titre); font-size: 24px; font-weight: 700; }
.ac-login-texte { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.78); }
.ac-login-points { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; font-size: 13px; color: rgba(255,255,255,0.88); }
.ac-login-points span { display: flex; align-items: center; gap: 10px; }
.ac-login-points i { color: var(--nx-cyan); }
.ac-login-form { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; }
.ac-login-form h2 { font-family: var(--nx-font-titre); font-size: 19px; font-weight: 700; color: var(--nx-texte); margin: 0 0 22px; display: flex; align-items: center; gap: 10px; }
.ac-login-form h2 i { color: var(--nx-cyan); }
.ac-login-form .nx-label { margin-top: 14px; }
.ac-login-form .nx-btn { margin-top: 24px; justify-content: center; width: 100%; }

/* ══ RESPONSIVE ═════════════════════════════════════════════ */
@media (max-width: 1250px) {
    .ac-grille { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .ac-eve-etats, .ac-eve-nom small { display: none; }
}
@media (max-width: 800px) {
    .ac-page { padding: 18px 16px 50px; }
    .ac-atraiter { grid-template-columns: 1fr; }
    .ac-actions .nx-btn { flex: 1; justify-content: center; }
    .ac-jour-chiffres { width: 100%; }
    .ac-eve-etats, .ac-eve-nom small { display: flex; }
    .ac-eve-etats { display: flex; }
    .ac-login-boite { grid-template-columns: 1fr; }
    .ac-login-presentation, .ac-login-form { padding: 30px 26px; }
}
@media (max-width: 560px) {
    .ac-detail { padding-left: 4px; padding-right: 4px; }
    .ac-st-col, .ac-st { width: 70px; }
    .ac-eve { flex-wrap: wrap; }
    .ac-eve-heure { width: auto; text-align: left; }
    .ac-eve-etats { width: 100%; justify-content: flex-start; }
    .ac-fleche { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ac-eve, .ac-cal-jour { transition: none; }
}

/* Légende du pied de bloc « Horaires à vérifier » */
.ac-legende-rouge { color: var(--nx-rouge); }
