/* style.css - WhatsApp Link Generator Pro */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.whatsapp-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8em;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
}

/* Statistiques */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 1px solid #dee2e6;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #25D366;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Alertes */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-icon {
    font-size: 1.2em;
}

/* Formulaire */
.main-form {
    margin-bottom: 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1em;
}

input, textarea, select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #25D366;
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
    transform: translateY(-1px);
}

.phone-input-group {
    display: flex;
    gap: 12px;
}

.country-select {
    flex: 0 0 140px;
    font-weight: 500;
}

.phone-input {
    flex: 1;
}

/* Messages de validation */
.validation-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.validation-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Compteur de caractères */
.char-counter {
    text-align: right;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

/* Templates de messages */
.message-templates {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.message-templates label {
    margin-bottom: 15px;
    color: #495057;
}

.template-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.template-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid #25D366;
    border-radius: 20px;
    color: #25D366;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
}

.template-btn:hover {
    background: #25D366;
    color: white;
    transform: translateY(-1px);
}

/* Bouton principal */
.generate-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

.generate-btn:active {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Section de résultats */
.result-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 2px solid #25D366;
    display: none;
}

.result-section.show {
    display: block;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.result-section h3 {
    color: #155724;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.result-details {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
}

.detail-item {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-link {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    margin: 15px 0;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Boutons d'action */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-btn {
    background: #3498db;
    color: white;
}

.copy-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.open-btn {
    background: #25D366;
    color: white;
}

.open-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.share-btn {
    background: #9b59b6;
    color: white;
}

.share-btn:hover {
    background: #8e44ad;
    transform: translateY(-2px);
}

.small-btn {
    padding: 8px 12px;
    font-size: 0.85em;
    border-radius: 6px;
    background: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.small-btn:hover {
    background: #5a6268;
}

.clear-btn {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;