/* ============================================================
   Assemblee Membres — style.css  v2.1.0
   Taille pilotee par la variable CSS --am-img-size
   ============================================================ */

.am-section { margin: 30px 0; }

.am-section-title {
    text-align: center;
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a2a4a;
    position: relative;
    padding-bottom: 12px;
}
.am-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #1a56a0;
    margin: 8px auto 0;
    border-radius: 2px;
}

/* ── Grille ── */
.am-wrapper {
    display: grid;
    gap: 30px 16px;
    margin: 0 auto;
    padding: 10px 0 30px;
    --am-img-size: 130px;
}

.am-cols-1  { grid-template-columns: repeat(1,  1fr); }
.am-cols-2  { grid-template-columns: repeat(2,  1fr); }
.am-cols-3  { grid-template-columns: repeat(3,  1fr); }
.am-cols-4  { grid-template-columns: repeat(4,  1fr); }
.am-cols-5  { grid-template-columns: repeat(5,  1fr); }
.am-cols-6  { grid-template-columns: repeat(6,  1fr); }
.am-cols-7  { grid-template-columns: repeat(7,  1fr); }
.am-cols-8  { grid-template-columns: repeat(8,  1fr); }
.am-cols-9  { grid-template-columns: repeat(9,  1fr); }
.am-cols-10 { grid-template-columns: repeat(10, 1fr); }
.am-cols-11 { grid-template-columns: repeat(11, 1fr); }
.am-cols-12 { grid-template-columns: repeat(12, 1fr); }

/* ── Carte ── */
.am-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 6px 16px;
}

/* ── Photo : taille via variable CSS ── */
.am-photo-wrap {
    width:  var(--am-img-size);
    height: var(--am-img-size);
    margin: 0 auto 14px;
    flex-shrink: 0;
    overflow: hidden;
    background: #d0dce8;
    box-shadow: 0 4px 16px rgba(0,0,0,.16);
    transition: transform .2s ease;
}
.am-card:hover .am-photo-wrap { transform: scale(1.04); }

.am-photo-wrap .am-photo,
.am-photo-wrap .am-photo-placeholder {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center top;
}

/* ── Formes ── */
.am-style-circle  .am-photo-wrap { border-radius: 50%;  border: 4px solid #fff; }
.am-style-square  .am-photo-wrap { border-radius: 5px;  border: 4px solid #fff; }
.am-style-rounded .am-photo-wrap { border-radius: 18px; border: 4px solid #fff; }

/* ── Placeholder ── */
.am-photo-placeholder { display:flex; align-items:center; justify-content:center; background:#d0dce8; }
.am-photo-placeholder svg { width:75%; height:75%; }

/* ── Texte — !important pour ne pas etre ecrase par le theme ── */
.am-info {
    width: 100%;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.am-card .am-titre {
    display: block !important;
    visibility: visible !important;
    margin: 4px 0 2px !important;
    line-height: 1.3 !important;
    text-align: center !important;
}
.am-card .am-name {
    display: block !important;
    visibility: visible !important;
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
    text-align: center !important;
}
.am-card .am-fonction {
    display: block !important;
    visibility: visible !important;
    margin: 0 !important;
    line-height: 1.45 !important;
    text-align: center !important;
}
.am-empty { color:#999; font-style:italic; text-align:center; padding:20px 0; }

/* ── Responsive ── */
@media (max-width:1024px) {
    .am-cols-7,.am-cols-8,.am-cols-9,.am-cols-10,.am-cols-11,.am-cols-12 { grid-template-columns:repeat(5,1fr); }
}
@media (max-width:860px) {
    .am-cols-5,.am-cols-6,.am-cols-7,.am-cols-8,.am-cols-9,.am-cols-10,.am-cols-11,.am-cols-12 { grid-template-columns:repeat(4,1fr); }
    .am-wrapper { --am-img-size:100px; }
}
@media (max-width:680px) {
    .am-cols-4,.am-cols-5,.am-cols-6,.am-cols-7,.am-cols-8,.am-cols-9,.am-cols-10,.am-cols-11,.am-cols-12 { grid-template-columns:repeat(3,1fr); }
    .am-wrapper { --am-img-size:85px; }
}
@media (max-width:480px) {
    .am-cols-3,.am-cols-4,.am-cols-5,.am-cols-6,.am-cols-7,.am-cols-8,.am-cols-9,.am-cols-10,.am-cols-11,.am-cols-12 { grid-template-columns:repeat(2,1fr); }
    .am-wrapper { --am-img-size:90px; }
}
@media (max-width:320px) { .am-wrapper { grid-template-columns:1fr !important; } }

/* ============================================================
   OVERRIDE FORT — force l'affichage du texte contre tout theme
   ============================================================ */
div.am-section div.am-wrapper div.am-card div.am-info span.am-titre,
div.am-section div.am-wrapper div.am-card div.am-info p.am-name,
div.am-section div.am-wrapper div.am-card div.am-info p.am-fonction {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    clip: auto !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    width: auto !important;
    max-width: 100% !important;
    text-indent: 0 !important;
}
div.am-section div.am-wrapper div.am-card div.am-info span.am-titre {
    margin: 4px 0 2px !important;
}
div.am-section div.am-wrapper div.am-card div.am-info p.am-name {
    margin: 0 0 5px !important;
    line-height: 1.3 !important;
}
div.am-section div.am-wrapper div.am-card div.am-info p.am-fonction {
    margin: 0 !important;
    line-height: 1.45 !important;
}
/* S'assurer que la carte est visible */
div.am-section div.am-wrapper div.am-card {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
