/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* --------------------------------
   Liens & éléments généraux
---------------------------------*/
.elementor-icon-list-text a { display: inline !important; }

/* Pied de page */
a.pied { color:#000!important; font-weight:400!important; text-decoration:none!important; }
a:hover.pied { text-decoration:underline!important; color:#8C8C8B!important; }

/* Menu secondaire */
.menu_sec li a { text-decoration:none!important; transition:all .6s ease-in-out!important; }
.menu_sec li a:hover { color:#666!important; }

/* Bouton soulignement */
.bt_present a { text-decoration:none!important; }

/* Liens de menus spécifiques (préservent la déco) */
.elementor-1075 .elementor-element.elementor-element-15bdad7 .elementor-nav-menu .elementor-item,
.elementor-1075 .elementor-element.elementor-element-2e7d8d5 .elementor-nav-menu .elementor-item {
  text-decoration: none!important;
}

/* Bouton de fermeture des popups */
.dialog-close-button,
.dialog-close-button svg { border:none!important; outline:none!important; box-shadow:none!important; background:none!important; }
.dialog-close-button:focus { outline:none!important; box-shadow:none!important; }

/* --------------------------------
   Tables – comportements généraux
---------------------------------*/
table tbody tr:hover>td,
table tbody tr:hover>th {
  background-color: hsla(0,0%,12.2%,.102)!important;
}

/* --------------------------------
   Tableau Événements
---------------------------------*/
.table-evenements { width:100%; border-collapse:collapse; font-family:Arial,sans-serif; }
.table-evenements thead tr { background-color:#fff; color:#000; font-weight:bold; text-align:left; }
.table-evenements thead th { padding:12px 10px; text-align:center!important; }
.table-evenements tbody td { border:1px solid #ddd; padding:10px; }

/* Colonnes spécifiques */
.table-evenements th:nth-child(1), .table-evenements td:nth-child(1) { width:15%; text-align:center; }
.table-evenements th:nth-child(4), .table-evenements td:nth-child(4) { width:15%; text-align:left; }
.table-evenements th:nth-child(5), .table-evenements td:nth-child(5) { width:12%; text-align:center; }

/* Lieu & Titre auto */
.table-evenements th:nth-child(2), .table-evenements td:nth-child(2),
.table-evenements th:nth-child(3), .table-evenements td:nth-child(3) {
  width:auto; text-align:left;
}

/* --------------------------------
   Tables Textes
---------------------------------*/
.table-textes thead tr { background-color:#fff; color:#000; font-weight:bold; text-align:left; }
.table-textes thead th { padding:12px 10px; text-align:center!important; }
.table-textes tbody td { border:1px solid #ddd; padding:10px; }
.table-textes th:nth-child(1), .table-textes td:nth-child(1) { width:35%; text-align:left; }
.table-textes th:nth-child(4), .table-textes td:nth-child(4) { width:12%; text-align:left; }

/* --------------------------------
   Organismes de formation
---------------------------------*/
.table-organismes { width:100%; border-collapse:collapse; margin-top:20px; font-family:Arial,sans-serif; }
.table-organismes th, .table-organismes td { border:1px solid #ccc; padding:10px; text-align:left; vertical-align:top; }
.table-organismes th { background-color:#f4f4f4; }
.table-organismes img { max-height:50px; }

/* --------------------------------
   Superviseurs (table générique)
---------------------------------*/
.table-annuaire { width:100%; border-collapse:collapse; min-width:600px; }
.table-annuaire thead { background:#0073aa; color:#fff; }
.table-annuaire th, .table-annuaire td { padding:8px; border:1px solid #ccc; word-wrap:break-word; }

/* --------------------------------
   ANNUAIRE PSY – Formulaire (global)
---------------------------------*/
#searchForm { display:flex; flex-direction:column; gap:15px; max-width:100%; }
#searchForm label { padding:12px 0; }

.form-row { display:flex; flex-wrap:wrap; gap:20px; }
.form-col { flex:1; min-width:200px; }

#results { min-height:200px; transition:all .3s ease-in-out; }

.form-actions { display:flex; gap:10px; margin-top:10px; }
.form-actions input[type="submit"], .form-actions button { padding:6px 12px; cursor:pointer; }

/* --------------------------------
   ANNUAIRE “PAYS” – Résultats (desktop)
   => classe utilisée par le shortcode : .annuaire-resultats
---------------------------------*/
.annuaire-resultats { width:100%; border-collapse:collapse; min-width:600px; }
.annuaire-resultats th, .annuaire-resultats td { padding:10px; border:1px solid #ccc; vertical-align:top; }
.annuaire-resultats th { background:#f8f8f8; }
.annuaire-resultats a { background:#2DAAE2; color:#fff; padding:8px 12px; text-decoration:none; border-radius:6px; display:inline-block; font-weight:bold; }

/* --------------------------------
   VERSION MOBILE
---------------------------------*/
@media (max-width: 768px) {

  /* Pied de page plus compact */
  a.pied { font-size:80%!important; }

  /* Organismes : compacter */
  .table-organismes td, .table-organismes th { font-size:13px; padding:6px; }

  /* Événements : largeur fixée */
  table.table-evenements { width:100%; border-collapse:collapse; }

  /* Tables “type” en cartes */
  .tableau_type { border:0; width:100%; }
  .tableau_type thead { display:none; }
  .tableau_type tr {
    display:block; margin-bottom:12px; padding:12px; border-radius:8px;
    border:1px solid #ddd; background-color:#fff; box-shadow:0 1px 4px rgba(0,0,0,0.05);
  }
  .tableau_type td { display:flex; align-items:center; padding:6px 0; border:none; font-size:.95em; }
  .tableau_type th { text-align:left; }
  .tableau_type td::before {
    content:attr(data-label); flex:0 0 110px; font-weight:600; color:#2DAAE2; margin-right:10px; font-size:.9em;
  }
  .tableau_type td, .tableau_type th { text-align:left; }

  /* Forcer l'affichage des shortcodes événements */
  .elementor-shortcode,
  .elementor-widget-shortcode,
  .table-evenements,
  .debug-shortcode {
    display:block!important; visibility:visible!important; opacity:1!important;
    max-height:none!important; overflow:visible!important;
  }

  /* Superviseurs (table -> cartes) */
  .table-superviseures,
  .table-superviseures thead,
  .table-superviseures tbody,
  .table-superviseures th,
  .table-superviseures td,
  .table-superviseures tr { display:block; }
  .table-superviseures thead tr { position:absolute; top:-9999px; left:-9999px; }
  .table-superviseures tr { margin-bottom:1rem; border:1px solid #ccc; padding:10px; background:#fff; }
  .table-superviseures td {
    border:none; border-bottom:1px solid #eee; position:relative; padding-left:50%; text-align:left;
  }
  .table-superviseures td::before {
    position:absolute; top:8px; left:12px; width:45%; padding-right:10px; white-space:nowrap;
    font-weight:600; color:#2DAAE2; content:attr(data-label);
  }

  /* ======= Correctif mobile : ANNUAIRE “PAYS” (.annuaire-resultats) ======= */
  .annuaire-resultats {
    display:block;         /* ne pas masquer la table */
    min-width:0;           /* annule le min-width:600px */
    width:100%;
    border-collapse:separate;
    border-spacing:0;
  }
  .annuaire-resultats thead { display:none; }
  .annuaire-resultats tbody,
  .annuaire-resultats tr,
  .annuaire-resultats td { display:block; width:100%; }
  .annuaire-resultats tr {
    border:1px solid #ccc; border-radius:10px; margin-bottom:20px; padding:16px;
    box-shadow:0 2px 5px rgba(0,0,0,0.05);
  }
  .annuaire-resultats td { border:none; padding:8px 0; font-size:15px; }
  .annuaire-resultats td::before {
    content:attr(data-label); font-weight:bold; color:#2DAAE2; display:block; margin-bottom:4px;
  }
  .annuaire-resultats td:last-child { text-align:center; margin-top:10px; }
  .annuaire-resultats a { display:block; width:100%; text-align:center; font-size:1rem; padding:12px; }
}
