/* GOOGLE FONT */
/* Lora : logo, link */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&display=swap');
/* Open sans : body */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap');

/* GENERAL */
* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
}

:root {
    /* COLORS */
    --color-light-pink: #FFF8F6;
    --color-light-red: #C4202C;
    --color-dark-red: #771A19;
    --color-grey: #e5e5e5;
    --color-text70: rgba(0, 0, 0, 0.7);
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-blue: #1F527F;
    --color-yellow: #f1a61a;
  
    /* ANIMATION */
    --transition: all 500ms ease;

    /* SPACING */
    --spacing-small: 0.5rem;
    --spacing-medium: 1rem;
    --spacing-large: 1.5rem;
    --spacing-xlarge: 2.5rem;
    --spacing-xxlarge: 4rem;
    --spacing-xxxlarge: 6rem;

    /* FONT SIZE */
    --h1-font-size: 3.5rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
    --tiny-font-size: 0.625rem;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

::-webkit-scrollbar {
    display: none;
}

/* LAYOUT */
header {
    height: 100px;
    width: 100vw;
    left: calc(-50vw + 50%);
    position: relative;
    background-color: var(--color-dark-red);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: var(--normal-font-size);
    letter-spacing: 1px;
    margin: 0;
    height: 100%;
}

.container {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    margin: 0 auto;
    margin-bottom: 2rem;
}

section {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

footer {
    padding: var(--spacing-xlarge) 0;
    text-align: center;
    color: var(--color-text70);
    font-size: var(--small-font-size);
}

@media (min-width: 700px) {
    footer {
        padding: var(--spacing-xxlarge) 0;
    }
}

/* HEADINGS */
h1 {
    font-weight: 700;
    font-family: 'Lora', serif;
    font-size: var(--h1-font-size);
}

h2 {
    font-weight: 700;
    font-size: var(--h2-font-size);
}

h3 {
    font-weight: 500;
    color: var(--color-text70);
    font-size: var(--h3-font-size);
    letter-spacing: 0.25px;
}

/* LINKS */
a {
    color: var(--color-black);
    transition: var(--transition);
}
  
.link:hover {
    text-decoration: underline;
}

.red {
    color: var(--color-light-red);
    font-weight: 700;
}

.blue {
    color: var(--color-blue);
    font-weight: 700;
}

.underline {
    text-decoration: underline;
}

.center {
    text-align: center;
}

/* FORM */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form_element {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: bold;
}

input,
textarea {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: var(--normal-font-size);
}

.text_error {
    text-align: center;
    color: var(--color-light-red);
    font-weight: bold;
}

/* Input quantité */
input[type='number']{
    width: 40px;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
  }
  
  input[type=number]::-webkit-inner-spin-button,
  input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
  }
  
  .number-input {
    display: inline-flex;
  }
  
  .number-input,
  .number-input * {
    box-sizing: border-box;
  }
  
  .number-input button {
    outline:none;
    -webkit-appearance: none;
    background-color: transparent;
    border: none;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    margin: 0;
    position: relative;
  }
  
  .number-input button:before,
  .number-input button:after {
    display: inline-block;
    position: absolute;
    content: '';
     /* width: 1rem; */
    /* fh: on pourrait se créer une variable 'icon_size' pour la taille des icons */
    width: 0.7rem;
    height: 2px;
    background-color: #212121;
    transform: translate(-50%, -50%);
  }
  .number-input button.plus:after {
    transform: translate(-50%, -50%) rotate(90deg);
  }
  
 .number-input input[type="number"] {
    max-width: 5rem;
    /* padding: .5rem; */
    font-size: 1.3rem;
    /* font-size: 1.5rem;  */
    background-color: transparent;
    border: none;
    /* height: 3rem; */
    font-weight: bold;
    text-align: center;
}



/* BUTTONS */
button, .button {
    width: max-content;
    align-self: center;
    cursor: pointer;
    border: 1px solid transparent;
    padding: var(--spacing-medium);
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 800;
    font-size: var(--h3-font-size);
    text-align: center;
    color: var(--color-text70);
    background-color: transparent;
    border-color: var(--color-grey);
}

.button-small {
    font-weight: 300;
    font-size: var(--h4-font-size);
}

button:hover, .button:hover {
    border-color: inherit;
    color: var(--color-black);
}

.info {
    border-color: var(--color-blue);
    color: var(--color-blue);
}

.info:hover {
    background-color: var(--color-blue);
    color: var(--color-white);
}

.warning {
    border-color: var(--color-yellow);
    color: var(--color-yellow);
}

.danger {
    border-color: var(--color-light-red);
    color: var(--color-light-red);
}

.danger:hover {
    background-color: var(--color-light-red);
    color: var(--color-white);
}
  
.warning:hover {
    background-color: var(--color-yellow);
    color: var(--color-white);
}
  
/* IMAGE */
img {
    display: block;
    /* width: 100%; */
    max-width: 100%;
    object-fit: cover;
}

/* ICONS */
.icons {
    width: 1.5rem;
    height: 1.5rem;
}

.icons_action {
    width: 1.7rem;
    height: 1.7rem;
    margin-left : var(--spacing-small);
}

/* STRUCTURE CARDS CONTAINER */
.cards-container {
    display: flex;
    flex-direction: column;
}

.cards-container > * {
    padding: var(--spacing-large) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: inherit; 
}

.cards-container > * + * {
    border-top: 1px solid var(--color-grey);
}

/* Vue Desktop */
@media (min-width: 768px) {
    .cards-container {
        gap: var(--spacing-large);
    }

    .cards-container > * {
        border-radius: 10px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        padding: 1rem;
        transition: var(--transition);
    }

    .cards-container > * + * {
        border-top: none;
    }

    .cards-container > *:hover {
        -webkit-transform: scale(1.05, 1.05);
        transform: scale(1.05, 1.05);
    }
}

/* DETAIL CELLIER */
.cellier__detail {
    border-radius: 10px;
    padding: 1rem;
    background-color: var(--color-light-pink);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: black;
    text-align: center;

}

.cellier__detail-cta {
    display: flex;
    flex: 1;
    gap: 1rem;
}

.cellier__tri {
    margin-left: auto;
}


/* Profil */
.profil__detail{
    background-color: var(--color-light-pink);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profil__detail-cta {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1rem;
    justify-content: center;
    text-align: center;
}

.mail-icon {
    width: 1.3rem;
    display: inline;
    margin-right: 0.3rem;
    position: relative;
    top: 3px;
}

.success-message {
    padding: 1rem;
    background-color: rgb(199, 237, 199);
    color: green;
    font-size: 16px;
    text-align: center;
    border-radius: 10px;
}

.error-message {
    padding: 1rem;
    background-color: rgb(255, 198, 198);
    color: var(--color-light-red);
    font-size: 16px;
    text-align: justify;
    border-radius: 10px;
}

.error-message li {
    list-style: square;
    margin-left: 1rem;
}