/* Styles modernes pour 1306DATA Formulaire */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #334155;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

.admin-icon-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.admin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.admin-icon:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #764ba2;
}

.admin-icon svg {
    width: 24px;
    height: 24px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

.logo-small {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #64748b;
    font-size: 1.1rem;
}

.company-description {
    margin-top: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.company-description p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.help-text {
    margin-top: 5px;
    font-size: 0.85rem;
    color: #64748b;
}

.error-message {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #ef4444;
    min-height: 20px;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #10b981;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.4);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(102, 126, 234, 0.5);
}

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

.company-info {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
    text-align: center;
    color: #64748b;
}

.company-info h3 {
    color: #1e293b;
    margin-bottom: 10px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1001;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
}

#devisContent {
    padding: 40px;
}

/* Admin Styles */
.admin-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 30px;
    color: #1e293b;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.admin-dashboard {
    min-height: 100vh;
    background: #f8fafc;
}

.admin-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px 40px;
    margin-bottom: 30px;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-content h1 {
    flex: 1;
    margin: 0;
    font-size: 1.8rem;
}

.btn-logout {
    background: #ef4444;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #dc2626;
}

.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 40px;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-card p {
    color: #64748b;
    font-weight: 600;
}

.submissions-table-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.submissions-table-container h2 {
    margin-bottom: 20px;
    color: #1e293b;
}

.submissions-table {
    width: 100%;
    border-collapse: collapse;
}

.submissions-table th {
    background: #f8fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 2px solid #e2e8f0;
}

.submissions-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.submissions-table tr:hover {
    background: #f8fafc;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.btn-view {
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #5568d3;
}

/* Devis Styles */
.devis-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.devis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.logo-devis {
    max-width: 150px;
    height: auto;
}

.devis-company-info h2 {
    margin-bottom: 10px;
    color: #1e293b;
}

.devis-title {
    text-align: center;
    margin-bottom: 40px;
}

.devis-title h1 {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 10px;
}

.devis-client-info {
    margin-bottom: 30px;
}

.devis-client-info h3 {
    margin-bottom: 15px;
    color: #1e293b;
}

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

.devis-details {
    margin-bottom: 40px;
}

.devis-details h3 {
    margin-bottom: 15px;
    color: #1e293b;
}

.devis-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.devis-table th {
    background: #f8fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.devis-table td {
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.total-row {
    background: #f8fafc;
    font-size: 1.1rem;
}

.devis-payment-info {
    margin-top: 30px;
    padding: 20px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.devis-payment-info h3 {
    margin-bottom: 10px;
    color: #92400e;
}

.devis-payment-info p {
    margin: 5px 0;
    color: #78350f;
}

.devis-signature {
    margin-top: 60px;
    display: flex;
    justify-content: flex-end;
}

.signature-box {
    text-align: center;
    min-width: 200px;
}

.signature-line {
    border-top: 2px solid #1e293b;
    margin-top: 50px;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2rem;
    }

    .submissions-table {
        font-size: 0.85rem;
    }

    .submissions-table th,
    .submissions-table td {
        padding: 8px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .devis-header {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-content {
        padding: 0 20px 20px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }
}

