/* ATPH — thème du site
   Marine de l'uniforme, bleu de l'étoile de vie, jaune ATPH.
   Signature : la bande réfléchissante sous l'en-tête (une seule fois). */

@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/barlow-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --marine: #142a4c;
  --marine-2: #1c3a66;
  --etoile: #1f5fbf;
  --jaune: #ffcd00;
  --jaune-fonce: #e0b400;
  --blanc: #ffffff;
  --brume: #eef1f5;
  --ligne: #d7dde6;
  --encre: #162033;
  --gris: #556274;
  --rouge: #b42318;
  --vert: #18794e;

  --titre: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --texte: "Barlow", "Segoe UI", Arial, sans-serif;

  --rayon: 6px;
  --largeur: 1180px;

  --bs-body-font-family: var(--texte);
  --bs-body-color: var(--encre);
  --bs-link-color: var(--etoile);
  --bs-link-color-rgb: 31, 95, 191;
  --bs-link-hover-color: var(--marine);
}

html { scroll-padding-top: 90px; }
body { font-family: var(--texte); font-size: 1.0625rem; line-height: 1.6; color: var(--encre); background: var(--blanc); }
h1, h2, h3, h4, h5 { font-family: var(--titre); font-weight: 700; color: var(--marine); line-height: 1.15; letter-spacing: -0.005em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.35rem; }
p, li { max-width: 72ch; }
a { color: var(--etoile); text-underline-offset: 3px; }
a:hover { color: var(--marine); }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; }

.conteneur { width: 100%; max-width: var(--largeur); margin-inline: auto; padding-inline: 20px; }
.lien-evitement { position: absolute; left: -9999px; top: 0; background: var(--jaune); color: var(--marine); padding: 10px 16px; z-index: 2000; font-weight: 600; }
.lien-evitement:focus { left: 10px; top: 10px; }


/* ---------------------------------------------------------------- En-tête (fond blanc : le logo est conçu pour un fond clair) */
.entete { background: var(--blanc); position: sticky; top: 0; z-index: 1000; }
.entete .navbar { padding-block: 8px; }
.entete .logo { display: inline-flex; align-items: center; text-decoration: none; }
.entete .logo img { height: 64px; width: auto; }
.entete .nav-link { color: var(--marine); font-weight: 600; padding: 10px 14px !important; border-radius: var(--rayon); }
.entete .nav-link:hover, .entete .nav-link:focus { color: var(--marine); background: var(--brume); }
.entete .nav-link.actif { box-shadow: inset 0 -3px 0 var(--jaune); border-radius: 0; }
.entete .dropdown-menu { border: 1px solid var(--ligne); border-radius: var(--rayon); box-shadow: 0 12px 30px rgba(10, 22, 40, .14); padding: 8px; }
.entete .dropdown-item { border-radius: 4px; padding: 8px 12px; color: var(--encre); }
.entete .dropdown-item:hover, .entete .dropdown-item:focus { background: var(--brume); color: var(--marine); }
.entete .bouton-membre { background: var(--marine); color: var(--blanc) !important; margin-left: 6px; }
.entete .bouton-membre:hover, .entete .bouton-membre:focus { background: var(--marine-2) !important; color: var(--blanc) !important; }
.entete .navbar-toggler { border-color: var(--ligne); }

/* La bande réfléchissante : jaune haute visibilité, deux lignes argent. */
.bande-reflechissante {
  height: 14px;
  background:
    linear-gradient(to bottom,
      var(--jaune) 0 3px,
      #dfe3e8 3px 5px,
      var(--jaune) 5px 9px,
      #dfe3e8 9px 11px,
      var(--jaune) 11px 14px);
}

/* ---------------------------------------------------------------- Structure */
main { min-height: 50vh; }
.section { padding-block: 56px; }
.section-brume { background: var(--brume); }
.entete-page { background: var(--brume); padding-block: 36px 28px; border-bottom: 1px solid var(--ligne); }
.entete-page h1 { margin: 0; }
.entete-page p { margin: 8px 0 0; color: var(--gris); }
.fil { font-size: .95rem; color: var(--gris); margin-bottom: 6px; }
.fil a { color: var(--gris); }

/* ---------------------------------------------------------------- Boutons et messages */
.bouton, .btn-atph {
  display: inline-block; font-family: var(--titre); font-weight: 700; font-size: 1.05rem;
  background: var(--marine); color: var(--blanc); border: 2px solid var(--marine);
  padding: 10px 20px; border-radius: var(--rayon); text-decoration: none; cursor: pointer; line-height: 1.2;
}
.bouton:hover, .btn-atph:hover { background: var(--marine-2); border-color: var(--marine-2); color: var(--blanc); }
.bouton-jaune { background: var(--jaune); border-color: var(--jaune); color: var(--marine); }
.bouton-jaune:hover { background: var(--jaune-fonce); border-color: var(--jaune-fonce); color: var(--marine); }
.bouton-contour { background: transparent; color: var(--marine); }
.bouton-contour:hover { color: var(--blanc); }
.bouton-danger { background: var(--rouge); border-color: var(--rouge); }

.message { border-radius: var(--rayon); padding: 12px 16px; margin: 16px 0; border-left: 5px solid; }
.message-succes { background: #e8f5ee; border-color: var(--vert); }
.message-erreur { background: #fdecea; border-color: var(--rouge); }
.message-info { background: #e8f0fb; border-color: var(--etoile); }

/* ---------------------------------------------------------------- Formulaires */
.formulaire { max-width: 720px; }
.formulaire label { font-weight: 600; margin-bottom: 4px; display: block; }
.formulaire .aide { font-size: .92rem; color: var(--gris); }
.form-control, .form-select { border-color: #b9c3d1; border-radius: var(--rayon); padding: 10px 12px; font-size: 1rem; }
.form-control:focus, .form-select:focus { border-color: var(--etoile); box-shadow: 0 0 0 3px rgba(31, 95, 191, .2); }

/* ---------------------------------------------------------------- Accueil */
.une { background: var(--marine); }
.une img { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.bandeau-fsss { background: var(--marine-2); color: var(--blanc); padding-block: 16px; }
.bandeau-fsss .conteneur { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.bandeau-fsss p { margin: 0; font-weight: 600; }

.qui { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; }
.qui img { border-radius: var(--rayon); }

/* Nouvelles : liste datée plutôt que cartes identiques. */
.liste-nouvelles { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--marine); }
.liste-nouvelles li { max-width: none; display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--ligne); }
.liste-nouvelles .date { font-family: var(--titre); font-weight: 700; color: var(--marine); line-height: 1.2; }
.liste-nouvelles .date small { display: block; font-family: var(--texte); font-weight: 400; color: var(--gris); }
.liste-nouvelles h3 { margin: 0 0 4px; font-size: 1.3rem; }
.liste-nouvelles h3 a { color: var(--marine); text-decoration: none; }
.liste-nouvelles h3 a:hover { color: var(--etoile); text-decoration: underline; }
.liste-nouvelles p { margin: 0; color: var(--gris); }
.liste-nouvelles .meta { font-size: .92rem; color: var(--gris); }

.saviez { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.saviez article { background: var(--blanc); border-top: 4px solid var(--jaune); padding: 18px 20px; border-radius: 0 0 var(--rayon) var(--rayon); }
.saviez h3 { font-size: 1.2rem; margin-bottom: 6px; }
.saviez p { color: var(--gris); margin-bottom: 8px; }

/* Documents */
.liste-docs { list-style: none; padding: 0; margin: 0; }
.liste-docs li { max-width: none; display: flex; gap: 16px; align-items: baseline; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--ligne); }
.liste-docs .date { color: var(--gris); font-size: .92rem; white-space: nowrap; }
.contenu-riche img { border-radius: var(--rayon); }
.contenu-riche table { width: 100%; border-collapse: collapse; }
.contenu-riche td, .contenu-riche th { border: 1px solid var(--ligne); padding: 6px 8px; }

.pagination-atph { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.pagination-atph a, .pagination-atph span { min-width: 40px; text-align: center; padding: 8px 10px; border-radius: var(--rayon); border: 1px solid var(--ligne); text-decoration: none; }
.pagination-atph span[aria-current] { background: var(--marine); color: var(--blanc); border-color: var(--marine); }

/* Tableaux de gestion */
.table-atph { width: 100%; border-collapse: collapse; background: var(--blanc); }
.table-atph th { background: var(--marine); color: var(--blanc); font-family: var(--titre); font-weight: 600; text-align: left; padding: 10px 12px; }
.table-atph td { padding: 10px 12px; border-bottom: 1px solid var(--ligne); vertical-align: top; }
.table-atph tr:hover td { background: #f7f9fc; }
.table-atph .nombre { text-align: right; font-variant-numeric: tabular-nums; }

.filtres-regions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.filtres-regions a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ligne); background: var(--blanc); text-decoration: none; color: var(--marine); font-size: .95rem; }
.filtres-regions a[aria-current] { background: var(--marine); color: var(--blanc); border-color: var(--marine); }
.liste-nouvelles h2.h3 { margin: 0 0 4px; font-size: 1.3rem; }
.liste-nouvelles h2.h3 a { color: var(--marine); text-decoration: none; }
.liste-nouvelles h2.h3 a:hover { color: var(--etoile); text-decoration: underline; }

/* ---------------------------------------------------------------- Espace membre */
.barre-membre { background: var(--brume); border-bottom: 1px solid var(--ligne); padding-block: 10px; font-size: .95rem; }
.barre-membre .conteneur { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.barre-membre .fil { margin: 0; }
.barre-membre .qui-connecte { color: var(--gris); }
.tableau-bord { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 36px; }
.tuile { display: block; background: var(--blanc); border: 1px solid var(--ligne); border-left: 5px solid var(--marine); border-radius: var(--rayon); padding: 16px 18px; text-decoration: none; color: var(--marine); font-family: var(--titre); font-weight: 700; font-size: 1.15rem; }
.tuile:hover, .tuile:focus { border-left-color: var(--jaune); background: #fbfcfe; color: var(--marine); }
.tuile small { display: block; font-family: var(--texte); font-weight: 400; font-size: .9rem; color: var(--gris); margin-top: 2px; }
.actions-ligne { display: flex; gap: 6px; flex-wrap: wrap; }
.actions-ligne form { display: inline; margin: 0; }
.bouton-petit { font-size: .9rem; padding: 5px 10px; }

/* ---------------------------------------------------------------- Pied de page */
.pied { background: var(--marine); color: #c9d3e2; margin-top: 0; }
.pied .conteneur { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-block: 44px 28px; }
.pied h2 { color: var(--blanc); font-size: 1.15rem; margin-bottom: 10px; }
.pied a { color: var(--blanc); }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: 6px; }
.pied .bas { border-top: 1px solid rgba(255,255,255,.12); padding-block: 14px; font-size: .9rem; }
.pied .bas .conteneur { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-block: 0; grid-template-columns: none; }

/* ---------------------------------------------------------------- Compatibilité avec l'ancien balisage Bootstrap 3 */
.pull-left { float: left; } .pull-right { float: right; }
.img-responsive { max-width: 100%; height: auto; display: block; }
.btn-default { background: var(--blanc); border: 1px solid #b9c3d1; color: var(--encre); }
.clearfix::after { content: ""; display: table; clear: both; }

/* ---------------------------------------------------------------- Petits écrans */
@media (max-width: 991.98px) {
  .entete .navbar-collapse { padding-bottom: 12px; }
  .entete .bouton-membre { margin: 8px 0 0; display: inline-block; }
}
@media (max-width: 767.98px) {
  body { font-size: 1rem; }
  .section { padding-block: 40px; }
  .qui { grid-template-columns: 1fr; gap: 24px; }
  .liste-nouvelles li { grid-template-columns: 1fr; gap: 4px; }
  .pied .conteneur { grid-template-columns: 1fr; }
  .entete .logo img { height: 52px; }
  .liste-docs li { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .entete, .pied, .bande-reflechissante { display: none; } }
.liste-nouvelles .vignette { display: block; width: 140px; height: 90px; object-fit: cover; object-position: top; border-radius: 4px; margin: 6px 0; border: 1px solid var(--ligne); }

/* Diaporama de l'accueil */
.une .carousel-item img { display: block; width: 100%; height: clamp(260px, 42vw, 560px); object-fit: cover; }
.legende-diapo { position: absolute; inset: auto 0 0 0; padding: 60px 0 36px; background: linear-gradient(to top, rgba(20, 42, 76, .92), rgba(20, 42, 76, 0)); color: var(--blanc); }
.legende-diapo h2 { color: var(--blanc); font-size: clamp(1.6rem, 3.6vw, 2.8rem); margin-bottom: 6px; max-width: 24ch; }
.legende-diapo p { color: #e3e9f2; font-size: 1.15rem; margin-bottom: 14px; }
.bouton-pause { position: absolute; right: 16px; top: 16px; z-index: 3; background: rgba(20, 42, 76, .75); color: var(--blanc); border: 1px solid rgba(255,255,255,.5); border-radius: var(--rayon); padding: 4px 12px; font-size: .9rem; }

/* Fiches de l'équipe */
.grille-equipe { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.fiche { background: var(--blanc); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; display: flex; flex-direction: column; }
.fiche img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top; background: var(--brume); }
.fiche-texte { padding: 14px 16px 16px; border-top: 4px solid var(--jaune); flex: 1; }
.fiche h2 { font-size: 1.3rem; margin: 0 0 2px; }
.fiche .poste { color: var(--etoile); font-weight: 600; margin-bottom: 8px; }
.fiche .coordonnees { list-style: none; padding: 0; margin: 0 0 8px; font-size: .95rem; word-break: break-word; }
.fiche details summary { cursor: pointer; color: var(--marine); font-weight: 600; }
.fiche details p { font-size: .95rem; color: var(--gris); margin-top: 6px; }
.mot-president { font-size: 1.15rem; }

/* Administration : aperçus */
.apercu-photo { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: var(--rayon); margin-bottom: 8px; border: 1px solid var(--ligne); }
.apercu-photo.apercu-large { width: 100%; max-width: 360px; height: auto; aspect-ratio: 16 / 7; }
.mini-photo { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.grille-diapos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.carte-diapo { border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; background: var(--blanc); }
.carte-diapo img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; display: block; }
.carte-diapo.inactive { opacity: .6; }

/* Banque d'heures */
.total-heures { display: inline-flex; align-items: baseline; gap: 12px; background: var(--marine); color: var(--blanc); border-radius: var(--rayon); padding: 12px 20px; margin: 4px 0 24px; }
.total-heures span { font-weight: 600; color: #c9d3e2; }
.total-heures strong { font-family: var(--titre); font-size: 2rem; color: var(--jaune); font-variant-numeric: tabular-nums; }
.total-heures.negatif strong { color: #ffb4a8; }
.ajout-heures { max-width: none; background: var(--brume); padding: 16px; border-radius: var(--rayon); }
