/* L'entierté du CSS a été généré par IA ( Claude et ChatGPT) */

body {
    background-color: black;
    color: white; /* tout le texte blanc par défaut */
}

.cache {
    display: none;
}

/* ======= CATALOGUE =======  ======= CATALOGUE =======  ======= CATALOGUE ======= */

#catalogue {
    padding: 2rem;
}


#catalogue-titre {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

#catalogue-grille {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.montre-carte {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 300px;
    background: #1a1a1a;
}

.montre-carte__header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 0.75rem;
    color: white;
}

.montre-carte__favori {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-style: italic;
    font-size: 0.9rem;
}

.montre-carte__image {
    flex: 1;
    overflow: hidden;
}

.montre-carte__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.montre-carte__infos {
    position: relative;
    margin-top: -20px;
    z-index: 1;
    padding: 0.75rem;
    background: linear-gradient(
        to bottom,
        rgba(40, 35, 25, 0.97),  /* brun-doré très foncé en haut */
        rgba(10, 10, 10, 0.99)   /* quasi noir en bas */
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(201, 168, 76, 0.4);
    box-shadow: inset 0 1px 0 rgba(201, 168, 76, 0.1);
}

.montre-carte__nom {
    font-size: 1rem;
    margin: 0 0 0.25rem;
    color: white;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.8rem;
    text-shadow: 0 0 12px rgba(201, 168, 76, 0.4);
}

.montre-carte__prix {
    font-style: italic;
    margin: 0;
    color: #c9a84c;
    text-shadow: 0 0 8px rgba(201, 168, 76, 0.6);
}

.montre-carte__lien {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

/* ======= MESMONTRES =======  ======= MESMONTRES =======  ======= MESMONTRES ======= */

#mesMontres-actions {
    padding: 0 2rem 1.5rem 2rem;
}

#mesMontres-ajouter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #1a3a6e, #2d5bb5);
    border: 1px solid rgba(93, 140, 226, 0.5);
    color: #a8c4f0;
    padding: 0.55rem 1.25rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-style: italic;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

#mesMontres-ajouter-btn:hover {
    border-color: #c9a84c;
    background: rgba(201, 168, 76, 0.08);
    color: #e0bf6a;
}

#mesMontres {
    padding: 2rem;
}

#mesMontres-titre {
    text-align: center;
    margin-bottom: 2rem;
    color: white;
}

#mesMontres-grille {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ======= NAVIGATION =======  ======= NAVIGATION =======  ======= NAVIGATION ======= */

#navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background-color: black;
    border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}

#navbar-brand {
    color: #c9a84c;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-decoration: none;
    border-bottom: 2px solid #c9a84c;
    padding-bottom: 2px;
}

#navbar-actions {
    display: flex;
    align-items: center;
    gap: 0;
}

#navbar-actions p,
#navbar-actions a,
#navbar-actions button {
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

#navbar-actions p {
    border-left: none;
}

#logoutBtn,
#loginBtn {
    color: white;
}

/* ======= LOGIN =======  ======= LOGIN =======  ======= LOGIN ======= */

#login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 2rem;
}

#login-card {
    background: #1a1a1a;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

#login-titre {
    color: #c9a84c;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-champ {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.login-champ label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.login-champ input {
    background: #0a0a0a;
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 6px;
    color: white;
    padding: 0.6rem 0.9rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.login-champ input:focus {
    border-color: #c9a84c;
}

#login-submit-btn {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #c9a84c;
    color: black;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: background 0.2s;
}

#login-submit-btn:hover {
    background: #e0bf6a;
}

.login-erreur {
    margin-top: 1rem;
    text-align: center;
    color: #ff6b6b;
    font-size: 0.9rem;
}


/* ======= DETAIL =======  ======= DETAIL =======  ======= DETAIL ======= */

#detail {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* --- Partie haute : image + infos --- */

#detail-haut {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

#detail-image-wrapper {
    width: 300px;
    min-width: 300px;
    height: 300px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

#detail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#detail-infos-principales {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#detail-titre-ligne {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

#detail-nom {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin: 0;
}

#detail-favori-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
}

#detail-prix {
    color: #c9a84c;
    font-style: italic;
    margin: 0;
    font-size: 1.1rem;
}

#detail-description {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

/* --- Titres de sections --- */

.detail-section-titre {
    color: white;
    font-style: italic;
    font-weight: normal;
    font-size: 1.2rem;
    margin: 0 0 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: 0.4rem;
}

/* --- Spécifications --- */

#detail-specs {
    margin-bottom: 2.5rem;
}

.detail-specs-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

#detail-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 500px;
}

#detail-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.detail-table-key {
    color: rgba(255,255,255,0.5);
    font-style: italic;
    text-align: right;
    padding: 0.3rem 0.75rem 0.3rem 0;
    white-space: nowrap;
    width: 130px;
}

#detail-table td:not(.detail-table-key) {
    color: #c9a84c;
    padding: 0.3rem 0;
}

/* --- Commentaires --- */

#detail-commentaires {
    margin-bottom: 2.5rem;
}

#detail-commentaires p { 
    color: rgba(255,255,255,0.6);
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
}

#detail-commentaires-liste {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.commentaire-carte {
    background-color: #1111;
    border: 1px solid #c9a84c;

    border-radius: 8px;
    padding: 0.85rem 1rem;
}

.commentaire-auteur {
    color: rgba(255,255,255,0.5);
    font-style: italic;
    font-size: 0.9rem;
    margin: 0 0 0.35rem 0;
}

.commentaire-texte {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    margin: 0 0 0.35rem 0;
}

.commentaire-date {
    color: rgba(255,255,255,0.35);
    font-size: 0.8rem;
    text-align: right;
    margin: 0;
}

#detail-ecrire-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

#detail-ecrire-btn:hover {
    border-color: #c9a84c;
    color: #c9a84c;
}

/* --- Footer --- */

#detail-footer {
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
    text-align: left;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ======= CRÉATION MONTRE ======= ======= CRÉATION MONTRE ============== CRÉATION MONTRE =======*/

#edit-image-wrapper {
    width: 300px;
    min-width: 300px;
    height: 300px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}


.detail-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    width: 100%;
}

.detail-input:focus {
    border-bottom-color: #c9a84c;
}

.detail-input--titre {
    font-size: 2rem;
    font-weight: bold;
    padding: 0.2rem 0;
    background: transparent;
}

.detail-input--titre::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.detail-input--prix {
    font-style: italic;
    font-size: 1.1rem;
    color: #c9a84c;
    padding: 0.2rem 0;
    margin-top: 0.25rem;
}

.detail-input--prix::placeholder {
    color: rgba(201, 168, 76, 0.35);
}

.detail-input--prix::-webkit-outer-spin-button,
.detail-input--prix::-webkit-inner-spin-button,
.detail-input--cell::-webkit-outer-spin-button,
.detail-input--cell::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.detail-input--textarea {
    resize: vertical;
    padding: 0.5rem 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    min-height: 80px;
}

.detail-input--textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.detail-input--cell {
    font-style: italic;
    color: #c9a84c;
    padding: 0.3rem 0;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-input--cell::placeholder {
    color: rgba(201, 168, 76, 0.3);
}

.detail-input--cell:focus {
    border-bottom-color: #c9a84c;
}

.detail-input--image {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-top: 1px solid rgba(201, 168, 76, 0.3);
    color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s, color 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.detail-input--image:focus {
    border-top-color: #c9a84c;
    color: white;
}

.detail-input--image::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-style: italic;
}

#detail-creation-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

#creation-soumettre-btn {
    display: inline-block;
    background: #c9a84c;
    color: black;
    border: none;
    border-radius: 20px;
    padding: 0.65rem 1.75rem;
    font-size: 0.95rem;
    font-style: italic;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.2s;
    align-self: flex-start;
}

#creation-soumettre-btn:hover {
    background: #e0bf6a;
}

#edit-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-style: italic;
    font-size: 1.5rem;
    letter-spacing: 0.2em;
}