:root {
    --primary-color: #4a6fa5;
    --secondary-color: #166088;
    --success-color: #28a745;
    --error-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    color: var(--secondary-color);
}

header h1 {
    font-size: 2.5rem;
}

header h1 i {
    margin-right: 10px;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

h2 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="tel"],
input[type="text"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="tel"]:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.counter {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.send-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.send-btn i {
    margin-right: 10px;
}

.send-btn:hover {
    background-color: var(--secondary-color);
}

.history-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.history-controls input,
.history-controls select {
    flex: 1;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
}

.sms-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sms-item:last-child {
    border-bottom: none;
}

.sms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sms-phone {
    font-weight: 600;
    color: var(--dark-color);
}

.sms-date {
    font-size: 0.9rem;
    color: #666;
}

.sms-message {
    color: #555;
}

.sms-status {
    font-size: 0.9rem;
    padding: 3px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

.status-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-failed {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

/* Responsive design */
@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
}


/* Styles pour les alertes */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slide-in 0.3s ease-out;
    max-width: 400px;
}

.alert-success {
    background-color: var(--success-color);
}

.alert-error {
    background-color: var(--error-color);
}

.alert-info {
    background-color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 15px;
    padding: 0 5px;
}

.fade-out {
    animation: fade-out 0.3s ease-out forwards;
}

@keyframes slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fade-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Style pour le bouton pendant le chargement */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}
