/* ==========================================================================
   Corrections d'affichage de la version 2027 (même design que le site actuel).
   Chargée après les styles d'origine dans header.php.
   ========================================================================== */

/* ---------- Page d'une plongée ---------- */

/* Bouton « Ajouter cette date à Google Agenda » : il était collé au bloc suivant */
.dkp-agenda { margin: 0 0 22px; }

/* Bloc de gestion (DP, créateur, administrateur) : même boîte grise qu'avant */
.dkp-gestion {
    background-color: #eee;
    border: 1px solid #aaa;
    padding: 12px 14px 4px;
    margin-bottom: 22px;
}
.dkp-gestion h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.2; }
.dkp-etats { margin: 0 0 12px; }
.dkp-etats .label { display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 8px; margin: 0 4px 5px 0; white-space: normal; }
.dkp-actions { margin-bottom: 6px; }
/* Les boutons passent à la ligne au lieu de sortir de l'écran (mobile) */
.dkp-gestion .btn { white-space: normal; margin: 0 6px 8px 0; max-width: 100%; text-align: left; }
.dkp-gestion .btn small { opacity: .8; }
.dkp-inscrire { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 6px; border-top: 1px solid #ccc; }
.dkp-inscrire label { margin: 0; font-weight: 600; }
.dkp-inscrire select { flex: 1 1 220px; min-width: 0; max-width: 100%; margin: 0 !important; }
.dkp-inscrire .btn { margin: 0; }

/* ---------- Mobile : rien ne doit dépasser la largeur de l'écran ---------- */
@media (max-width: 767px) {
    .text-area img, .text-area table, .text-area iframe { max-width: 100%; }
    .dkp-gestion h2 { font-size: 21px; }
    .dkp-gestion .btn { display: block; width: 100%; margin-right: 0; }
}

/* Les ancres (#gestion, #manu…) ne doivent pas arriver sous le menu fixe */
#gestion, #manu { scroll-margin-top: 90px; }

/* ---------- Espace membre : documents et CACI ---------- */
.dkp-page-compte { min-height: 55vh; padding-bottom: 30px; }
.dkp-page-compte h2 { line-height: 1.2; margin-top: 14px; }

/* ---------- Formations : tableaux larges (séances d'un élève…) ---------- */
/* Le tableau défile à l'intérieur du cadre au lieu de faire déborder toute la page */
.dkp-table-defile { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin-bottom: 20px; }
.dkp-table-defile > .table { margin-bottom: 0; }
/* La colonne des compétences reste visible pendant le défilement */
.dkp-table-defile td:first-child, .dkp-table-defile th:first-child { position: sticky; left: 0; z-index: 1; background-color: #fff; }
.dkp-table-defile tr:nth-of-type(odd) td:first-child { background-color: #f9f9f9; }
/* Les lignes colorées (en-têtes de groupe de compétences) gardent leur couleur dans la colonne fixe */
.dkp-table-defile tr[style*="background-color"] td:first-child { background-color: inherit; }

/* ---------- Formulaires publics : contact, livre d'or ---------- */
/* Le champ e-mail (type="email" depuis 2027, pour le clavier adapté sur mobile) garde le style des champs texte du thème */
.contact-form input[type="email"]:not(.form-control) {
    float: left; width: 100%; height: 33px; padding: 0 10px; margin: 0 0 14px 0;
    border: 1px solid #d6d4d4; border-radius: 3px; box-shadow: 0 1px 1px 0 rgba(0,0,0,0.3); box-sizing: border-box;
}
@media (max-width: 767px) {
    /* nom et e-mail l'un sous l'autre, sur toute la largeur */
    .contact-form .input-box-1 { width: 100%; margin-left: 0; }
}

/* Espace membre : les longs boutons passent à la ligne au lieu d'élargir la page */
.dkp-page-compte .btn { white-space: normal; }

/* Newsletter du pied de page : texte d'exemple lisible sur le fond sombre (il était gris sur gris) */
.subscribe-input::placeholder { color: rgba(255,255,255,0.85); opacity: 1; }
