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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.welcome-section, .info-section, .portal-showcase {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.welcome-section {
    text-align: center;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.welcome-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 1.3rem;
}

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

/* Info section */
.info-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.step {
    text-align: center;
    padding: 1rem;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.step p {
    color: #666;
    font-size: 1rem;
}

/* Form styles */
.form-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group.required label::after {
    content: " *";
    color: #dc3545;
}

/* Resident section */
.resident-section {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
}

.resident-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.resident-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-remove:hover {
    background: #c82333;
}

.btn-add {
    background: #28a745;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.btn-add:hover {
    background: #218838;
}

/* Alert messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

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

/* Code display */
.code-display {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin: 2rem 0;
    border: 3px solid #667eea;
}

.code-value {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
    margin: 1rem 0;
}

.code-warning {
    color: #dc3545;
    font-weight: 600;
    margin-top: 1rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: white;
    opacity: 0.8;
}

/* Sections famille et personnel */
.famille-container, .personnel-container {
    margin: 2rem 0;
}

.famille-container h3, .personnel-container h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 1rem;
}

.famille-section {
    border-left: 4px solid #28a745;
}

.personnel-section {
    border-left: 4px solid #ffc107;
    background: #fffbf0;
}

/* Horaires section */
.horaires-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.horaires-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #495057;
}

.horaires-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Checkbox group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.checkbox-label:hover {
    background: #e9ecef;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-text {
    font-size: 0.9rem;
    color: #495057;
}

/* Time inputs */
input[type="time"] {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input[type="time"]:focus {
    outline: none;
    border-color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .welcome-section, .info-section, .form-container, .portal-showcase {
        padding: 1.5rem;
    }
    
    .portal-image {
        max-height: 250px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .horaires-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .welcome-section, .info-section, .form-container, .portal-showcase {
        padding: 1rem;
    }
    
    .portal-image {
        max-height: 200px;
    }
    
    .portal-showcase h3 {
        font-size: 1.4rem;
    }
    
    .code-value {
        font-size: 1.2rem;
    }
}

/* Styles pour le bouton de copie des téléphones */
.telephone-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.telephone {
    font-weight: 500;
    color: #333;
}

.btn-copy {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: #666;
}

.btn-copy:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #333;
    transform: translateY(-1px);
}

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

/* Animation pour le message de copie */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.copy-message {
    animation: fadeInOut 2s ease-in-out;
}

/* Styles pour les tableaux avec téléphones */
.data-table .telephone-container {
    justify-content: flex-start;
}

.data-table .btn-copy {
    margin-left: 0.25rem;
    padding: 1px 4px;
    font-size: 0.8rem;
}

/* Styles pour les résidents dans les pages de confirmation */
.resident-item .telephone-container {
    margin-top: 0.25rem;
}

.resident-item .btn-copy {
    margin-left: 0.5rem;
}

/* Section showcase du portail */
.portal-showcase {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
}

.portal-showcase h3 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.portal-image-container {
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portal-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portal-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.portal-showcase p {
    font-size: 1.1rem;
    color: #666;
    margin-top: 1rem;
    font-style: italic;
}

.portal-image-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.portal-image-placeholder p {
    margin: 0;
    font-size: 1rem;
    color: #6c757d;
}

.portal-image-placeholder small {
    color: #9ca3af;
    font-family: monospace;
    font-size: 0.8rem;
} 