/**
 * Alertes Terrain - Styles CSS
 * Version: 1.0
 * Force Collective Lamentin
 */

/* ===========================
   VARIABLES DE COULEURS
   =========================== */
:root {
    --bleu-principal: #21a0a7;
    --vert-engagement: #2e5f63;
    --orange-cta: #a7362f;
    --gris-clair: #f8f9fa;
    --dark: #2c3e50;
}

/* ===========================
   CONTENEUR PRINCIPAL
   =========================== */
#alertes-terrain-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* ===========================
   FORMULAIRE
   =========================== */
#alertes-terrain-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 16px;
}

.required {
    color: var(--orange-cta);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--bleu-principal);
    box-shadow: 0 0 0 3px rgba(33, 160, 167, 0.1);
}

textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ===========================
   BOUTONS RADIO (ENCARTS)
   =========================== */
.radio-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .radio-cards {
        grid-template-columns: 1fr;
    }
}

.radio-card {
    position: relative;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    display: block;
}

.radio-card:hover {
    border-color: var(--bleu-principal);
    box-shadow: 0 4px 12px rgba(33, 160, 167, 0.2);
    transform: translateY(-2px);
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-card input[type="radio"]:checked ~ .radio-card-content {
    background: #f0f9fa;
}

.radio-card input[type="radio"]:checked ~ .radio-card-content::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--bleu-principal);
    border-radius: 50%;
}

.radio-card input[type="radio"]:checked ~ .radio-card-content::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    color: white;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-card-content {
    position: relative;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s;
}

.radio-card-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.radio-card-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 8px;
}

.radio-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* ===========================
   BOUTON DE SOUMISSION
   =========================== */
.btn-submit {
    width: 100%;
    padding: 15px 30px;
    background: var(--bleu-principal);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(33, 160, 167, 0.3);
}

.btn-submit:hover {
    background: var(--vert-engagement);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(33, 160, 167, 0.4);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===========================
   MESSAGES DE CONFIRMATION/ERREUR
   =========================== */
#form-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

#form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

#form-message h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

#form-message p {
    margin: 5px 0;
    line-height: 1.6;
}

/* ===========================
   ADMINISTRATION - ENCARTS STATISTIQUES
   =========================== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px 0;
}

@media (max-width: 1024px) {
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
}

.stat-card:hover {
    border-color: var(--bleu-principal);
    box-shadow: 0 4px 12px rgba(33, 160, 167, 0.2);
    transform: translateY(-3px);
}

.stat-card.active {
    border-color: var(--bleu-principal);
    background: #f0f9fa;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--bleu-principal);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 16px;
    color: var(--dark);
    font-weight: 600;
}

/* ===========================
   ADMINISTRATION - TABLEAU
   =========================== */
.alertes-table {
    margin-top: 30px;
    background: white;
}

.alertes-table thead th {
    background: var(--dark);
    color: white;
    padding: 15px 10px;
    font-weight: 600;
}

.alertes-table tbody td {
    padding: 12px 10px;
    vertical-align: middle;
}

.alertes-table tbody tr:hover {
    background: var(--gris-clair);
}

/* Lignes marquées comme "utilisées" */
.alertes-table tbody tr.row-utilise {
    background: var(--dark);
    color: white;
}

.alertes-table tbody tr.row-utilise:hover {
    background: #34495e;
}

.alertes-table tbody tr.row-utilise td {
    color: white;
}

/* ===========================
   ADMINISTRATION - DÉTAIL
   =========================== */
.alerte-detail {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alerte-detail .form-table th {
    width: 200px;
    font-weight: 600;
    color: var(--dark);
}

.alerte-detail .form-table td {
    padding: 15px 10px;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    #alertes-terrain-form {
        padding: 20px;
    }

    .radio-card {
        padding: 15px;
    }

    .radio-card-icon {
        font-size: 30px;
    }

    .btn-submit {
        font-size: 16px;
        padding: 12px 20px;
    }

    .alertes-table {
        font-size: 13px;
    }

    .alertes-table thead th,
    .alertes-table tbody td {
        padding: 8px 5px;
    }
}
