/* Helios Formations — Front-end Styles */

/* ============================
   GENERAL
   ============================ */
.hf-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.4;
}

.hf-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.hf-btn-primary {
    background: #c0392b;
    color: #fff;
}

.hf-btn-primary:hover {
    background: #a93226;
    color: #fff;
}

.hf-btn-secondary {
    background: #34495e;
    color: #fff;
}

.hf-btn-secondary:hover {
    background: #2c3e50;
    color: #fff;
}

.hf-btn-small {
    padding: 6px 14px;
    font-size: 13px;
}

/* Tags & Badges */
.hf-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    background: #e8e8e8;
    color: #333;
    margin-right: 4px;
}

.hf-tag-region {
    background: #dfe6e9;
    color: #2d3436;
}

.hf-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.hf-badge-ok { background: #d4edda; color: #155724; }
.hf-badge-pending { background: #fff3cd; color: #856404; }
.hf-badge-full { background: #f8d7da; color: #721c24; }

/* Notices */
.hf-notice {
    padding: 14px 18px;
    border-radius: 4px;
    margin: 16px 0;
    font-size: 14px;
}

.hf-notice-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }
.hf-notice-warning { background: #fff3cd; color: #856404; border-left: 4px solid #ffc107; }
.hf-notice-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.hf-notice-error { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }

.hf-info {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ============================
   CATALOGUE — Style EchoFirst
   ============================ */

/* Barre de filtres */
.hf-catalogue-filters {
    background: #f0f2f5;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 30px;
}

.hf-catalogue-filters-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hf-catalogue-filters select {
    padding: 10px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    min-width: 180px;
    color: #333;
    cursor: pointer;
    appearance: auto;
}

.hf-catalogue-filters select:focus {
    border-color: #c0392b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.hf-filter-reset {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    padding: 8px 4px;
}

.hf-filter-reset:hover {
    color: #a93226;
}

.hf-catalogue-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.hf-catalogue-count span {
    font-weight: 700;
    color: #333;
}

/* Liste des formations (disposition verticale) */
.hf-formations-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Carte formation — layout horizontal */
.hf-formation-card {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.15s ease;
}

.hf-formation-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Image à gauche */
.hf-formation-image {
    flex: 0 0 280px;
    min-height: 240px;
    overflow: hidden;
    position: relative;
}

.hf-formation-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hf-formation-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #999;
}

/* Corps à droite */
.hf-formation-body {
    flex: 1;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
}

/* Badges */
.hf-formation-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.hf-type-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hf-sessions-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    background: #eee;
}

/* Titre */
.hf-formation-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.hf-formation-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.hf-formation-title a:hover {
    color: #c0392b;
}

/* Extrait */
.hf-formation-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* Détails en 3 colonnes */
.hf-formation-details-row {
    display: flex;
    gap: 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 16px 0;
    margin-bottom: 16px;
}

.hf-detail-col {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0 16px;
    border-right: 1px solid #eee;
}

.hf-detail-col:first-child {
    padding-left: 0;
}

.hf-detail-col:last-child {
    border-right: none;
    padding-right: 0;
}

.hf-detail-icon {
    flex-shrink: 0;
    color: #c0392b;
    margin-top: 2px;
}

.hf-detail-icon svg {
    display: block;
}

.hf-detail-text {
    display: flex;
    flex-direction: column;
}

.hf-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
    margin-bottom: 3px;
}

.hf-detail-value {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

/* Footer de la carte */
.hf-formation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.hf-formation-availability {
    font-size: 13px;
}

.hf-places-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.hf-places-indicator.hf-places-ok {
    color: #27ae60;
}

.hf-places-indicator.hf-places-ok svg {
    color: #27ae60;
}

.hf-places-indicator.hf-places-full {
    color: #c0392b;
}

.hf-places-indicator.hf-places-full svg {
    color: #c0392b;
}

.hf-places-indicator.hf-places-none {
    color: #999;
    font-weight: 400;
    font-style: italic;
}

/* ============================
   SESSIONS (filtres + grille)
   ============================ */
.hf-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
}

.hf-filters label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.hf-filters select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    min-width: 180px;
}

.hf-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hf-sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.hf-session-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s;
}

.hf-session-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hf-session-full {
    opacity: 0.7;
    border-color: #e0e0e0;
}

.hf-session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 10px;
}

.hf-session-header h4 {
    margin: 0;
    font-size: 17px;
    color: #1a1a1a;
}

.hf-session-details {
    margin-bottom: 16px;
}

.hf-session-detail {
    font-size: 14px;
    color: #444;
    margin-bottom: 6px;
    line-height: 1.5;
}

.hf-session-detail strong {
    color: #222;
}

.hf-session-actions {
    padding-top: 14px;
    border-top: 1px solid #eee;
}

/* ============================
   FORMULAIRES
   ============================ */
.hf-field {
    margin-bottom: 16px;
    flex: 1;
    min-width: 200px;
}

.hf-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

.hf-field .required {
    color: #c0392b;
}

.hf-field input,
.hf-field select,
.hf-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.hf-field input:focus,
.hf-field select:focus,
.hf-field textarea:focus {
    border-color: #c0392b;
    outline: none;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.15);
}

.hf-fields-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hf-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hf-selected-info {
    padding: 12px 16px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 14px;
    color: #1565c0;
}

/* Candidat blocks */
.hf-candidat-block {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
}

.hf-candidat-block h4 {
    margin: 0 0 14px 0;
    font-size: 15px;
    color: #333;
}

.hf-remove-candidat {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f8d7da;
    color: #721c24;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    line-height: 28px;
    text-align: center;
    padding: 0;
}

.hf-remove-candidat:hover {
    background: #f5c6cb;
}

/* ============================
   DASHBOARD
   ============================ */
.hf-dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.hf-dashboard-header h3 {
    margin: 0 0 8px 0;
}

.hf-dashboard-session {
    margin-bottom: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.hf-dashboard-session h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #1a1a1a;
}

.hf-dashboard-session h5 small {
    font-weight: 400;
    color: #666;
}

.hf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hf-table th,
.hf-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.hf-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.hf-table tr:last-child td {
    border-bottom: none;
}

/* ============================
   LOGIN / REGISTER
   ============================ */
.hf-login-section,
.hf-register-section {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.hf-register-section {
    max-width: 700px;
}

.hf-login-section h3,
.hf-register-section h3 {
    margin-top: 0;
}

/* Inscription form */
.hf-inscription-form {
    margin-top: 30px;
    padding: 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.hf-inscription-form h3 {
    margin-top: 0;
}

/* Loading */
.hf-loading {
    text-align: center;
    padding: 40px;
    color: #888;
}

.hf-no-results {
    text-align: center;
    padding: 40px;
    color: #888;
    font-style: italic;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 900px) {
    .hf-formation-card {
        flex-direction: column;
    }

    .hf-formation-image {
        flex: none;
        height: 220px;
        min-height: auto;
    }

    .hf-formation-details-row {
        flex-direction: column;
        gap: 14px;
    }

    .hf-detail-col {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 0 0 14px 0;
    }

    .hf-detail-col:first-child {
        padding-left: 0;
    }

    .hf-detail-col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .hf-formation-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .hf-sessions-grid {
        grid-template-columns: 1fr;
    }

    .hf-fields-row {
        flex-direction: column;
    }

    .hf-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .hf-filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .hf-catalogue-filters-inner {
        flex-direction: column;
    }

    .hf-catalogue-filters select {
        min-width: auto;
        width: 100%;
    }

    .hf-login-section,
    .hf-register-section {
        padding: 20px;
    }

    .hf-table {
        font-size: 12px;
    }

    .hf-table th,
    .hf-table td {
        padding: 8px 6px;
    }

    .hf-formation-body {
        padding: 16px 18px;
    }

    .hf-formation-title {
        font-size: 18px;
    }
}
