/* ============================================================
   Assemblée Membres — style.css  v2.0.0
   Design inspiré de la présentation avec photos circulaires
   ============================================================ */

/* ---------- Wrapper ---------- */
.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;
}

.am-wrapper {
    display: grid;
    gap: 30px 20px;
    margin: 0 auto;
    padding: 10px 0 30px;
}

/* ---------- Colonnes (1-12) ---------- */
.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: 10px 8px 16px;
}

/* ---------- Conteneur photo — base commune ---------- */
.am-photo-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 14px;
    flex-shrink: 0;
    overflow: hidden;          /* L'image ne déborde JAMAIS du cadre */
    background: #d0dce8;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* L'image ET le placeholder remplissent toujours 100% du wrap */
.am-photo-wrap .am-photo,
.am-photo-wrap .am-photo-placeholder {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;         /* Recadrage centré, pas de déformation */
    object-position: center top; /* Centre sur le visage */
}

/* ---- Style circle (défaut) ---- */
.am-style-circle .am-photo-wrap {
    border-radius: 50%;
    border: 4px solid #fff;
}

/* ---- Style square ---- */
.am-style-square .am-photo-wrap {
    border-radius: 6px;
    border: 4px solid #fff;
}

/* ---- Style rounded ---- */
.am-style-rounded .am-photo-wrap {
    border-radius: 18px;
    border: 4px solid #fff;
}

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

/* ---------- Infos texte ---------- */
.am-info {
    width: 100%;
}
.am-titre {
    display: block;
    font-size: .78em;
    color: #888;
    margin-bottom: 3px;
    font-style: italic;
}
.am-name {
    font-weight: 700;
    font-size: 1em;
    color: #1a2a4a;
    margin: 0 0 5px;
    line-height: 1.25;
}
.am-fonction {
    font-size: .82em;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* ---------- Message vide ---------- */
.am-empty {
    color: #888;
    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);
    }
}
@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);
    }
    /* Le wrap se redimensionne, l'image suit automatiquement via 100% */
    .am-photo-wrap { width: 90px; height: 90px; }
}
@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);
    }
}
@media ( max-width: 320px ) {
    .am-wrapper { grid-template-columns: 1fr !important; }
}
