/**
 * SecretAuto Shop - Styles CSS
 * Responsive Design : Mobile First
 */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4702c9;
    --primary-dark: #7a38f3;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --dark: #0470dd;
    --gray: #7f8c8d;
    --light-gray: #ecf0f1;
    --border-color: #ddd;
    --text-color: #333;
    --bg-color: #fff;
    --container-width: 600px;
}

@media (min-width: 768px) {
    :root {
        --container-width: 900px;
    }
}

@media (min-width: 1024px) {
    :root {
        --container-width: 1100px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background: #f8f9fa;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: var(--dark);
    color: rgb(255, 253, 253);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo a {
    color: white;
    text-decoration: none;
}

.logo h1 {
    font-size: 32px;
    margin-bottom: 0;
}

.logo span {
    font-size: 12px;
    color: var(--light-gray);
}

.header-nav {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.header-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
    font-size: 14px;
}

.header-nav a:hover,
.header-nav a.active {
    background: rgba(255,255,255,0.1);
}

.btn-panier {
    background: var(--primary-color);
    font-weight: bold;
}

.btn-panier:hover {
    background: var(--primary-dark);
}

.panier-count {
    font-size: 12px;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #34495e 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--light-gray);
    margin-bottom: 30px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;          /* permet aux éléments de passer à la ligne suivante */
    justify-content: flex-start; /* aligne les éléments sur la gauche */
    gap: 20px;                /* espace horizontal et vertical entre éléments */
    margin-top: 30px;
}

.hero-features .feature {
    flex: 1 1 100%;           /* par défaut, 1 élément par ligne */
    max-width: 500px;         /* limite la largeur pour ne pas trop s'étirer */
    text-align: left;          /* contenu aligné à gauche */
}

/* Sur écrans moyens et plus larges */
@media (min-width: 768px) {
    .hero-features .feature {
        flex: 1 1 45%;        /* 2 éléments par ligne avec gap */
    }
}

@media (min-width: 768px) {
    .hero h2 {
        font-size: 42px;
    }
    .hero-subtitle {
        font-size: 20px;
    }
}

/* ===== PRODUITS ===== */
.produits {
    padding: 30px 0;
    flex: 1;
}

.section-title {
    text-align: left;
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--dark);
}

.produits-grid {
    display: grid;
    grid-template-columns: 1fr; /* UNE seule colonne */
    gap: 30px;                  /* espace entre les produits */
}

.produit-card {
    width: 100%;                    /* prend toute la largeur de la colonne */
    box-sizing: border-box;         /* inclut padding et border dans la largeur */
    background: white;              /* fond de la carte */
    border: 2px solid #3498db;     /* bordure bleue */
    border-radius: 10px;            /* coins arrondis */
    padding: 20px;                  /* espace intérieur */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    line-height: 1.4;               /* resserre l'espacement entre lignes de texte */
}


/* Hover pour un effet léger */
.produit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Header et titre */
.produit-header {
    margin-bottom: 10px;
}

.produit-header h3 {
    font-size: 20px;
}

.produit-header {
    margin-bottom: 20px;
}

.produit-header h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark);
}

.produit-prix {
    font-size: 14px;
    color: var(--gray);
}

.produit-prix .prix {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
    margin-top: 5px;
}

.produit-description {
    margin-bottom: 20px;
    color: var(--gray);
    line-height: 1.6;
}

.produit-options {
    margin-bottom: 20px;
}

.produit-options label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark);
}

.option-radio {
    display: block;
    margin-bottom: 10px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-radio:hover {
    border-color: var(--primary-color);
    background: #fff5f5;
}

.option-radio input[type="radio"] {
    margin-right: 10px;
}

.option-radio input[type="radio"]:checked + .option-label {
    color: var(--primary-color);
}

.option-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-label strong {
    color: var(--primary-color);
}



/* ===== BOUTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-secondary:hover {
    background: #6c7a89;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-paypal {
    background: #0070ba;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-paypal:hover {
    background: #005a94;
}

.btn-paypal img {
    height: 23px;
}

.btn-ajouter-panier {
    width: auto;         /* largeur automatique selon contenu */
    max-width: 150px;    /* largeur maximale du bouton */
    display: block;      /* pour pouvoir centrer avec margin */
    margin: 0 auto;      /* centre horizontalement dans la carte */
}


/* ===== WHY US ===== */
.why-us {
    background: white;
    padding: 60px 0;
}

.why-us h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--dark);
}

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

.why-icon img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px;
}

@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .why-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.why-item {
    text-align: center;
    padding: 20px;
}

.why-icon {
    font-size: 48px;
    margin-bottom: 15px;
}



.why-item h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.why-item p {
    color: var(--gray);
    line-height: 1.6;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-col h4 {
    margin-bottom: 15px;
    color: white;
}

.footer-col p,
.footer-col a {
    color: var(--light-gray);
    text-decoration: none;
    line-height: 2;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--light-gray);
}

/* ===== MESSAGES FLASH ===== */
.flash-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
}

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

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

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* ===== PANIER ===== */
.panier-section {
    padding: 60px 0;
    min-height: 60vh;
}

.panier-section h1 {
    margin-bottom: 30px;
    color: var(--dark);
}

.panier-vide {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
}

.panier-vide p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 20px;
}

.panier-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.panier-table thead {
    background: var(--dark);
    color: white;
}

.panier-table th,
.panier-table td {
    padding: 15px;
    text-align: left;
}

.panier-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.panier-table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 5px 10px;
    background: var(--light-gray);
    border-radius: 15px;
    font-size: 12px;
    color: var(--dark);
}

.btn-supprimer {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.3s;
}

.btn-supprimer:hover {
    transform: scale(1.2);
}

.panier-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.panier-actions-left {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.panier-total {
    background: white;
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
}

.total-ligne {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.total-final {
    border-top: 2px solid var(--border-color);
    padding-top: 15px;
    margin-top: 10px;
    font-size: 20px;
}

.total-prix {
    color: var(--primary-color);
}

.panier-checkout {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 10px;
}

.checkout-message p {
    margin-bottom: 20px;
}

/* ===== FORMULAIRES ===== */
.compte-section,
.checkout-section {
    padding: 60px 0;
    min-height: 60vh;
}

.compte-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 30px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.compte-content,
.form-compte {
    background: white;
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.form-compte h2,
.form-compte h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.radio-label input[type="radio"] {
    margin: 0;
}

.radio-label:has(input:checked) {
    border-color: var(--primary-color);
    background: #fff5f5;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert ul {
    margin-left: 20px;
}

/* ===== CHECKOUT ===== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.checkout-recap,
.checkout-payment {
    background: white;
    padding: 30px;
    border-radius: 10px;
}

.checkout-recap h2,
.checkout-payment h2 {
    margin-bottom: 20px;
    color: var(--dark);
}

.recap-items {
    margin-bottom: 20px;
}

.recap-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.recap-item-info strong {
    display: block;
    margin-bottom: 5px;
}

.recap-item-info small {
    color: var(--gray);
}

.recap-totaux {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.recap-client {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.recap-client h3 {
    margin-bottom: 15px;
}

.payment-info p {
    margin-bottom: 20px;
    color: var(--gray);
}

.payment-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.payment-features .feature {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.payment-secure {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.checkout-back {
    margin-top: 20px;
    text-align: center;
}

/* ===== CONFIRMATION ===== */
.confirmation-section {
    padding: 60px 0;
    min-height: 60vh;
}

.confirmation-box {
    background: white;
    padding: 60px 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.confirmation-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.confirmation-box h1 {
    margin-bottom: 20px;
    color: var(--dark);
}

.confirmation-message {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.confirmation-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.confirmation-next {
    text-align: left;
    background: #e8f5e9;
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
}

.confirmation-next h3 {
    margin-bottom: 15px;
    color: var(--success-color);
}

.confirmation-next ul {
    list-style: none;
    margin-left: 0;
}

.confirmation-next li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.confirmation-info {
    background: #fff3cd;
    padding: 20px;
    border-radius: 6px;
    margin: 30px 0;
    text-align: left;
}

.confirmation-info ul {
    margin-left: 20px;
    margin-top: 10px;
}

.confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.confirmation-contact {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

/* ===== DASHBOARD ===== */
.compte-dashboard {
    padding: 60px 0;
    min-height: 60vh;
}

.compte-dashboard h1 {
    margin-bottom: 30px;
    color: var(--dark);
}

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

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 2fr;
    }
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
}

.dashboard-card h2 {
    margin-bottom: 20px;
    color: var(--dark);
}

.info-group {
    margin-bottom: 15px;
}

.info-group label {
    display: block;
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 5px;
}

.info-group p {
    font-size: 16px;
    color: var(--dark);
}

.info-group hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.commandes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.commande-item {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.commande-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    flex-wrap: wrap;
    gap: 10px;
}

.commande-numero {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.statut-warning {
    background: var(--warning-color);
    color: white;
}

.statut-danger {
    background: var(--danger-color);
    color: white;
}

.commande-details {
    padding: 15px;
}

.detail-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-nom {
    font-weight: 500;
}

.commande-footer {
    padding: 15px;
    background: #f8f9fa;
    text-align: right;
}

.commande-total {
    font-size: 20px;
    color: var(--primary-color);
}

/* ===== RESPONSIVE TABLES ===== */
@media (max-width: 767px) {
    .panier-table {
        display: block;
        overflow-x: auto;
    }
    
    .panier-table th:nth-child(2),
    .panier-table td:nth-child(2) {
        display: none;
    }
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.produit-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


